diff options
| author | Aohan Mei <henrymei@tencent.com> | 2026-09-02 20:52:13 +0800 |
|---|---|---|
| committer | Paulo Alcantara <pc@manguebit.org> | 2026-09-02 20:24:25 -0300 |
| commit | d9d7eeb0cea5b55b82888f443622fd8d4ee064f3 (patch) | |
| tree | aba6333851113b1446f8ee53a2742b96e586fba9 /scripts/basic/split-include.c | |
| parent | 5be5bdda5863eacc964b609ba927764f253431b3 (diff) | |
| download | linux-d9d7eeb0cea5b55b82888f443622fd8d4ee064f3.tar.gz linux-d9d7eeb0cea5b55b82888f443622fd8d4ee064f3.zip | |
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.
Fixes: 4d79dba0e007 ("cifs: Add idmap key and related data structures and functions (try #17 repost)")
Reported-by: TencentOS Corvus AI <corvus@tencent.com>
Cc: stable@vger.kernel.org
Assisted-by: CodeBuddy:Kimi-K3
Signed-off-by: Aohan Mei <henrymei@tencent.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paulo Alcantara <pc@manguebit.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
