CVE-2025-40142
ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
Check your servers for CVE-2025-40142
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-2025-40142 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
snd_pcm_group_lock_irq() acquires a spinlock_t and disables interrupts via spin_lock_irq(). This also implicitly disables the handling of softirqs such as TIMER_SOFTIRQ. On PREEMPT_RT softirqs are preemptible and spin_lock_irq() does not disable them. That means a timer can be invoked during spin_lock_irq() on the same CPU. Due to synchronisations reasons local_bh_disable() has a per-CPU lock named softirq_ctrl.lock which synchronizes individual softirq against each other. syz-bot managed to trigger a lockdep report where softirq_ctrl.lock is acquired in hrtimer_cancel() in addition to hrtimer_run_softirq(). This is a possible deadlock.
The softirq_ctrl.lock can not be made part of spin_lock_irq() as this would lead to too much synchronisation against individual threads on the system. To avoid the possible deadlock, softirqs must be manually disabled before the lock is acquired.
Disable softirqs before the lock is acquired on PREEMPT_RT.
Exploitation
EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 12.1% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from d2d6422f8bd17c6bb205133e290625a564194496, before 63ee96c7f47df239ee0a6e8108b6bfd8c98334ae affected from d2d6422f8bd17c6bb205133e290625a564194496, before 3969b6193cb7a45aa5fb4ec68f215e9e7f93d39a affected from d2d6422f8bd17c6bb205133e290625a564194496, before 9fc4a3da9a0259a0500848b5d8657918efde176b
Other versions: unaffected
|
| Linux |
affected 6.12 unaffected before 6.12 unaffected from 6.12.53 up to and including 6.12.* unaffected from 6.17.3 up to and including 6.17.* unaffected 6.18 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-2025-40142 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-40142
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-2025-40142
trivy image --scanners vuln IMAGE | grep CVE-2025-40142
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
- https://git.kernel.org/stable/c/63ee96c7f47df239ee0a6e8108b6bfd8c98334ae git.kernel.org
- https://git.kernel.org/stable/c/3969b6193cb7a45aa5fb4ec68f215e9e7f93d39a git.kernel.org
- https://git.kernel.org/stable/c/9fc4a3da9a0259a0500848b5d8657918efde176b git.kernel.org
Source: the record CVE-2025-40142 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse