VDB

CVE-2024-50186

CVE-2024-50186 PUBLISHED CVSS 7.8 HIGH

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

Reported by linux · Published November 8, 2024

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.

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux78e4aa528a7b1204219d808310524344f627d069, 893eeba94c40d513cd0fe6539330ebdaea208c0e, 454c454ed645fed051216b79622f7cb69c1638f5
LinuxLinux6.10, 0, 5.15.168
linuxlinux_kernel6.9.7, 6.10, 6.1.96
amazon:2023python3-perf0
amazon:2023kernel-libbpf0
amazon:2023kernel-headers0
amazon:2023kernel0
amazon:2023kernel-livepatch-6.1.115-126.1970
amazon:2023kernel-tools-devel0
amazon:2023kernel-libbpf-devel0
amazon:2023kernel-tools0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-modules-extra0
LinuxLinux6.9.7, 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2, 5.15.162
amazon:2023bpftool0
amazon:2023perf0
amazon:2023kernel-devel0
amazon:2023kernel-libbpf-static0

Timeline

  • Oct 31, 2024 CVE Published
  • Nov 8, 2024 Coalition ESS Score (11 in total, the first dated here)
  • Nov 9, 2024 EPSS Score (30 in total, the first dated here)
  • Dec 16, 2025 PoC Published
  • Jan 2, 2026 Security Advisory (189 in total, the first dated here)
  • Jan 2, 2026 CVE Updated
  • Mar 30, 2026 Distribution Patch (159 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-50186
vulnetix vdb fixes CVE-2024-50186

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-50186/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›