diff options
| author | liuyong <pkfxxxing@gmail.com> | 2026-11-06 18:48:35 +0800 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-11-08 14:39:43 -0300 |
| commit | ffb59029c0d52bf76fdd2678f5d6fd13e26220dd (patch) | |
| tree | 517bb7c483a6e7b2ef2b6d70a7e7785e65c1af1b /tools/perf/scripts/python/bin | |
| parent | 73a0060cb22a1d2bd8bff364c18a4259ec0cb528 (diff) | |
smb: client: validate descriptor headers before query result allocation
query_info() uses the server's returned length instead of the caller's
minimum when a dynamic result is requested. A zero-length ACL response
can therefore return ZERO_SIZE_PTR to id_mode_to_cifs_acl(), whose
ownership-change path reads dacloffset before checking the header size.
A KASAN-enabled test shows a read at address 0x20 and a kernel Oops.
Validate the returned range and the caller's minimum before allocating
the dynamic result. Keep the reported length zero if validation fails.
Use the security descriptor header size as the minimum in SMB2_query_acl().
DACL-only and SACL-only xattr queries do not require owner and group SIDs,
so enforcing MIN_SEC_DESC_LEN would reject short descriptors that these
queries could previously return. The rewrite paths validate the required
owner/group SIDs and DACL separately before using their contents.
These issues were discovered and fixed by Qihoo 360's Tulongfeng
multi-agent system.
Fixes: 9ee2afe5207b ("cifs: prevent copying past input buffer boundaries")
Cc: stable@vger.kernel.org
Signed-off-by: liuyong <pkfxxxing@gmail.com>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
