CVE-2024-46695: selinux,smack: don't bypass permissions check in inode_setsecctx hook
In the Linux kernel, the following vulnerability has been resolved:
selinux,smack: don't bypass permissions check in inode_setsecctx hook
Marek Gresko reports that the root user on an NFS client is able to
change the security labels on files on an NFS filesystem that is
exported with root squashing enabled.
The end of the kerneldoc comment for __vfs_setxattr_noperm() states:
* This function requires the caller to lock the inode's i_mutex before it
* is executed. It also assumes that the caller will make the appropriate
* permission checks.
nfsd_setattr() does do permissions checking via fh_verify() and
nfsd_permission(), but those don't do all the same permissions checks
that are done by security_inode_setxattr() and its related LSM hooks do.
Since nfsd_setattr() is the only consumer of security_inode_setsecctx(),
simplest solution appears to be to replace the call to
__vfs_setxattr_noperm() with a call to __vfs_setxattr_locked(). This
fixes the above issue and has the added benefit of causing nfsd to
recall conflicting delegations on a file when a client tries to change
its security label.
Security readout for executives and security teams
Plain-English summary
A root user on an allowed NFS client may alter SELinux or Smack security labels on files even when the server uses root squashing. Because these labels enforce access controls, unauthorized changes could weaken protection or disrupt workloads. The supplied 9.8 score is severe, but practical risk concentrates on affected NFS environments using security labels.
Executive priority
Treat this as urgent for NFS servers using SELinux or Smack, especially sensitive shared storage. Confirm exposure and patch through supported kernel packages promptly. Organizations without NFS exports or relevant labeling have lower practical exposure, but should document that conclusion rather than relying only on the headline score.
Technical view
The NFS server security-context path used a no-permission extended-attribute helper without performing the complete checks expected from SELinux and Smack hooks. Consequently, root squashing did not prevent a client-side root user from changing file security labels. The upstream correction uses the locked extended-attribute path, restoring permission checks and recalling conflicting file delegations.
Likely exposure
Likely exposure is limited to NFS servers running affected Linux kernels, serving reachable exports, and relying on SELinux or Smack file labels. Root-squashed exports are specifically implicated. The supplied version data is ambiguous, so distribution backport status and applicable stable commits must determine exposure.
Exploitation context
The bundle provides no evidence of active exploitation and marks KEV false. Abuse requires access to a vulnerable NFS export from a client where the attacker controls root. The sources do not establish public exploit availability or observed campaigns.
Researcher notes
The affected-version data mixes release numbers and commit identifiers and is not a reliable fixed-version table. Determine status from the running distribution's advisory or backport record and the applicable upstream stable commit. The supplied description also states that the fix recalls conflicting delegations during label changes.
Mitigation direction
Upgrade to a vendor-supported kernel containing the applicable stable fix for CVE-2024-46695.
Follow the Linux distributor's advisory to confirm the correct patched package or backport.
Until patched, restrict NFS access to trusted clients and tightly limit reachable NFS services.
Investigate unauthorized or unexpected changes to SELinux or Smack labels on exported files.
Validation and detection
Inventory kernel versions on NFS servers and compare them with vendor advisories and listed stable commits.
Identify root-squashed NFS exports whose files are protected by SELinux or Smack labels.
Confirm installed kernels include applicable fixes or distributor backports; version strings alone may not prove remediation.
Review security and NFS audit records for unexpected label changes originating from client activity.
After patching, perform an authorized regression test confirming client root cannot alter protected security labels.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-46695 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.