Fix: Fixes mount problems with Kerberos after cifs-utils update #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Resolve mount issues with Kerberos (sec=krb5) after cifs-utils update
Problem Description
Since a recent update to the
cifs-utils
package, which includes the security fix for CVE-2025-2312, CIFS mounts using Kerberos authentication (sec=krb5
) are failing on our Linux clients.This manifests as the following error messages in the kernel log (
dmesg
):The mount command, which is executed in the background upon login, fails.
Root Cause Analysis
The issue is caused by an unfortunate interaction between the default behavior of Kerberos and a deliberate change in
cifs-utils
:Kerberos: By default, newer versions of Kerberos create a credential cache with a random suffix (e.g.,
/tmp/krb5cc_215604408_aBcXyZ
) to avoid collisions between multiple concurrent sessions. This behavior has existed for some time but was previously tolerated bycifs-utils
.cifs-utils (post-CVE-2025-2312): To address a security vulnerability, the
cifs.upcall
helper program was hardened. The previous "smart" behavior of scanning the/tmp
directory for matching cache files (krb5cc_<UID>*
) has been removed.cifs.upcall
now strictly and exclusively looks for the fixed path without a suffix (e.g.,FILE:/tmp/krb5cc_215604408
).Conclusion: Kerberos creates a cache with a suffix, but
cifs.upcall
looks for one without. As a result, the cache is not found, and authentication fails.The Solution
This PR fixes the issue by adjusting the Kerberos configuration (
/etc/krb5.conf
). This instructs Kerberos to revert to using a fixed cache path without a suffix, which matches the expectations of the hardenedcifs.upcall
.The following configuration is added to the
[libdefaults]
section of/etc/krb5.conf
:Considerations and Rationale
This solution deliberately restores an older Kerberos behavior. This is a pragmatic compromise, as it is currently the only reliable method to ensure compatibility with the security-hardened
cifs-utils
package.The disadvantage of this approach (the risk of cache collisions with several simultaneous sessions of the same user) can be neglected for the typical use case of a desktop client in my opinion. In this context, restoring the functionality of Kerberos mounts has higher priority.