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

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Published: 2024-09-13T05:29:23.506Z
- Modified: 2026-08-05T11:37:59.963Z
- Weaknesses: CWE-276
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 18032ca062e621e15683cb61c066ef3dc5414a7b before 2dbc4b7bac60b02cc6e70d05bf6a7dfd551f9dda; from 18032ca062e621e15683cb61c066ef3dc5414a7b before fe0cd53791119f6287b6532af8ce41576d664930; from 18032ca062e621e15683cb61c066ef3dc5414a7b before eebec98791d0137e455cc006411bb92a54250924; from 18032ca062e621e15683cb61c066ef3dc5414a7b before 459584258d47ec3cc6245a82e8a49c9d08eb8b57; from 18032ca062e621e15683cb61c066ef3dc5414a7b before f71ec019257ba4f7ab198bd948c5902a207bad96; from 18032ca062e621e15683cb61c066ef3dc5414a7b before 76a0e79bc84f466999fa501fce5bf7a07641b8a7; 3.11 (not affected: before 3.11; from 5.10.227 up to 5.10.*; from 5.15.168 up to 5.15.*; from 6.1.113 up to 6.1.*; from 6.6.49 up to 6.6.*; from 6.10.8 up to 6.10.*; from 6.11 up to *)
- linux linux_kernel: before 6.6.49; from 6.7 before 6.10.8; 6.11

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 4.4 Medium `CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N`

## References

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

## Sources

- CVE List: [CVE-2024-46695](https://www.cve.org/CVERecord?id=CVE-2024-46695), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-46695](https://nvd.nist.gov/vuln/detail/CVE-2024-46695), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-46695 · Whole record: https://cve.day/CVE-2024-46695.json · Rebuilt by cve.day 2026-11-25T22:58:45.382Z
