diff options
| author | 2026-10-17 09:44:48 +0900 | |
|---|---|---|
| committer | 2026-10-21 08:55:27 +0900 | |
| commit | 3474e1a304fbf9f7c996b24adcd519e031227a90 (patch) | |
| tree | 158316950310caf4f33c5346e2c20727fe5e3ebb /scripts/Makefile.thinlto | |
| parent | smb: smbdirect: don't WARN on an unexpected receive opcode (diff) | |
ksmbd: validate security descriptor offsets before pointer arithmetic
parse_sec_desc() constructs SID and DACL pointers by adding untrusted
32-bit offsets to the security descriptor before checking their bounds.
The existing checks reject offsets into the descriptor header, but do
not reject offsets beyond the descriptor's length.
On a 32-bit kernel, a large offset can wrap the pointer before the
descriptor. The end-only checks in parse_sid() and parse_dacl() can then
accept it, allowing an authenticated SMB2 SET_INFO request to access
memory outside the security descriptor and fault the kernel.
Check each nonzero offset against acl_len before constructing its
pointer. Initialize the optional owner and group SID pointers to NULL
so an omitted SID remains absent when parsing the DACL.
Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Cc: stable@vger.kernel.org
Reported-by: Ratnaker Gautam <ratnaker.gautam@kuleuven.be>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
