diff options
author | Murphy Zhou <jencce.kernel@gmail.com> | 2019-09-21 19:26:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-05 12:30:36 +0200 |
commit | 4b8d7cf87707123984a45d9066df5f92bb0f5a0d (patch) | |
tree | 6e53008bdc7cd13cc8436ca6a6ec3691733d5ad5 /fs/cifs | |
parent | 75aaa6f61279758196e5a82b77288109a6a0b5a2 (diff) | |
download | linux-rt-4b8d7cf87707123984a45d9066df5f92bb0f5a0d.tar.gz |
CIFS: fix max ea value size
commit 63d37fb4ce5ae7bf1e58f906d1bf25f036fe79b2 upstream.
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 <jencce.kernel@gmail.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 20af5187ba63..6634ad3567e0 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c @@ -31,7 +31,7 @@ #include "cifs_fs_sb.h" #include "cifs_unicode.h" -#define MAX_EA_VALUE_SIZE 65535 +#define MAX_EA_VALUE_SIZE CIFSMaxBufSize #define CIFS_XATTR_CIFS_ACL "system.cifs_acl" #define CIFS_XATTR_ATTRIB "cifs.dosattrib" /* full name: user.cifs.dosattrib */ #define CIFS_XATTR_CREATETIME "cifs.creationtime" /* user.cifs.creationtime */ |