# CVE-2024-46695: selinux,smack: don't bypass permissions check in inode\_setsecctx hook

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.85% (percentile 56, 2026-11-26)
- **CWE:** CWE-276
- **Published:** 2024-09-13T05:29:23.506Z
- **Modified:** 2026-08-05T11:37:59.963Z

## Who should check

- Anyone running Linux \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< fe0cd53791119f6287b6532af8ce41576d664930; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< eebec98791d0137e455cc006411bb92a54250924; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 459584258d47ec3cc6245a82e8a49c9d08eb8b57; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< f71ec019257ba4f7ab198bd948c5902a207bad96; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 76a0e79bc84f466999fa501fce5bf7a07641b8a7
- Anyone running Linux 3.11

## Description

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.

## Affected and fixed versions

- Linux: \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< fe0cd53791119f6287b6532af8ce41576d664930; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< eebec98791d0137e455cc006411bb92a54250924; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 459584258d47ec3cc6245a82e8a49c9d08eb8b57; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< f71ec019257ba4f7ab198bd948c5902a207bad96; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 76a0e79bc84f466999fa501fce5bf7a07641b8a7 (cvelist)
- Linux: 3.11 (cvelist)

## Mitigation

- Upgrade Linux to 76a0e79bc84f466999fa501fce5bf7a07641b8a7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-46695. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46695.md
Affected: Linux >= 18032ca062e621e15683cb61c066ef3dc5414a7b, < 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda; >= 18032ca062e621e15683cb61c066ef3dc5414a7b, < fe0cd53791119f6287b6532af8ce41576d664930; >= 18032ca062e621e15683cb61c066ef3dc5414a7b, < eebec98791d0137e455cc006411bb92a54250924; >= 18032ca062e621e15683cb6…
Fixed in: Linux 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda, Linux 459584258d47ec3cc6245a82e8a49c9d08eb8b57, Linux 76a0e79bc84f466999fa501fce5bf7a07641b8a7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-46695 being exploited?

There is no confirmed exploitation: CVE-2024-46695 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.85% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-46695?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-46695?

Linux \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< fe0cd53791119f6287b6532af8ce41576d664930; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< eebec98791d0137e455cc006411bb92a54250924; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 459584258d47ec3cc6245a82e8a49c9d08eb8b57; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< f71ec019257ba4f7ab198bd948c5902a207bad96; \>= 18032ca062e621e15683cb61c066ef3dc5414a7b, \< 76a0e79bc84f466999fa501fce5bf7a07641b8a7; Linux 3.11.

### Is there a fix for CVE-2024-46695?

Yes. Fixed in Linux 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda, Linux 459584258d47ec3cc6245a82e8a49c9d08eb8b57, Linux 76a0e79bc84f466999fa501fce5bf7a07641b8a7. Upgrade Linux to 76a0e79bc84f466999fa501fce5bf7a07641b8a7 or later.

### How do I check if I'm affected by CVE-2024-46695?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/459584258d47ec3cc6245a82e8a49c9d08eb8b57>
- patch: <https://git.kernel.org/stable/c/f71ec019257ba4f7ab198bd948c5902a207bad96>
- patch: <https://git.kernel.org/stable/c/76a0e79bc84f466999fa501fce5bf7a07641b8a7>
- other: <https://git.kernel.org/stable/c/2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda>
- other: <https://git.kernel.org/stable/c/fe0cd53791119f6287b6532af8ce41576d664930>
- other: <https://git.kernel.org/stable/c/eebec98791d0137e455cc006411bb92a54250924>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-46695>

HTML: <https://flawdb.com/CVE-2024-46695> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-46695>
