Skip to content

smb: client: reject userspace cifs.spnego descriptions#291

Merged
ixhamza merged 1 commit into
truenas/linux-6.12from
sync-6.12
Jun 9, 2026
Merged

smb: client: reject userspace cifs.spnego descriptions#291
ixhamza merged 1 commit into
truenas/linux-6.12from
sync-6.12

Conversation

@ixhamza

@ixhamza ixhamza commented Jun 9, 2026

Copy link
Copy Markdown
Member

#283 is already present in the release/25.10.4 branch; this is just a minor backport to keep both branches in sync.

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: f1d662a ("[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

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: f1d662a ("[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>
@ixhamza ixhamza requested review from amotin and anodos325 June 9, 2026 18:26
@ixhamza ixhamza merged commit 821b9ef into truenas/linux-6.12 Jun 9, 2026
6 checks passed
@ixhamza ixhamza deleted the sync-6.12 branch June 9, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants