---
id: CVE-2024-35904
title: 'selinux: avoid dereference of garbage after mount failure'
summary: |-
  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 …
severity: none
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e <
    563e631a18c5b2bbab674a58154bcf41a6d90f13
  - >-
    Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e <
    477ed6789eb9f3f4d3568bb977f90c863c12724e
  - >-
    Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e <
    68784a5d01b8868ff85a7926676b6729715fff3c
  - >-
    Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e <
    37801a36b4d68892ce807264f784d818f8d0d39b
  - Linux 4.17
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2024-05-20T14:08:38.593035Z'
published: '2024-05-19'
updated: '2026-10-30'
sourceUpdated: '2026-10-30T12:18:19.710Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-35904'
references:
  - url: 'https://git.kernel.org/stable/c/563e631a18c5b2bbab674a58154bcf41a6d90f13'
  - url: 'https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e'
  - url: 'https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c'
  - url: 'https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b'
tags:
  - cve.org
epss: 0.00229
epssPercentile: 0.13707
ingestedAt: '2026-11-03T12:44:28.810Z'
---

## Overview

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.

## Affected

- `Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e < 563e631a18c5b2bbab674a58154bcf41a6d90f13`
- `Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e < 477ed6789eb9f3f4d3568bb977f90c863c12724e`
- `Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e < 68784a5d01b8868ff85a7926676b6729715fff3c`
- `Linux >= 0619f0f5e36f12e100ef294f5980cfe7c93ff23e < 37801a36b4d68892ce807264f784d818f8d0d39b`
- `Linux 4.17`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
