CVE-2024-50186

net: explicitly clear the sk pointer, when pf->create fails

7.8 high EPSS 0.23%

Published 8 Nov 2024 Updated 5 Aug 2026 CNA: Linux

Check your servers for CVE-2024-50186

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2024-50186 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
7.8 high CVSS 3.1 from CISA (ADP)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 15.1% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 1 Oct 2025):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 78e4aa528a7b1204219d808310524344f627d069, before daf462ff3cde6ecf22b98d9ae770232c10d28de2
affected from 893eeba94c40d513cd0fe6539330ebdaea208c0e, before b7d22a79ff4e962b8af5ffe623abd1d6c179eb9f
affected from 454c454ed645fed051216b79622f7cb69c1638f5, before 563e6892e21d6ecabdf62103fc4e7b326d212334
affected from 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2, before 8e1b72fd74bf9da3b099d09857f4e7f114f38e12
affected from 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2, before 631083143315d1b192bd7d915b967b37819e88ea
affected 5dfe2408fd7dc4d2e7ac38a116ff0a37b1cfd3b9
affected from 5.15.162, before 5.15.168
affected from 6.1.96, before 6.1.113
affected from 6.6.36, before 6.6.57
affected from 6.9.7, before 6.10
Other versions: unaffected
Linux
affected 6.10
unaffected before 6.10
unaffected from 5.15.168 up to and including 5.15.*
unaffected from 6.1.113 up to and including 6.1.*
unaffected from 6.6.57 up to and including 6.6.*
unaffected from 6.11.4 up to and including 6.11.*
unaffected 6.12 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2024-50186 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2024-50186

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2024-50186
trivy image --scanners vuln IMAGE | grep CVE-2024-50186

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2024-50186 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.