https://github.com/torvalds/linux
Revision d10c77873ba1e9e6b91905018e29e196fd5f863d authored by Namjae Jeon on 20 December 2023, 06:52:11 UTC, committed by Steve French on 28 December 2023, 04:55:36 UTC
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>
1 parent ceb6a6f
History
Tip revision: d10c77873ba1e9e6b91905018e29e196fd5f863d authored by Namjae Jeon on 20 December 2023, 06:52:11 UTC
ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
Tip revision: d10c778
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 20.1 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 151 bytes
.gitattributes -rw-r--r-- 105 bytes
.gitignore -rw-r--r-- 2.0 KB
.mailmap -rw-r--r-- 36.1 KB
.rustfmt.toml -rw-r--r-- 369 bytes
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 100.2 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 714.0 KB
Makefile -rw-r--r-- 65.7 KB
README -rw-r--r-- 727 bytes

README

back to top