smb: client: validate dacloffset before building DACL pointers
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bc3e9dd9d104ca1b75644eab87b38ce8a924aef4 · < 8bd07e417b6bda67e317920584e48cb6ee442a8a| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: validate dacloffset before building DACL pointers
parse_sec_desc(), build_sec_desc(), and the chown path in id_mode_to_cifs_acl() all add the server-supplied dacloffset to pntsd before proving a DACL header fits inside the returned security descriptor.
On 32-bit builds a malicious server can return dacloffset near U32_MAX, wrap the derived DACL pointer below end_of_acl, and then slip past the later pointer-based bounds checks. build_sec_desc() and id_mode_to_cifs_acl() can then dereference DACL fields from the wrapped pointer in the chmod/chown rewrite paths.
Validate dacloffset numerically before building any DACL pointer and reuse the same helper at the three DACL entry points.
From the CVE record · Linux
On 32-bit builds, the SMB client constructs DACL pointers from a server-supplied offset before checking that the DACL header fits in the returned security descriptor. A malicious SMB server can use an offset that wraps the pointer and passes later bounds checks, allowing the chmod/chown rewrite paths to dereference DACL fields at the wrapped address.
Administrators running Linux kernels with the SMB client on 32-bit builds should check their systems; affected versions were not specified.