Vulnerability · Published Nov 8, 2024 · Assigned by Linux

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

High 7.8

In plain English

A high-severity use-after-free in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 86.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.115-1DEBIAN-CVE-2024-50186
Debian:13linux6.11.4-1DEBIAN-CVE-2024-50186
Debian:14linux6.11.4-1DEBIAN-CVE-2024-50186
Ubuntu:22.04:LTSlinux5.15.0-127.137UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux6.8.0-56.58UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-aws5.15.0-1073.79UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-aws6.8.0-1025.27UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1027.29~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure5.15.0-1078.87UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-azure6.8.0-1025.30UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-azure-6.116.11.0-1012.12~24.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1025.30~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1078.87.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-azure-nvidia6.8.0-1014.15UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gcp5.15.0-1072.80UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-gcp6.8.0-1026.28UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-gcp-6.116.11.0-1011.11~24.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1026.28~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gke5.15.0-1070.76UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-gke6.8.0-1021.25UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1056.63UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1008.10UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-57.59~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-ibm5.15.0-1066.69UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-ibm6.8.0-1022.22UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1023.23~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1071.77UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-kvm5.15.0-1070.75UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-127.137UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-56.58.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-56.58.1~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1068.69UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1024.27UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-nvidia-6.116.11.0-1007.7UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1024.27~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1024.27.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia-tegra5.15.0-1032.32UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1004.4UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-nvidia-tegra-igx5.15.0-1020.20UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1015.15UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1024.24UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oracle5.15.0-1071.77UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-oracle6.8.0-1022.23UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1022.23~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-raspi5.15.0-1066.69UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-raspi6.8.0-1028.32UBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-riscv6.8.0-56.58.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-56.58.1~22.04.1UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-50186
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1017.18UBUNTU-CVE-2024-50186
Ubuntu:22.04:LTSlinux-xilinx-zynqmp5.15.0-1039.43UBUNTU-CVE-2024-50186

Affected products (as reported)

VendorProductVersions
Linux Linux 78e4aa528a7b1204219d808310524344f627d069 – before daf462ff3cde6ecf22b98d9ae770232c10d28de2893eeba94c40d513cd0fe6539330ebdaea208c0e – before b7d22a79ff4e962b8af5ffe623abd1d6c179eb9f454c454ed645fed051216b79622f7cb69c1638f5 – before 563e6892e21d6ecabdf62103fc4e7b326d2123346cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2 – before 8e1b72fd74bf9da3b099d09857f4e7f114f38e126cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2 – before 631083143315d1b192bd7d915b967b37819e88ea5dfe2408fd7dc4d2e7ac38a116ff0a37b1cfd3b95.15.162 – before 5.15.1686.1.96 – before 6.1.113
Linux Linux 6.10

Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References