aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDairui Zhang <zhangdairui@gmail.com>2026-09-28 13:20:26 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-21 08:55:20 +0900
commit783a7fc454991544bf92268d8f2413af1a7c7eb8 (patch)
treed77e73f4e8dbd6e4c4bbbc0a3a62cf42bb311152 /scripts/Makefile.thinlto
parentsmb/common: update POSIX extension specification references (diff)
ksmbd: fix OOB read and cross-share confusion in ksmbd_validate_name_reconnect()
ksmbd_validate_name_reconnect() indexes ab_pathname[share->path_sz + 1] without checking that the path is longer than share->path_sz + 1 (d_path() fills the buffer from the end). A durable fp is not bound to its original share, so a client can preserve a file from a short-path share and reconnect it on a long-path share, making strcmp() read past the PATH_MAX buffer - with a long enough share path this oopses the kernel, and on a mapped page it also gives a byte-equality oracle on adjacent heap (the reconnect succeeds exactly when the out-of-bounds string equals the requested name). A same-share variant with the durable fp at the share root reads 1 byte past the buffer (strlen(ab_pathname) == share->path_sz). Check before comparing: the path must be longer than share->path_sz, it must start with share->path, and the next character must be '/'. The share root itself is accepted only for an empty name. Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2") Reported-by: Dairui Zhang <zhangdairui@gmail.com> Assisted-by: LLM Cc: stable@vger.kernel.org Signed-off-by: Dairui Zhang <zhangdairui@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions