Skip to content

Conversation

@sumit-bose
Copy link
Contributor

If a client is joined to AD or IPA SSSD's localauth plugin can handle
the mapping of Kerberos principals to local accounts. In case it cannot
map the Kerberos principals libkrb5 is currently configured to fall back
to the default localauth plugins 'default', 'rule', 'names',
'auth_to_local', 'k5login' and 'an2ln' (see man krb5.conf for details).
All plugins except 'an2ln' require some explicit configuration by either
the administrator or the local user. To avoid some unexpected mapping is
done by the 'an2ln' plugin this patch disables it in the configuration
snippets for SSSD's localauth plugin.

Copy link

@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 correctly disables the an2ln Kerberos localauth plugin for AD/IPA providers to prevent unexpected principal-to-account mappings. The change in the C code is straightforward and effective. The accompanying Python tests validate the new behavior, but they could be improved for better portability and adherence to pytest best practices. I've added a couple of suggestions to make the tests more robust and readable.

@alexey-tikhonov
Copy link
Member

Could you please add an RN, including "Fixes CVE-2025-11561" (if I understand correctly and this indeed fully fixes this CVE)?

@alexey-tikhonov
Copy link
Member

Note: Covscan is green.

@alexey-tikhonov alexey-tikhonov removed the coverity Trigger a coverity scan label Oct 15, 2025
@alexey-tikhonov
Copy link
Member

@sumit-bose, could you please also add 'Resolves: #8021' to the commit message?

If a client is joined to AD or IPA SSSD's localauth plugin can handle
the mapping of Kerberos principals to local accounts. In case it cannot
map the Kerberos principals libkrb5 is currently configured to fall back
to the default localauth plugins 'default', 'rule', 'names',
'auth_to_local', 'k5login' and 'an2ln' (see man krb5.conf for details).
All plugins except 'an2ln' require some explicit configuration by either
the administrator or the local user. To avoid some unexpected mapping is
done by the 'an2ln' plugin this patch disables it in the configuration
snippets for SSSD's localauth plugin.

Resolves: SSSD#8021

:relnote: After startup SSSD already creates a Kerberos configuration
 snippet typically in /var/lib/sss/pubconf/krb5.include.d/localauth_plugin
 if the AD or IPA providers are used. This enables SSSD's localauth plugin.
 Starting with this release the an2ln plugin is disabled in the
 configuration snippet as well. If this file or its content are included in
 the Kerberos configuration it will fix CVE-2025-11561.
@sumit-bose
Copy link
Contributor Author

@sumit-bose, could you please also add 'Resolves: #8021' to the commit message?

Added in the latest version.

@alexey-tikhonov
Copy link
Member

Thank you, ACK.

@alexey-tikhonov
Copy link
Member

We agreed @sumit-bose will split this PR into 2: a product patch + a test.

@pbrezina
Copy link
Member

Hi, thank you for including the test. Would it be possible to add a test that actually tests the CVE, not just the configuration?

@sumit-bose
Copy link
Contributor Author

We agreed @sumit-bose will split this PR into 2: a product patch + a test.

Hi,

this PR now has only one commit with the product patch. The test is move to #8145.

bye,
Sumit

@sumit-bose
Copy link
Contributor Author

Hi, thank you for including the test. Would it be possible to add a test that actually tests the CVE, not just the configuration?

Hi,

I can see who hard/easy this would be. But if I find a way it will most probably be in a third PR.

bye,
Sumit

@alexey-tikhonov
Copy link
Member

Pushed PR: #8136

  • master
    • 9939c39 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-1-16
    • f2ea5cd - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-2-10
    • 9edd2b3 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-2-11
    • a08e586 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-2-8
    • a0336f4 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-2-9
    • e5224f0 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA
  • sssd-2-9-4
    • b25abc5 - krb5: disable Kerberos localauth an2ln plugin for AD/IPA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

potentially dangerous id mapping between local and domain users

3 participants