smb: client: fix slab-out-of-bounds write in id_mode_to_cifs_acl()
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix slab-out-of-bounds write in id_mode_to_cifs_acl() In id_mode_to_cifs_acl(), while the chown branch reserves sizeof(struct smb_ntsd) + 2 * sizeof(struct smb_sid) (plus sizeof(struct smb_acl) 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 smb_ace) or 5 * sizeof(struct smb_ace) to secdesclen (or 1 * sizeof(struct smb_ace) on posix). However, the chmod branch also invokes build_sec_desc() -> copy_sec_desc(), which unconditionally writes the Owner SID at pnntsd + sidsoffset and the Group SID at pnntsd + sidsoffset + sizeof(struct smb_sid) (2 * 68 = 136 bytes total), and set_chmod_dacl() always writes a struct smb_acl 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 smb_acl) + 2 * sizeof(struct smb_sid) (plus sizeof(struct smb_ntsd) on the posix path) in the chmod branch of id_mode_to_cifs_acl().
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before d1f14e890dff3b19fbc8dec1eb09f09c71ca69a8; from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before 773c30f94a027e6a0a9774906d6cff3902dbe15c; from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before 51e5772fdfc92a453995aba07ff2aa6e107b580d; from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before cde80904e285a7ac29ba2e06bc23a60b09b05f54; from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before ba57bfe1a9fa1566757cd3f3310ccdf88f4b7673; from 7ee0b4c635c091eb3c805977ba886bae2fd33f0c, before be1bcc9147facd85dc2ebe48688afde6d5590f10; and 1 more | d1f14e890dff3b19fbc8dec1eb09f09c71ca69a8; 773c30f94a027e6a0a9774906d6cff3902dbe15c; 51e5772fdfc92a453995aba07ff2aa6e107b580d; cde80904e285a7ac29ba2e06bc23a60b09b05f54 |
| Linux Linux | Software | 3.8 | not recorded |
The 8.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | Network | Can be attacked from anywhere on the internet, with no need to be near the target. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Required | A person has to do something first, such as open a file or visit a page. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 2.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 7 sources for this flaw, none tagged as a vendor patch.