CVE-2008-3825: Medium severity red hat enterprise linux vulnerability
pamkrb5 2.2.14 in Red Hat Enterprise Linux (RHEL) 5 and earlier, when the existingticket option is enabled, uses incorrect privileges when reading a Kerberos credential cache, which allows local users to gain privileges by setting the KRB5CCNAME environment variable to an arbitrary cache filename and running the (1) su or (2) sudo program. NOTE: there may be a related vector involving sshd that has limited relevance.
Other sources
This bug was reported to us by Stéphane BERTIN.
The pamkrb5 module does not verify that the user has permission to read from the credential cache via the existingticket option.
From the mail Stéphane sent:
I failed to open SSH session with existingticket option.
I used these options to configure pamkrb5 : auth sufficient pamkrb5.so tryfirstpass minimumuid=1 useshmem=sshd existingticket validate=sshd debug
...
Extract from manual page : "existingticket tells pamkrb5.so to accept the presence of pre-existing Kerberos credentials provided by the calling application in the default credential cache as sufficient to authenticate the user, and to skip any account management checks. DANGER! Unless validation is also in use, it is relatively easy to produce a credential cache which looks "good enough" to fool pamkrb5.so."
I use validate=sshd like it is recommended but it seems danger is around ...
I notice two things : 1) the module try twice to get credential see logs "trying existing credentials" but don't try with user password and the session failed to be opened. (that's why I have written the bug report)
2) User try to open SSH session so he doesn't already have credentials and his variable KRB5CCNAME is not defined. By default module try to get credentials on file /tmp/krb5cc0. The root credential file !!! I don't know why but root credential file doesn't have the same format krb5cc0XXXXX.
So if root ask a ticket for user TEST and get credential what happens ... If you know which credential is used by root you can open a session without to know password !!!!
Acknowledgements:
Red Hat would like to thank Stéphane Bertin for responsibly disclosing this issue.
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2008-3825?
CVE-2008-3825 is classified as a high severity vulnerability due to the potential for privilege escalation.
How do I fix CVE-2008-3825?
To fix CVE-2008-3825, it's recommended to upgrade to a patched version of pam_krb5 or disable the existing_ticket option.
Who is affected by CVE-2008-3825?
CVE-2008-3825 affects users of Red Hat Enterprise Linux 5 and earlier versions with pam_krb5 installed.
What type of vulnerability is CVE-2008-3825?
CVE-2008-3825 is a local privilege escalation vulnerability.
Can CVE-2008-3825 be exploited remotely?
No, CVE-2008-3825 requires local access to exploit the vulnerability.