CVE-2024-50186
Last modified
CVE-2024-50186 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. In the Linux kernel, the following vulnerability has been resolved: net: explicitly clear the sk pointer, when pf->create fails We have recently noticed the exact same KASAN splat as in commit 6cd4a78d962b ("net: do not leave a dangling sk pointer, when socket creation fails"). The problem is that commit did not fully address the problem, as some pf->create implementations do not use sk_common_release in their error paths. For example, we can use the same reproducer as in the above commit, but changing ping to arping. EPSS estimates a 0.23% chance of exploitation in the next 30 days.
Description
In the Linux kernel, the following vulnerability has been resolved: net: explicitly clear the sk pointer, when pf->create fails We have recently noticed the exact same KASAN splat as in commit 6cd4a78d962b ("net: do not leave a dangling sk pointer, when socket creation fails"). The problem is that commit did not fully address the problem, as some pf->create implementations do not use sk_common_release in their error paths. For example, we can use the same reproducer as in the above commit, but changing ping to arping. arping uses AF_PACKET socket and if packet_create fails, it will just sk_free the allocated sk object. While we could chase all the pf->create implementations and make sure they NULL the freed sk object on error from the socket, we can't guarantee future protocols will not make the same mistake. So it is easier to just explicitly NULL the sk pointer upon return from pf->create in __sock_create. We do know that pf->create always releases the allocated sk object on error, so if the pointer is not NULL, it is definitely dangling.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness Enumeration
Affected Software
| Vendor | Product | Versions | Update |
|---|---|---|---|
| Linux | Linux Kernel | >= 5.15.162, < 5.15.168 | — |
| Linux | Linux Kernel | >= 6.1.96, < 6.1.113 | — |
| Linux | Linux Kernel | >= 6.6.36, < 6.6.57 | — |
| Linux | Linux Kernel | >= 6.9.7, < 6.10 | — |
| Linux | Linux Kernel | >= 6.10, < 6.11.4 | — |
| Linux | Linux Kernel | 6.12 | Rc1 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2024-50186?
How severe is CVE-2024-50186?
How do I fix CVE-2024-50186?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2024
- CVE-2024-50180In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2024-50181Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2024-50182In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50183In the Linux kernel, the following vulnerability has been re…4.7
- CVE-2024-50184In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50185In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50187In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50188In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50189In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-5019In WhatsUp Gold versions released before 2023.1.3, an unau…7.5
- CVE-2024-50190In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2024-50191In the Linux kernel, the following vulnerability has been re…5.5
Are you affected by CVE-2024-50186?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
