-
Notifications
You must be signed in to change notification settings - Fork 8
Fix: Fixes mount problems with Kerberos after cifs-utils update #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for the detailed description. |
|
Hi @ks98 Sorry for the long delay ... I tried on my test system and I can not reproduce the problem: So, the client (Ubuntu Noble) doesn't seem to have problem to mount the shares with the Looking at the errno.h errors codes, depending on your kernel, it could be various reasons like:
Maybe it could be hint to understand what is going on ? Regards Arnaud |
|
@HappyBasher please explain your reasoning for merging! Were you able to reproduce it? How? |
|
I reproduced it on a Debian 12 client with a lmn 7.3 server, which was not able to login until |
|
It works for me too on a 24.04 client, so I don't see any breaking change. |
Fix: Resolve mount issues with Kerberos (sec=krb5) after cifs-utils update
Problem Description
Since a recent update to the
cifs-utilspackage, 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.upcallhelper program was hardened. The previous "smart" behavior of scanning the/tmpdirectory for matching cache files (krb5cc_<UID>*) has been removed.cifs.upcallnow 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.upcalllooks 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-utilspackage.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.