diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2023-12-20 15:52:11 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-12-27 22:55:36 -0600 |
commit | d10c77873ba1e9e6b91905018e29e196fd5f863d (patch) | |
tree | a12180e41c83d8a43e1e1ea4ff7ab02208c5856e /fs/smb/common | |
parent | ceb6a6f023fd3e8b07761ed900352ef574010bcb (diff) | |
download | linux-stable-d10c77873ba1e9e6b91905018e29e196fd5f863d.tar.gz linux-stable-d10c77873ba1e9e6b91905018e29e196fd5f863d.tar.bz2 linux-stable-d10c77873ba1e9e6b91905018e29e196fd5f863d.zip |
ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
If ->NameOffset/Length is bigger than ->CreateContextsOffset/Length,
ksmbd_check_message doesn't validate request buffer it correctly.
So slab-out-of-bounds warning from calling smb_strndup_from_utf16()
in smb2_open() could happen. If ->NameLength is non-zero, Set the larger
of the two sums (Name and CreateContext size) as the offset and length of
the data area.
Reported-by: Yang Chaoming <lometsj@live.com>
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/common')
0 files changed, 0 insertions, 0 deletions