ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8f0541186e9ad1b62accc9519cc2b7a7240272a7 · < 79decd88dd3f0d42e7fb0689b1a7853bfa302459| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ksmbd: bound smb_check_perm_dacl() ACE walks by DACL size
smb_check_perm_dacl() validates that the DACL fits inside the NT security descriptor, but then bounds its two ACE walks by the remaining NTSD length (acl_size) rather than the DACL's declared size (pdacl_size).
When pdacl->size is smaller than the trailing NTSD buffer, bytes after the declared DACL boundary - still inside the stored security descriptor - are parsed as ACEs during access checks. A crafted DACL can place an access-granting ACE beyond pdacl->size, and the current code accepts it during SMB2_CREATE access validation, while parse_dacl() and smb_inherit_dacl() stop at pdacl_size.
Bound both ACE walks by pdacl_size to match the DACL boundary semantics used elsewhere in the server.
Validation: - semantic KUnit harness shows the post-boundary ACE is selected before the fix and rejected (EACCES) after it - linux master (7.2-rc6), x86_64
From the CVE record · Linux
Linux kernel ksmbd can read beyond a DACL's declared boundary while checking permissions, treating an access-granting ACE outside that boundary as valid. An attacker who can supply a crafted DACL may gain access during SMB2_CREATE validation; the input does not specify authentication or user-interaction requirements.
Administrators running Linux systems with ksmbd should check their kernel versions; affected versions are not specified.