Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b1fefac authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

:
  When verifying the decoded header before decoding the object identifier
  [CIFS] Fix warnings from checkpatch
  [CIFS] Fix improper endian conversion of ACL subauth field
  [CIFS] Fix possible double free if search immediately after search rewind fails
  [CIFS] remove checkpatch warning
  Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
  cifs: assorted endian annotations
  [CIFS] break ATTR_SIZE changes out into their own function
  lockdep: annotate cifs in-kernel sockets
  [CIFS] Fix compiler warning on 64-bit
parents 6ca813c4 e2d2867f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -400,7 +400,7 @@ asn1_oid_decode(struct asn1_ctx *ctx,
	size = eoc - ctx->pointer + 1;
	size = eoc - ctx->pointer + 1;


	/* first subid actually encodes first two subids */
	/* first subid actually encodes first two subids */
	if (size < 2 || size > ULONG_MAX/sizeof(unsigned long))
	if (size < 2 || size > UINT_MAX/sizeof(unsigned long))
		return 0;
		return 0;


	*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
	*oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC);
@@ -494,7 +494,7 @@ decode_negTokenInit(unsigned char *security_blob, int length,
		/*      remember to free obj->oid */
		/*      remember to free obj->oid */
		rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
		rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
		if (rc) {
		if (rc) {
			if ((tag == ASN1_OJI) && (cls == ASN1_PRI)) {
			if ((tag == ASN1_OJI) && (con == ASN1_PRI)) {
				rc = asn1_oid_decode(&ctx, end, &oid, &oidlen);
				rc = asn1_oid_decode(&ctx, end, &oid, &oidlen);
				if (rc) {
				if (rc) {
					rc = compare_oid(oid, oidlen,
					rc = compare_oid(oid, oidlen,
+248 −397

File changed.

Preview size limit exceeded, changes collapsed.

+20 −21

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Original line Diff line number Diff line
@@ -310,9 +310,8 @@ void calc_lanman_hash(struct cifsSesInfo *ses, char *lnm_session_key)
	utf8 and other multibyte codepages each need their own strupper
	utf8 and other multibyte codepages each need their own strupper
	function since a byte at a time will ont work. */
	function since a byte at a time will ont work. */


	for (i = 0; i < CIFS_ENCPWD_SIZE; i++) {
	for (i = 0; i < CIFS_ENCPWD_SIZE; i++)
		password_with_pad[i] = toupper(password_with_pad[i]);
		password_with_pad[i] = toupper(password_with_pad[i]);
	}


	SMBencrypt(password_with_pad, ses->server->cryptKey, lnm_session_key);
	SMBencrypt(password_with_pad, ses->server->cryptKey, lnm_session_key);
	/* clear password before we return/free memory */
	/* clear password before we return/free memory */
+3 −3
Original line number Original line Diff line number Diff line
@@ -27,7 +27,7 @@
#define MAX_SES_INFO 2
#define MAX_SES_INFO 2
#define MAX_TCON_INFO 4
#define MAX_TCON_INFO 4


#define MAX_TREE_SIZE 2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1
#define MAX_TREE_SIZE (2 + MAX_SERVER_SIZE + 1 + MAX_SHARE_SIZE + 1)
#define MAX_SERVER_SIZE 15
#define MAX_SERVER_SIZE 15
#define MAX_SHARE_SIZE  64	/* used to be 20, this should still be enough */
#define MAX_SHARE_SIZE  64	/* used to be 20, this should still be enough */
#define MAX_USERNAME_SIZE 32	/* 32 is to allow for 15 char names + null
#define MAX_USERNAME_SIZE 32	/* 32 is to allow for 15 char names + null
@@ -537,8 +537,8 @@ require use of the stronger protocol */
#endif /* WEAK_PW_HASH */
#endif /* WEAK_PW_HASH */
#define   CIFSSEC_MUST_SEAL	0x40040 /* not supported yet */
#define   CIFSSEC_MUST_SEAL	0x40040 /* not supported yet */


#define   CIFSSEC_DEF  CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2
#define   CIFSSEC_DEF (CIFSSEC_MAY_SIGN | CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2)
#define   CIFSSEC_MAX  CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2
#define   CIFSSEC_MAX (CIFSSEC_MUST_SIGN | CIFSSEC_MUST_NTLMV2)
#define   CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_LANMAN | CIFSSEC_MAY_PLNTXT | CIFSSEC_MAY_KRB5)
#define   CIFSSEC_AUTH_MASK (CIFSSEC_MAY_NTLM | CIFSSEC_MAY_NTLMV2 | CIFSSEC_MAY_LANMAN | CIFSSEC_MAY_PLNTXT | CIFSSEC_MAY_KRB5)
/*
/*
 *****************************************************************
 *****************************************************************
Loading