smb: client: reject userspace cifs.idmap descriptions
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4d79dba0e00749fa40de8ef13a9b85ce57a1603b · < 96751028c0d4dec785709ea3eb0ab38a4f2ded96| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: reject userspace cifs.idmap descriptions
cifs.idmap key descriptions carry authority-bearing fields (owner and group SIDs and uid/gid values in "os:"/"gs:"/"oi:"/"gi:" form) that the cifs.idmap upcall helper treats as kernel-originating inputs. Unlike its sibling cifs.spnego, the cifs.idmap key type has no vet_description hook, so userspace can create keys of this type through request_key(2)/add_key(2) and supply those fields without CIFS origin. A request_key(2) call with a non-NULL callout then drives a root usermodehelper upcall (/sbin/request-key -> cifs.idmap) that consumes the unvetted description in root context.
Only accept cifs.idmap descriptions while CIFS is using its private root_cred to request the key. id_to_sid()/sid_to_id() already run under override_creds(root_cred), so the kernel-originated path is unaffected.
This mirrors commit 3da1fdf4efbc ("smb: client: reject userspace cifs.spnego descriptions"), which applied the same restriction to cifs.spnego.
From the CVE record · Linux
The Linux kernel’s cifs.idmap key type accepts descriptions supplied by local userspace without verifying that they originated from CIFS. A local attacker can use request_key(2) with a non-NULL callout to make a root-context cifs.idmap helper consume attacker-supplied fields; no separate authentication or user interaction is described.
Operators running the Linux kernel with the affected cifs.idmap key handling should check their kernel’s status; affected versions are not specified.