Look up another CVE · open CVE-2026-68178 in the interactive tracker
CVE-2026-68178
misc: nsm: pin the module while the device is open
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-68178 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
misc_open() installs a misc driver's file operations with fops_get(), which pins file_operations::owner before replacing the file's f_op. The NSM misc device leaves nsm_dev_fops.owner unset, so opening /dev/nsm does not take a module reference on the nsm driver. If the driver is built as a module, an open file descriptor can therefore survive rmmod of the module that provides its ioctl callbacks. A later ioctl through that descriptor can call into unloaded module text. Set nsm_dev_fops.owner to THIS_MODULE so the misc core holds the module while any /dev/nsm file descriptor is open, matching the lifetime expectation for the installed file operations.
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
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.16%, higher than 5.2% 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 | 1996639f824c |
| 6.8 | 6.18.42 | 1da310b94504 |
| 6.8 | 7.1.6 | 9e9a82d00c3d |
| 6.8 | 7.2 | 3b231f1e9990 |
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 bug is reached only via local open()/ioctl syscalls on /dev/nsm (misc_open through vfs_ioctl to nsm_dev_ioctl); the Nitro Secure Module virtio driver has no network, adjacent-wireless, or physical attack surface.
- AC:LAttack complexity, low
- When CONFIG_NSM=m the attacker controls the full sequence: open /dev/nsm to install fops, delete_module("nsm") while fops_get(NULL) leaves the module unpinned, then ioctl on the stale fd to call unloaded text without races or external timing.
- PR:LPrivileges required, low
- /dev/nsm is registered mode 0666 with no capable() checks in nsm_dev_ioctl, so any local process can open and ioctl; unloading the module needs CAP_SYS_MODULE, treated as low-privilege local capability per similar module-lifetime UAF scoring on permissive/user-namespace kernels.
- UI:NUser interaction, none
- The attacker performs open, module removal, and stale-fd ioctl from their own process; no separate victim must mount a filesystem, click a link, or take any action beyond the attacker's own operations.
- S:UScope, unchanged
- The use-after-free corrupts guest kernel memory and executes in kernel context within the Nitro Enclave; impact does not cross hypervisor, parent-instance, VM, or IOMMU security boundaries.
- C:HConfidentiality impact, high
- Stale ioctl calls into freed module text and file_to_nsm() dereferences freed devm nsm state, exposing reclaimed kernel/module memory and adjacent virtio message buffers through the UAF window.
- I:HIntegrity impact, high
- Dispatching nsm_dev_ioctl through freed vmalloc module text is a kernel use-after-free that can be shaped with heap spraying to hijack control flow and achieve arbitrary kernel code execution.
- A:HAvailability impact, high
- Executing code from an unloaded module or dereferencing freed nsm/virtqueue state on ioctl reliably causes kernel oops or panic, and the attacker can repeat the stale-fd ioctl to deny service.