summaryrefslogtreecommitdiff
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
authorJerome Marchand <jmarchan@redhat.com>2016-05-26 11:52:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 09:47:39 -0700
commit1422b6b926f3634cddf449d65ce976f397726c63 (patch)
tree2eb3b5b14f1e01cba0dc7d81682ecc472d915261 /lib/dump_stack.c
parent4ce7aa4e44d88ce64ea8ae2337b8910f3670b0ba (diff)
cifs: dynamic allocation of ntlmssp blob
commit b8da344b74c822e966c6d19d6b2321efe82c5d97 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/dump_stack.c')
0 files changed, 0 insertions, 0 deletions