Linux SMB client heap overflow in ACL conversion
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix heap overflow in cifs_do_set_acl()
cifs_set_acl() validates ACL size using posix_acl_xattr_size():
4 + (count * 8) // 4-byte header + 8 bytes per ACE
cifs_do_set_acl() then calls posix_acl_to_cifs() to write the CIFS wire format into the same buffer:
6 + (count * 10) // 6-byte header + 10 bytes per ACE
An ACL that passes the xattr-based check in cifs_set_acl() can overflow the heap when posix_acl_to_cifs() writes the larger CIFS format.
Validate the CIFS format size against the remaining buffer space and USHRT_MAX before converting--data_count is __u16, so sizes above USHRT_MAX truncate the on-wire packet length, causing the server to apply a partial ACL. Replace MaxDataCount = 1000 with min(CIFSMaxBufSize, USHRT_MAX).
From the CVE record · Linux
The Linux kernel SMB client checks ACL size using a smaller format than the one it writes, allowing an ACL that passes validation to overflow a heap buffer during conversion. The issue occurs when setting an ACL; the input does not specify attacker access requirements or whether user interaction is needed. Oversized converted ACLs can also truncate the on-wire length, causing the server to apply a partial ACL.
Engineers running Linux systems that use the kernel SMB client should check their kernel version against the vendor advisory; affected versions are not specified.