]> git.ipfire.org Git - thirdparty/linux.git/commit
smb: client: reject userspace cifs.spnego descriptions
authorAsim Viladi Oglu Manizada <manizada@pm.me>
Sat, 16 May 2026 21:15:39 +0000 (21:15 +0000)
committerSteve French <stfrench@microsoft.com>
Tue, 19 May 2026 15:43:05 +0000 (10:43 -0500)
commit3da1fdf4efbc490041eb4f836bf596201203f8f2
tree89ee4df06440479ec90ce10bca8ac5a7e133bd6f
parent4d8690dace005a38e6dbde9ecce2da3ad85c7c41
smb: client: reject userspace cifs.spnego descriptions

cifs.spnego key descriptions contain authority-bearing fields such as
pid, uid, creduid, and upcall_target that cifs.upcall treats as
kernel-originating inputs. However, userspace can also create keys of
this type through request_key(2) or add_key(2), allowing those fields to
be supplied without CIFS origin.

Only accept cifs.spnego descriptions while CIFS is using its private
spnego_cred to request the key.

Fixes: f1d662a7d5e5 ("[CIFS] Add upcall files for cifs to use spnego/kerberos")
Assisted-by: avom-custom-harness:gpt-5.5-qwen3.6-mod-mix
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Asim Viladi Oglu Manizada <manizada@pm.me>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifs_spnego.c