# CVE-2024-35904: selinux: avoid dereference of garbage after mount failure

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2024-05-19T08:34:57.351Z
- Modified: 2026-10-30T13:17:26.900Z
- Weaknesses: CWE-476
- 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: avoid dereference of garbage after mount failure

In case kern_mount() fails and returns an error pointer return in the
error branch instead of continuing and dereferencing the error pointer.

While on it drop the never read static variable selinuxfs_mount.

(As written by CVE List.)

## Affected

- Linux Linux: from 0619f0f5e36f12e100ef294f5980cfe7c93ff23e before 563e631a18c5b2bbab674a58154bcf41a6d90f13; from 0619f0f5e36f12e100ef294f5980cfe7c93ff23e before 477ed6789eb9f3f4d3568bb977f90c863c12724e; from 0619f0f5e36f12e100ef294f5980cfe7c93ff23e before 68784a5d01b8868ff85a7926676b6729715fff3c; from 0619f0f5e36f12e100ef294f5980cfe7c93ff23e before 37801a36b4d68892ce807264f784d818f8d0d39b; 4.17 (not affected: before 4.17; from 6.1.191 up to 6.1.*; from 6.6.26 up to 6.6.*; from 6.8.5 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: from 4.17 before 6.6.26; from 6.7 before 6.8.5; 6.9

## References

- <https://git.kernel.org/stable/c/563e631a18c5b2bbab674a58154bcf41a6d90f13>
- <https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e> (patch)
- <https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c> (patch)
- <https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b> (patch)
- <http://www.openwall.com/lists/oss-security/2024/05/30/2> (mailing-list)
- <http://www.openwall.com/lists/oss-security/2024/05/30/1> (mailing-list)

## Sources

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

---

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