Skip to content

[autobackport: sssd-2-13] pam: handle protected authentication path#8698

Merged
alexey-tikhonov merged 5 commits into
SSSD:sssd-2-13from
sssd-bot:SSSD-sssd-backport-pr8599-to-sssd-2-13
May 11, 2026
Merged

[autobackport: sssd-2-13] pam: handle protected authentication path#8698
alexey-tikhonov merged 5 commits into
SSSD:sssd-2-13from
sssd-bot:SSSD-sssd-backport-pr8599-to-sssd-2-13

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8599 pam: handle protected authentication path to branch sssd-2-13, created by @sumit-bose.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8599-to-sssd-2-13
git checkout SSSD-sssd-backport-pr8599-to-sssd-2-13
git push sssd-bot SSSD-sssd-backport-pr8599-to-sssd-2-13 --force

Original commits
d6483bb - p11_child: ignore failure of C_GetTokenInfo
016bc7a - pam: handle protected authentication path
f3aea67 - authtok: remove sss_authtok_set_sc_keypad()
084268f - pam_sss: fix potential memory leak
50a3838 - pam: refactor pack_cert_data

Backported commits

  • a6fcb8f - p11_child: ignore failure of C_GetTokenInfo
  • e12e4cd - pam: handle protected authentication path
  • f2cda04 - authtok: remove sss_authtok_set_sc_keypad()
  • 458fbf0 - pam_sss: fix potential memory leak
  • ca6e842 - pam: refactor pack_cert_data

Original Pull Request Body

If a Smartcard reader has a built-in keypad or keyboard the flag
CKF_PROTECTED_AUTHENTICATION_PATH is set in the token info data. To
properly tell the user that the pin must be given at the reader directly
and not at the computer this information must be propagated to the
pam_sss module.

Resolves: #5371

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements support for the PKCS#11 protected authentication path. The changes allow p11_child to detect the CKF_PROTECTED_AUTHENTICATION_PATH flag and pass it to the PAM responder, which then informs the SSSD client to use an external keypad prompt and PAM_TEXT_INFO message style instead of a standard PIN prompt. The PR also includes security improvements such as secure memory erasure for GDM extension responses and the adoption of safealign_memcpy for packing certificate data. I have no feedback to provide.

@alexey-tikhonov alexey-tikhonov removed the request for review from pbrezina May 11, 2026 20:04
@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Accepted labels May 11, 2026
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit d6483bb)
If a Smartcard reader has a built-in keypad or keyboard the flag
CKF_PROTECTED_AUTHENTICATION_PATH is set in the token info data. To
properly tell the user that the pin must be given at the reader directly
and not at the computer this information must be propagated to the
pam_sss module.

Resolves: SSSD#5371
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 016bc7a)
sss_authtok_set_sc_keypad() does not set which token and certificate
should be used for authentication, just using sss_authtok_set_sc() with
SSS_AUTHTOK_TYPE_SC_KEYPAD as type is sufficient.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit f3aea67)
In case the conversation callback allocates memory for a reply we have
to free it.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 084268f)
Use safealign_memcpy() instead of plain memcpy() and add a consistency
check.

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 50a3838)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-44-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr8599-to-sssd-2-13 branch from ca6e842 to 7312420 Compare May 11, 2026 20:05
@alexey-tikhonov alexey-tikhonov merged commit 8c59fa3 into SSSD:sssd-2-13 May 11, 2026
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants