kernel-hacking-2024-linux-s.../fs/cifs
Jerome Marchand b8da344b74 cifs: dynamic allocation of ntlmssp blob
In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated
statically and its size is an "empirical" 5*sizeof(struct
_AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value
comes from or if it was ever appropriate, but it is currently
insufficient: the user and domain name in UTF16 could take 1kB by
themselves. Because of that, build_ntlmssp_auth_blob() might corrupt
memory (out-of-bounds write). The size of ntlmssp_blob in
SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE)
+ 500).

This patch allocates the blob dynamically in
build_ntlmssp_auth_blob().

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
CC: Stable <stable@vger.kernel.org>
2016-06-23 23:45:07 -05:00
..
asn1.c
cache.c
cifs_debug.c lib: update single-char callers of strtobool() 2016-03-17 15:09:34 -07:00
cifs_debug.h lib: update single-char callers of strtobool() 2016-03-17 15:09:34 -07:00
cifs_dfs_ref.c cifs: remove any preceding delimiter from prefix_path 2016-05-17 14:09:33 -05:00
cifs_fs_sb.h
cifs_ioctl.h Add way to query server fs info for smb3 2015-08-20 10:19:25 -05:00
cifs_spnego.c cifs: Create dedicated keyring for spnego operations 2016-05-19 21:56:30 -05:00
cifs_spnego.h
cifs_unicode.c Fix to convert SURROGATE PAIR 2015-05-20 13:12:51 -05:00
cifs_unicode.h
cifs_uniupr.h
cifsacl.c KEYS: Add a facility to restrict new links into a keyring 2016-04-11 22:37:37 +01:00
cifsacl.h
cifsencrypt.c cifs: merge the hash calculation helpers 2016-03-28 14:05:27 -04:00
cifsfs.c cifs: stuff the fl_owner into "pid" field in the lock request 2016-06-23 23:44:44 -05:00
cifsfs.h Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 2016-05-18 10:01:47 -07:00
cifsglob.h cifs: stuff the fl_owner into "pid" field in the lock request 2016-06-23 23:44:44 -05:00
cifspdu.h Add way to query server fs info for smb3 2015-08-20 10:19:25 -05:00
cifsproto.h cifs: Create dedicated keyring for spnego operations 2016-05-19 21:56:30 -05:00
cifssmb.c Merge branch 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-05-18 10:17:56 -07:00
connect.c Merge branch 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-05-18 10:17:56 -07:00
dir.c Fix that several functions handle incorrect value of mapchars 2015-05-10 19:56:35 -05:00
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: stuff the fl_owner into "pid" field in the lock request 2016-06-23 23:44:44 -05:00
fscache.c
fscache.h
inode.c Merge getxattr prototype change into work.lookups 2016-05-02 19:45:47 -04:00
ioctl.c vfs: pull btrfs clone API to vfs layer 2015-12-07 23:11:33 -05:00
Kconfig Allow parsing vers=3.11 on cifs mount 2015-06-27 20:23:32 -07:00
link.c switch ->get_link() to delayed_call, kill ->put_link() 2015-12-30 13:01:03 -05:00
Makefile cifs: Switch to generic xattr handlers 2016-04-23 15:33:03 -04:00
misc.c Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. 2016-01-14 14:29:42 -06:00
netmisc.c
nterr.c
nterr.h
ntlmssp.h cifs: dynamic allocation of ntlmssp blob 2016-06-23 23:45:07 -05:00
readdir.c cifs: Use file_dentry() 2016-05-17 14:09:33 -05:00
rfc1002pdu.h
sess.c cifs: dynamic allocation of ntlmssp blob 2016-06-23 23:45:07 -05:00
smb1ops.c Fix that several functions handle incorrect value of mapchars 2015-05-10 19:56:35 -05:00
smb2file.c Add resilienthandles mount parm 2015-11-03 10:10:36 -06:00
smb2glob.h remove directory incorrectly tries to set delete on close on non-empty directories 2016-05-17 14:09:44 -05:00
smb2inode.c remove directory incorrectly tries to set delete on close on non-empty directories 2016-05-17 14:09:44 -05:00
smb2maperror.c
smb2misc.c Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. 2016-01-14 14:29:42 -06:00
smb2ops.c Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. 2016-01-14 14:29:42 -06:00
smb2pdu.c cifs: dynamic allocation of ntlmssp blob 2016-06-23 23:45:07 -05:00
smb2pdu.h Prepare for encryption support (first part). Add decryption and encryption key generation. Thanks to Metze for helping with this. 2016-01-14 14:29:42 -06:00
smb2proto.h remove directory incorrectly tries to set delete on close on non-empty directories 2016-05-17 14:09:44 -05:00
smb2status.h
smb2transport.c cifs: merge the hash calculation helpers 2016-03-28 14:05:27 -04:00
smbencrypt.c cifs: Use skcipher 2016-01-27 20:35:53 +08:00
smberr.h
smbfsctl.h [SMB3] Send durable handle v2 contexts when use of persistent handles required 2015-11-03 09:26:27 -06:00
transport.c cifs: quit playing games with draining iovecs 2016-03-28 14:05:32 -04:00
winucase.c
xattr.c switch xattr_handler->set() to passing dentry and inode separately 2016-05-27 15:39:43 -04:00