Vulnerability · Published Jun 19, 2024 · Assigned by Linux
CVE-2024-38605ALSA: core: Fix NULL module pointer assignment at card init
High 7.8
In plain English
A high-severity null pointer dereference 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.7% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: ALSA: core: Fix NULL module pointer assignment at card init The commit 81033c6b584b ("ALSA: core: Warn on empty module") introduced a WARN_ON() for a NULL module pointer passed at snd_card object creation, and it also wraps the code around it with '#ifdef MODULE'. This works in most cases, but the devils are always in details. "MODULE" is defined when the target code (i.e. the sound core) is built as a module; but this doesn't mean that the caller is also built-in or not. Namely, when only the sound core is built-in (CONFIG_SND=y) while the driver is a module (CONFIG_SND_USB_AUDIO=m), the passed module pointer is ignored even if it's non-NULL, and card->module remains as NULL. This would result in the missing module reference up/down at the device open/close, leading to a race with the code execution after the module removal. For addressing the bug, move the assignment of card->module again out of ifdef. The WARN_ON() is still wrapped with ifdef because the module can be really NULL when all sound drivers are built-in. Note that we keep 'ifdef MODULE' for WARN_ON(), otherwise it would lead to a false-positive NULL module check. Admittedly it won't catch perfectly, i.e. no check is performed when CONFIG_SND=y. But, it's no real problem as it's only for debugging, and the condition is pretty rare.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.94-1 | DEBIAN-CVE-2024-38605 |
| Debian:13 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38605 |
| Debian:14 | linux | 6.8.12-1 | DEBIAN-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux | 5.15.0-121.131 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux | 6.8.0-40.40 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1069.75 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1013.14 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1013.14~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1072.81 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1012.14 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1012.14~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1072.81.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1068.76 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1012.13 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1012.13~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1066.72 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1008.11 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1052.59 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-40.40~22.04.3 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1062.65 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1010.10 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1064.70 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1066.71 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-121.131 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1064.65 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1011.11 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1011.11~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1011.11.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1028.28 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1016.16 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1010.10 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1067.73 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1010.10 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1010.10~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1062.65 | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1009.10 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-40.40.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-40.40.1~22.04.1 | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-38605 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1035.39 | UBUNTU-CVE-2024-38605 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 81033c6b584b44514cbb16fffc26ca29a0fa6270 – before d7ff29a429b56f04783152ad7bbd7233b740e43481033c6b584b44514cbb16fffc26ca29a0fa6270 – before e7e0ca200772bdb2fdc6d43d32d341e87a36f81181033c6b584b44514cbb16fffc26ca29a0fa6270 – before e007476725730c1a68387b54b7629486d8a8301e81033c6b584b44514cbb16fffc26ca29a0fa6270 – before e644036a3e2b2c9b3eee3c61b5d31c2ca8b5ba9281033c6b584b44514cbb16fffc26ca29a0fa6270 – before c935e72139e6d523defd60fe875c01eb1f9ea5c581033c6b584b44514cbb16fffc26ca29a0fa6270 – before 6b8374ee2cabcf034faa34e69a855dc496a9ec1281033c6b584b44514cbb16fffc26ca29a0fa6270 – before 39381fe7394e5eafac76e7e9367e7351138a29c1 |
| Linux | Linux | 5.9 |
Weakness: CWE-476 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/d7ff29a429b56f04783152ad7bbd7233b740e434
- https://git.kernel.org/stable/c/e7e0ca200772bdb2fdc6d43d32d341e87a36f811
- https://git.kernel.org/stable/c/e007476725730c1a68387b54b7629486d8a8301e
- https://git.kernel.org/stable/c/e644036a3e2b2c9b3eee3c61b5d31c2ca8b5ba92
- https://git.kernel.org/stable/c/c935e72139e6d523defd60fe875c01eb1f9ea5c5
- https://git.kernel.org/stable/c/6b8374ee2cabcf034faa34e69a855dc496a9ec12
- https://git.kernel.org/stable/c/39381fe7394e5eafac76e7e9367e7351138a29c1