Skip to content
OpenAdvisories
Unscored CVE-2024-58009 EUVD-2025-5203GHSA-mqqf-qf5c-jg26

Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc

Published Feb 27, 2025 · Updated Oct 15, 2026 · Assigned by Linux

Vendor: Linux Product: Linux Package: linux Package: linux Package: linux-allwinner-5.19 Package: linux-aws Package: linux-aws-5.0 Package: linux-aws-5.11 Package: linux-aws-5.13 Package: linux-aws-5.19 Package: linux-aws-5.3 Package: linux-aws-5.4 Package: linux-aws-5.8 Package: linux-aws-6.2 Package: linux-aws-6.5 Package: linux-aws-fips Package: linux-azure Package: linux-azure-5.11 Package: linux-azure-5.13 Package: linux-azure-5.19 Package: linux-azure-5.3 Package: linux-azure-5.4 Package: linux-azure-5.8 Package: linux-azure-6.2 Package: linux-azure-6.5 Package: linux-azure-edge Package: linux-azure-fde Package: linux-azure-fde-5.19 Package: linux-azure-fde-6.2 Package: linux-azure-fips Package: linux-bluefield Package: linux-fips Package: linux-gcp Package: linux-gcp-5.11 Package: linux-gcp-5.13 Package: linux-gcp-5.19 Package: linux-gcp-5.3 Package: linux-gcp-5.4 Package: linux-gcp-5.8 Package: linux-gcp-6.2 Package: linux-gcp-6.5 Package: linux-gcp-fips Package: linux-gke Package: linux-gke-4.15 Package: linux-gke-5.15 Package: linux-gke-5.4 Package: linux-gkeop Package: linux-gkeop-5.15 Package: linux-gkeop-5.4 Package: linux-hwe Package: linux-hwe-5.11 Package: linux-hwe-5.13 Package: linux-hwe-5.19 Package: linux-hwe-5.4 Package: linux-hwe-5.8 Package: linux-hwe-6.2 Package: linux-hwe-6.5 Package: linux-hwe-edge Package: linux-ibm Package: linux-ibm-5.4 Package: linux-intel-5.13 Package: linux-intel-iot-realtime Package: linux-iot Package: linux-kvm Package: linux-lowlatency-hwe-5.19 Package: linux-lowlatency-hwe-6.2 Package: linux-lowlatency-hwe-6.5 Package: linux-nvidia-6.2 Package: linux-nvidia-6.5 Package: linux-oem Package: linux-oem-5.10 Package: linux-oem-5.13 Package: linux-oem-5.14 Package: linux-oem-5.17 Package: linux-oem-5.6 Package: linux-oem-6.0 Package: linux-oem-6.1 Package: linux-oem-6.5 Package: linux-oracle Package: linux-oracle-5.0 Package: linux-oracle-5.11 Package: linux-oracle-5.13 Package: linux-oracle-5.3 Package: linux-oracle-5.4 Package: linux-oracle-5.8 Package: linux-oracle-6.5 Package: linux-raspi-realtime Package: linux-raspi2 Package: linux-realtime Package: linux-riscv Package: linux-riscv-5.11 Package: linux-riscv-5.19 Package: linux-riscv-5.8 Package: linux-riscv-6.5 Package: linux-starfive-5.19 Package: linux-starfive-6.2 Package: linux-starfive-6.5 Package: linux-xilinx-zynqmp Platform: Linux Ecosystem: Debian Ecosystem: Ubuntu

Description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc

A NULL sock pointer is passed into l2cap_sock_alloc() when it is called
from l2cap_sock_new_connection_cb() and the error handling paths should
also be aware of it.

Seemingly a more elegant solution would be to swap bt_sock_alloc() and
l2cap_chan_create() calls since they are not interdependent to that moment
but then l2cap_chan_create() adds the soon to be deallocated and still
dummy-initialized channel to the global list accessible by many L2CAP
paths. The channel would be removed from the list in short period of time
but be a bit more straight-forward here and just check for NULL instead of
changing the order of function calls.

Found by Linux Verification Center (linuxtesting.org) with SVACE static
analysis tool.

Affected products

VendorProductAffectedFixed
Linux Linux 5.4.287 – < 5.4.291, 5.10.231 – < 5.10.235, 5.15.174 – < 5.15.179, 6.1.120 – < 6.1.129, 6.6.66 – < 6.6.78, 6.12.5 – < 6.12.14, 6.13 5.4.291

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 6.12.15-1 —
Debian 13 linux 6.12.15-1 —
Debian 12 linux 6.1.129-1 —
Debian 11 linux-6.1 6.1.129-1~deb11u1 DLA-4102-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS linux-raspi-realtime No fix yet —
Ubuntu 22.04 LTS linux-riscv +32 No fix yet —
Ubuntu 20.04 LTS linux 5.4.0-216.236 USN-7516-1
Ubuntu 20.04 LTS linux-aws 5.4.0-1146.156 USN-7516-9
Ubuntu 20.04 LTS linux-azure 5.4.0-1151.158 USN-7516-3
Ubuntu 20.04 LTS linux-bluefield 5.4.0-1105.112 USN-7517-3
Ubuntu 20.04 LTS linux-gcp 5.4.0-1149.158 USN-7516-1
Ubuntu 20.04 LTS linux-gke +28 No fix yet —
Ubuntu 20.04 LTS linux-ibm 5.4.0-1092.97 USN-7516-6
Ubuntu 20.04 LTS linux-kvm 5.4.0-1133.142 USN-7516-3
Ubuntu 20.04 LTS linux-oracle 5.4.0-1144.154 USN-7516-1
Ubuntu 20.04 LTS linux-raspi 5.4.0-1129.142 USN-7539-1
Ubuntu 20.04 LTS linux-xilinx-zynqmp 5.4.0-1064.68 USN-7517-1
Ubuntu 18.04 LTS linux-gcp +14 No fix yet —
Ubuntu 16.04 LTS linux-hwe-edge No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro FIPS-updates 20.04 LTS linux-aws-fips 5.4.0-1146.156+fips1 USN-7516-8
Ubuntu Pro FIPS-updates 20.04 LTS linux-azure-fips 5.4.0-1151.158+fips1 USN-7518-1
Ubuntu Pro FIPS-updates 20.04 LTS linux-fips 5.4.0-1120.130 USN-7516-8
Ubuntu Pro FIPS-updates 20.04 LTS linux-gcp-fips 5.4.0-1149.158+fips1 USN-7516-2
Ubuntu Pro 20.04 LTS linux-iot 5.4.0-1051.54 USN-7640-1
Ubuntu Pro 18.04 LTS linux-aws-5.4 5.4.0-1146.156~18.04.1 USN-7516-7
Ubuntu Pro 18.04 LTS linux-azure-5.4 5.4.0-1151.158~18.04.1 USN-7516-1
Ubuntu Pro 18.04 LTS linux-gcp-5.4 5.4.0-1149.158~18.04.1 USN-7516-1
Ubuntu Pro 18.04 LTS linux-hwe-5.4 5.4.0-216.236~18.04.1 USN-7516-5
Ubuntu Pro 18.04 LTS linux-ibm-5.4 5.4.0-1092.97~18.04.1 USN-7517-2
Ubuntu Pro 18.04 LTS linux-oracle-5.4 5.4.0-1144.154~18.04.1 USN-7516-4
ReleasePackageFixed inAdvisory
RHEL 9 rv +77 5.14.0-570.12.1.el9_6 RHSA-2025:6966
ReleasePackageFixed inAdvisory
SLES 15 SP6 kernel-64kb +3 6.4.0-150600.23.47.2 SUSE-SU-2025:1180-1
SLES 15 SP6 kernel-azure +1 6.4.0-150600.8.34.2 SUSE-SU-2025:1177-1
SLES 15 SP6 kernel-coco +3 6.4.0-15061.21.coco15sp6.1 SUSE-SU-2025:01919-1
SLES 15 SP6 kernel-default-base 6.4.0-150600.23.47.2.150600.12.20.2 SUSE-SU-2025:1180-1
SLES 15 SP6 kernel-docs +2 6.4.0-150600.23.47.1 SUSE-SU-2025:1180-1
SLES 15 SP6 kernel-syms-azure 6.4.0-150600.8.34.1 SUSE-SU-2025:1177-1
SLES 12 SP5 kernel-syms +2 4.12.14-122.258.1 SUSE-SU-2025:01600-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 6.1 kernel-default-base 6.4.0-28.1.21.6 SUSE-SU-2025:20270-1
SLE Micro 6.1 kernel-livepatch-MICRO-6-0_Update_6 +1 1-3.1 SUSE-SU-2025:20270-1, SUSE-SU-2025:20260-1
SLE Micro 6.1 kernel-rt +4 6.4.0-28.1 SUSE-SU-2025:20270-1, SUSE-SU-2025:20260-1
SLE Micro 6.0 kernel-default-base 6.4.0-28.1.21.6 SUSE-SU-2025:20192-1
SLE Micro 6.0 kernel-livepatch-MICRO-6-0_Update_6 +1 1-3.1 SUSE-SU-2025:20192-1, SUSE-SU-2025:20190-1
SLE Micro 6.0 kernel-rt +4 6.4.0-28.1 SUSE-SU-2025:20192-1, SUSE-SU-2025:20190-1
SLE Live Patching 15 SP6 kernel-default 6.4.0-150600.23.47.2 SUSE-SU-2025:1180-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_10 1-150600.1.5.1 SUSE-SU-2025:1178-1
SLE Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_10 1-150600.13.5.1 SUSE-SU-2025:1180-1
SLE Live Patching 12 SP5 kernel-default 4.12.14-122.258.1 SUSE-SU-2025:01600-1
SLE Live Patching 12 SP5 kgraft-patch-SLE12-SP5_Update_68 1-8.3.1 SUSE-SU-2025:01600-1
SUSE Real Time Module 15 SP6 kernel-rt +3 6.4.0-150600.10.34.1 SUSE-SU-2025:1178-1
ReleasePackageFixed inAdvisory
openSUSE Leap 15.6 dtb-aarch64 +4 6.4.0-150600.23.47.1 SUSE-SU-2025:1180-1
openSUSE Leap 15.6 kernel-64kb +5 6.4.0-150600.23.47.2 SUSE-SU-2025:1180-1
openSUSE Leap 15.6 kernel-azure +1 6.4.0-150600.8.34.2 SUSE-SU-2025:1177-1
openSUSE Leap 15.6 kernel-default-base 6.4.0-150600.23.47.2.150600.12.20.2 SUSE-SU-2025:1180-1
openSUSE Leap 15.6 kernel-rt +3 6.4.0-150600.10.34.1 SUSE-SU-2025:1178-1
openSUSE Leap 15.6 kernel-syms-azure 6.4.0-150600.8.34.1 SUSE-SU-2025:1177-1

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 kernel-uek +34 6.12.0-101.33.4.3.el10uek ELSA-2025-20530, ELSA-2025-20480

Advisories 35

References