smb: client: fix heap overflow in cifs_do_set_acl()
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 6.18.59, 7.2.13
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
A heap buffer overflow in the Linux kernel's CIFS/SMB client (the cifs_do_set_acl() ACL-setting path) can occur when a crafted access control list is written in a larger wire format than the buffer was validated for. The flaw can corrupt kernel memory and can also cause a truncated ACL to be sent to the server, potentially leading to incorrect file permissions.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
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).
Timeline
- CVE published
- First seen by cve.now
- Record last updated
Affected versions
- Linux Linux
Version range not reported
- Linux Linux
6.2
- KernelLinux
From 6.2.0 · fixed in 6.18.59; From 6.19.0 · fixed in 7.2.13