CVE-2026-99292: smb: client: fix slab-out-of-bounds write in id_mode_to_cifs_acl()
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix slab-out-of-bounds write in idmodetocifsacl()
In idmodetocifsacl(), while the chown branch reserves sizeof(struct smbntsd) + 2 sizeof(struct smbsid) (plus sizeof(struct smbacl) and the worst-case ACE space after commit 0ee150794c75 ("smb: client: fix heap overflow in DACL owner/group rewrite")), the chmod branch only adds 2 sizeof(struct smbace) or 5 sizeof(struct smbace) to secdesclen (or 1 sizeof(struct smbace) on posix).
However, the chmod branch also invokes buildsecdesc() -> copysecdesc(), which unconditionally writes the Owner SID at pnntsd + sidsoffset and the Group SID at pnntsd + sidsoffset + sizeof(struct smbsid) (2 68 = 136 bytes total), and setchmoddacl() always writes a struct smbacl header (8 bytes) even when the source descriptor has dacloffset == 0. When a security descriptor has compact or overlapping Owner/Group SIDs (or dacloffset == 0), calling chmod() under-allocates pnntsd and writes past the end of the slab buffer.
Reserve sizeof(struct smbacl) + 2 sizeof(struct smbsid) (plus sizeof(struct smbntsd) on the posix path) in the chmod branch of idmodetocifsacl().