Look up another CVE · open CVE-2026-68179 in the interactive tracker
CVE-2026-68179
misc: nsm: only unlock nsm_dev on post-lock error paths
Published 2026-08-10 (2 months ago) by the Linux kernel CNA. Subsystem drivers/misc. Debian urgency: unimportant.
What to do, per Debian release
Debian's own status for CVE-2026-68179 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | not affected | 6.1.190-1 | Nothing to do. bookworm never shipped the vulnerable code. |
| Debian 13trixie | fixed | 6.12.101-1 | Update the kernel and reboot. Fixed in 6.12.101-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 7.1.6-1 | Update the kernel and reboot. Fixed in 7.1.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 7.1.6-1 | Update the kernel and reboot. Fixed in 7.1.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian 12bookworm · linux-6.12 | fixedDLA-4745-1 · 2026-08-18 · text | 6.12.101-1~deb12u1 | Update the kernel and reboot. DLA-4745-1 shipped the fix on 2026-08-18, in 6.12.101-1~deb12u1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
nsm_dev_ioctl() jumps to the common out label even when the initial copy_from_user() fails before nsm->lock has been taken. The error path then blindly unlocks a mutex that was never acquired. This issue was found by our static analysis tool and then manually reviewed against the current tree. The grounded PoC kept the miscdevice ioctl entry and the pre-lock copy_from_user(&raw, argp, _IOC_SIZE(cmd)) failure path by issuing NSM_IOCTL_RAW with an invalid user pointer. That failure reaches the shared out label before mutex_lock(&nsm->lock). Lockdep reported: WARNING: bad unlock balance detected! exploit/193 is trying to release lock (&global_nsm.lock) at: nsm_dev_ioctl+0x5f/0xcf [vuln_msv] but there are no more locks to release! no locks held by exploit/193. Return immediately on the pre-lock copy_from_user() failure and keep the common unlock label for the post-lock paths only.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/misc/nsm.c
- What this is
- NITRO SECURE MODULE (NSM)MAINTAINERS section matched on drivers/misc/nsm.c · linux-kernel@vger.kernel.org · Supported
- Kernel module
- nsm
Check it on the machine
grep -w CONFIG_NSM /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w nsmPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed. The build rule could not be established for 1 release, so nothing is claimed about those.
- bookworm?
- trixieMnot built on armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- forky, sidMnot built on armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- bookworm · linux-6.12Mnot built on armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k
- ?
- not established - no Makefile entry for the affected file
- M
- a module where it is built at all; some flavours do not build it
Where a release above reads "not established", no build rule for the affected file was found in that release's kernel tree. That is a gap in this lookup, not a finding that the code is absent.
- Build switch
- CONFIG_NSM
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2026-08-10 (2 months ago)source
- CVSS
- 8.4 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.18%, higher than 7.1% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- unimportantsource
- Subsystem
- drivers/misc
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.8 | 6.12.101 | 4aa3f7d48e91 |
| 6.8 | 6.18.42 | 8f068342096b |
| 6.8 | 7.1.6 | f318f5a872cb |
| 6.8 | 7.2 | ce1fed11d18e |
Debian advisories
| Advisory | Date | Shipped to | Debian |
|---|---|---|---|
| DLA-4745-1 | 2026-08-18 | bookworm 6.12.101-1~deb12u1 | tracker |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The flaw is reached only via the local ioctl syscall on /dev/nsm (open plus ioctl through vfs_ioctl to nsm_dev_ioctl); it is not exposed through any network protocol or remote service.
- AC:LAttack complexity, low
- An attacker can reliably trigger the pre-lock copy_from_user failure with an invalid userspace pointer and can control the race by issuing concurrent ioctl or /dev/hwrng reads against the same nsm->lock.
- PR:NPrivileges required, none
- The driver registers /dev/nsm as mode 0666 and performs no capability or permission checks in nsm_dev_ioctl, so any local process can open the device and issue NSM_IOCTL_RAW without elevated privileges.
- UI:NUser interaction, none
- Exploitation requires only the attacker issuing a crafted ioctl with an invalid argument pointer; no victim interaction, mounting, or other user action is needed.
- S:UScope, unchanged
- Impact is confined to corruption and privilege within the guest Nitro Enclave kernel; it does not cross into the hypervisor, parent instance, or another VM security boundary.
- C:HConfidentiality impact, high
- Unlocking a mutex not held by the caller can clear owner while another context still holds nsm->lock, permitting concurrent unsynchronized access to shared nsm_msg buffers and virtio response data.
- I:HIntegrity impact, high
- Premature mutex release enables overlapping virtqueue operations and corruption of shared kernel message state, a memory-safety defect that can be leveraged for arbitrary kernel integrity compromise.
- A:HAvailability impact, high
- The bug triggers lockdep bad-unlock warnings and kernel oops, and concurrent unsynchronized virtio access can panic, hang, or otherwise deny service to the enclave.