Skip to content

Commit 63d37fb

Browse files
Murphy Zhousmfrench
authored andcommitted
CIFS: fix max ea value size
It should not be larger then the slab max buf size. If user specifies a larger size, it passes this check and goes straightly to SMB2_set_info_init performing an insecure memcpy. Signed-off-by: Murphy Zhou <[email protected]> Reviewed-by: Aurelien Aptel <[email protected]> CC: Stable <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 8559ad8 commit 63d37fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "cifs_fs_sb.h"
3232
#include "cifs_unicode.h"
3333

34-
#define MAX_EA_VALUE_SIZE 65535
34+
#define MAX_EA_VALUE_SIZE CIFSMaxBufSize
3535
#define CIFS_XATTR_CIFS_ACL "system.cifs_acl"
3636
#define CIFS_XATTR_ATTRIB "cifs.dosattrib" /* full name: user.cifs.dosattrib */
3737
#define CIFS_XATTR_CREATETIME "cifs.creationtime" /* user.cifs.creationtime */

0 commit comments

Comments
 (0)