Skip to content

NAS-141193 / 26.0.0-RC.1 / smb: client: reject userspace cifs.spnego descriptions (by anodos325)#285

Merged
yocalebo merged 1 commit into
stable/26from
NAS-141193-26.0.0-RC.1
May 29, 2026
Merged

NAS-141193 / 26.0.0-RC.1 / smb: client: reject userspace cifs.spnego descriptions (by anodos325)#285
yocalebo merged 1 commit into
stable/26from
NAS-141193-26.0.0-RC.1

Conversation

@bugclerk

Copy link
Copy Markdown

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

Original PR: #283

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>
(cherry picked from commit b9dda59)
@bugclerk

Copy link
Copy Markdown
Author

@yocalebo yocalebo merged commit a65cf93 into stable/26 May 29, 2026
6 checks passed
@yocalebo yocalebo deleted the NAS-141193-26.0.0-RC.1 branch May 29, 2026 11:42
@bugclerk

Copy link
Copy Markdown
Author

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators May 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants