CVE-2024-50186
HighIn 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.
CVSS 3.1 score
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness type
CWE-416CVE-2024-50186 is a Use After Free vulnerability
What is Use After Free?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. Learn more on MITRE CWE
Affected versions
Linux kernel versions
5.15.162,
6.1.96,
6.6.36,
6.9.7,
6.10
and later are affected. Fixed in
5.15.168,
6.1.113,
6.6.57,
6.11.4,
6.12
and their respective stable series.
References
The following references provide additional information about CVE-2024-50186 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
-
PatchKernel patch commithttps://git.kernel.org/stable/c/563e6892e21d6ecabdf62103fc4e7b326d212334
-
PatchKernel patch commithttps://git.kernel.org/stable/c/631083143315d1b192bd7d915b967b37819e88ea
-
PatchKernel patch commithttps://git.kernel.org/stable/c/8e1b72fd74bf9da3b099d09857f4e7f114f38e12
Frequently asked questions
-
What is CVE-2024-50186?
CVE-2024-50186 is a High severity Linux kernel vulnerability with a CVSS score of 7.8 out of 10 , classified as an Use After Free flaw (CWE-416) . It affects Linux kernel versions from 5.15.162 onward and has been patched in 5.15.168, 6.1.113, 6.6.57 and others. CVE-2024-50186 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
What is the CVSS score for CVE-2024-50186?
CVE-2024-50186 has a CVSS score of 7.8 out of 10, rated High severity (CVSS 3.1). The vector string is
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. -
Is there a patch available for CVE-2024-50186?
Yes — CVE-2024-50186 has been patched. Fixed versions include 5.15.168, 6.1.113, 6.6.57 and others. If you are running Linux kernel 5.15.162 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2024-50186 actively exploited?
No — CVE-2024-50186 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
-
What is Use After Free (CWE-416)?
The product references memory after it has been freed, which may cause it to crash, use unexpected values, or execute code. View CWE-416 on MITRE CWE →