ksmbd: use check_add_overflow() to prevent u16 DACL size overflow
- 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.1.175, 6.6.136, 6.12.84, 6.18.25, 7.0.2
- 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
In the Linux kernel, the following vulnerability has been resolved: ksmbd: use check_add_overflow() to prevent u16 DACL size overflow set_posix_acl_entries_dacl() and set_ntacl_dacl() accumulate ACE sizes in u16 variables. When a file has many POSIX ACL entries, the accumulated size can wrap past 65535, causing the pointer arithmetic (char *)pndace + *size to land within already-written ACEs. Subsequent writes then overwrite earlier entries, and pndacl->size gets a truncated value. Use check_add_overflow() at each accumulation point to detect the wrap before it corrupts the buffer, consistent with existing check_mul_overflow() usage elsewhere in smbacl.c.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in 41e53a773db6342ac9a689ee5ba635c31744c9f0; From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in 8d5729350b236896f51379588d9a690b7fafb8db; From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in e1955a94b6f17f4b058afa955a6f187eb3ed7615; From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in 5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43; From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7; From e2f34481b24db2fd634b5edb0a5bd0e4d38cc6e9 · fixed in 299f962c0b02d048fb45d248b4da493d03f3175d
- Linux Linux
5.15
- KernelLinux
From 5.15.0 · fixed in 6.1.175; From 6.2.0 · fixed in 6.6.136; From 6.7.0 · fixed in 6.12.84; From 6.13.0 · fixed in 6.18.25; From 6.19.0 · fixed in 7.0.2