CVE-2024-35895
MediumIn the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Prevent lock inversion deadlock in map delete elem syzkaller started using corpuses where a BPF tracing program deletes elements from a sockmap/sockhash map. Because BPF tracing programs can be invoked from any interrupt context, locks taken during a map_delete_elem operation must be hardirq-safe. Otherwise a deadlock due to lock inversion is possible, as reported by lockdep: CPU0 CPU1 ---- ---- lock(&htab->buckets[i].lock); local_irq_disable(); lock(&host->lock); lock(&htab->buckets[i].lock); <Interrupt> lock(&host->lock); Locks in sockmap are hardirq-unsafe by design. We expects elements to be deleted from sockmap/sockhash only in task (normal) context with interrupts enabled, or in softirq context. Detect when map_delete_elem operation is invoked from a context which is _not_ hardirq-unsafe, that is interrupts are disabled, and bail out with an error. Note that map updates are not affected by this issue. BPF verifier does not allow updating sockmap/sockhash from a BPF tracing program today.
CVSS 3.1 score
5.5
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Weakness type
CWE-667CVE-2024-35895 is a Improper Locking vulnerability
What is Improper Locking?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. Learn more on MITRE CWE
References
The following references provide additional information about CVE-2024-35895 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
Mailing List
-
-
PatchKernel patch commithttps://git.kernel.org/stable/c/668b3074aa14829e2ac2759799537a93b60fef86
-
PatchKernel patch commithttps://git.kernel.org/stable/c/6af057ccdd8e7619960aca1f0428339f213b31cd
-
PatchKernel patch commithttps://git.kernel.org/stable/c/a44770fed86515eedb5a7c00b787f847ebb134a5
Frequently asked questions
-
What is CVE-2024-35895?
CVE-2024-35895 is a Medium severity Linux kernel vulnerability with a CVSS score of 5.5 out of 10 , classified as an Improper Locking flaw (CWE-667) . CVE-2024-35895 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-35895?
CVE-2024-35895 has a CVSS score of 5.5 out of 10, rated Medium severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H. -
Is there a patch available for CVE-2024-35895?
No patch is currently available for CVE-2024-35895. Monitor the NIST NVD and your Linux distribution's security advisories for updates.
-
Is CVE-2024-35895 actively exploited?
No — CVE-2024-35895 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Improper Locking (CWE-667)?
The product does not properly acquire or release a lock, which can lead to unexpected behaviour. View CWE-667 on MITRE CWE →