{"id":"CVE-2024-35904","state":"PUBLISHED","title":"selinux: avoid dereference of garbage after mount failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: avoid dereference of garbage after mount failure\n\nIn case kern_mount() fails and returns an error pointer return in the\nerror branch instead of continuing and dereferencing the error pointer.\n\nWhile on it drop the never read static variable selinuxfs_mount.","publishedAt":"2024-05-19T08:34:57.351Z","updatedAt":"2026-10-30T12:18:19.710Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"563e631a18c5b2bbab674a58154bcf41a6d90f13","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"477ed6789eb9f3f4d3568bb977f90c863c12724e","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"68784a5d01b8868ff85a7926676b6729715fff3c","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"37801a36b4d68892ce807264f784d818f8d0d39b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/selinux/selinuxfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/selinux/selinuxfs.c"]}],"references":["https://git.kernel.org/stable/c/563e631a18c5b2bbab674a58154bcf41a6d90f13","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"],"weaknesses":[],"ingestedAt":"2026-10-30T12:34:06.950Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35904.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35904","state":"PUBLISHED","datePublished":"2024-05-19T08:34:57.351Z","dateUpdated":"2026-10-30T12:18:19.710Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-17T13:50:33.115Z"},"containers":{"cna":{"title":"selinux: avoid dereference of garbage after mount failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: avoid dereference of garbage after mount failure\n\nIn case kern_mount() fails and returns an error pointer return in the\nerror branch instead of continuing and dereferencing the error pointer.\n\nWhile on it drop the never read static variable selinuxfs_mount."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"563e631a18c5b2bbab674a58154bcf41a6d90f13","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"477ed6789eb9f3f4d3568bb977f90c863c12724e","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"68784a5d01b8868ff85a7926676b6729715fff3c","versionType":"git"},{"version":"0619f0f5e36f12e100ef294f5980cfe7c93ff23e","status":"affected","lessThan":"37801a36b4d68892ce807264f784d818f8d0d39b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/selinux/selinuxfs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.17","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["security/selinux/selinuxfs.c"]}],"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"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:18:19.710Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.6.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.8.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.17","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-35904","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-20T14:08:38.593035Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:34:43.960Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/477ed6789eb9f3f4d3568bb977f90c863c12724e","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/68784a5d01b8868ff85a7926676b6729715fff3c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/37801a36b4d68892ce807264f784d818f8d0d39b","tags":["x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/05/30/2","tags":["x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/05/30/1","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:21:48.799Z"}}]}}}