diff options
| author | Jiwoo Kim <arpe1618@gmail.com> | 2026-11-10 16:24:05 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-11-10 22:06:30 +0900 |
| commit | 0383a66dabd7aa06237b9b24713c03656abeffe4 (patch) | |
| tree | 3fb8f32fab784f60eb05071cb14ac42e29680619 /scripts/Makefile.thinlto | |
| parent | 4ab80fd4d1f1c4363b336ddb3d8818ea37c4997d (diff) | |
| download | lwn-0383a66dabd7aa06237b9b24713c03656abeffe4.tar.gz lwn-0383a66dabd7aa06237b9b24713c03656abeffe4.zip | |
ksmbd: pin parent dentries in SMB2 CREATE ACL path
smb2_open() and smb_inherit_dacl() read a child's d_parent without a
dentry reference. A concurrent SMB request can move the child and
remove the parent while CREATE uses its inode for permission, status,
and ACL inheritance work. A remote SMB race with concurrent opener and
mover connections on a writable KSMBD acl_xattr share triggered an
8-byte slab-use-after-free read in get_cached_acl on tmpfs and ext4
KASAN guests. With oops=panic, it also caused an Oops and kernel panic
on an ext4 guest.
Take a parent dentry reference around each parent inode or ACL access
in these paths and release it when the operation completes. Treat a
negative parent dentry as -ENOENT for the affected operation.
On a tmpfs KASAN QEMU guest, two 3,000-round reproducer instances
completed without a KASAN report or Oops; SMB remained reachable. On
an ext4 non-KASAN QEMU guest with oops=panic, a 2,000-operation no-race
control and two 5,000-round reproducer instances completed without an
Oops or panic. An SMB health probe still succeeded.
OpenAI Codex assisted with finding the bug, generating the SMB race
reproducer, drafting this fix and changelog, and running the tests.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Cc: stable@kernel.org
Signed-off-by: Jiwoo Kim <arpe1618@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
