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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-05-19 · Modified: 2026-10-30
- Aliases: UBUNTU-CVE-2024-35904, DEBIAN-CVE-2024-35904
- Record: https://cvemate.com/vulnerability/CVE-2024-35904 · JSON: https://cvemate.com/vulnerability/CVE-2024-35904/json

## Description

```text
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.
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.229%, percentile 14.658%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 122)

- debian linux (Debian): All versions (No fix recorded) \| \< 6.1.192-1 \| \< 6.8.9-1
- ubuntu linux (Ubuntu): \< 5.4.0-202.222 \| \< 5.15.0-127.137 \| \< 6.8.0-38.38
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 5.4.0-1136.146 \| \< 5.15.0-1073.79 \| \< 6.8.0-1011.12
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): \< 5.15.0-1073.79~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1136.146~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1011.12~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 5.4.0-1136.146+fips1 \| All versions (No fix recorded) \| \< 5.15.0-1073.79+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 5.4.0-1142.149 \| \< 5.15.0-1078.87 \| \< 6.8.0-1010.10
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.15 (Ubuntu): \< 5.15.0-1078.87~20.04.1

## References (first 20 of 28)

- <https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e>
- <https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c>
- <https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b>
- <http://www.openwall.com/lists/oss-security/2024/05/30/2>
- <http://www.openwall.com/lists/oss-security/2024/05/30/1>
- <https://ubuntu.com/security/CVE-2024-35904>
- <https://www.cve.org/CVERecord?id=CVE-2024-35904>
- <https://git.kernel.org/linus/37801a36b4d68892ce807264f784d818f8d0d39b>
- <https://ubuntu.com/security/notices/USN-6893-1>
- <https://ubuntu.com/security/notices/USN-6893-2>
- <https://ubuntu.com/security/notices/USN-6893-3>
- <https://ubuntu.com/security/notices/USN-6918-1>
- <https://ubuntu.com/security/notices/USN-7159-1>
- <https://ubuntu.com/security/notices/USN-7159-2>
- <https://ubuntu.com/security/notices/USN-7166-1>
- <https://ubuntu.com/security/notices/USN-7166-2>
- <https://ubuntu.com/security/notices/USN-7159-3>
- <https://ubuntu.com/security/notices/USN-7159-4>
- <https://ubuntu.com/security/notices/USN-7166-3>
- <https://ubuntu.com/security/notices/USN-7159-5>

---

Data as of 2026-12-05T06:57:50.858Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
