CVE-2026-68178

misc: nsm: pin the module while the device is open

Published Aug 10, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

misc: nsm: pin the module while the device is open

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.

Analysis

AI-generated

Technical impact

The flaw exists in the Linux kernel misc subsystem. When the nsm misc driver is built as a module, opening the character device /dev/nsm installs its file operations without setting the module owner reference. This allows a file descriptor to remain open after the kernel module is removed with rmmod. Subsequent ioctl calls through that descriptor invoke code from unloaded module memory, which can cause a kernel panic or, if the attacker controls ioctl parameters, arbitrary code execution with kernel privileges. The kernel patch resolves the issue by assigning nsm_dev_fops.owner to THIS_MODULE, thereby holding a reference to the module while any file descriptor is open.

Affected Systems

All Linux kernel builds that expose the nsm misc driver as a loadable module are affected. The vulnerability is not tied to a specific distribution or kernel version; any system that incorporates the nsm driver in module form and provides /dev/nsm could be impacted. The vendor identified is Linux.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity. The EPSS score is less than 1 %, suggesting a low probability of exploitation in the immediate future. The vulnerability is not listed in CISA's KEV catalog. The likely attack vector is local: an attacker would need the ability to load or unload kernel modules, which normally requires root privileges. While a kernel crash is possible, an attacker could potentially craft ioctl parameters that trigger code execution, making the flaw a serious local privilege escalation vector.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that sets nsm_dev_fops.owner to THIS_MODULE, preventing the device from being used after module removal.
  • Upgrade the Linux kernel to a version that includes the fix or rebuild the kernel with the updated misc driver source.
  • If immediate patching is not possible, avoid using /dev/nsm until the module is reloaded or the system is rebooted to clear any stale file descriptors.

Generated by OpenCVE AI on October 23, 2026 at 00:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4745-1 linux-6.12 security update
Ubuntu USN Ubuntu USN USN-8887-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8889-1 Linux kernel (OEM) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-2 Linux kernel (AWS) vulnerabilities
Ubuntu USN Ubuntu USN USN-8888-2 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8887-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8917-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8918-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9003-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9024-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9025-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9026-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9040-1 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9043-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9066-1 Linux kernel (HWE) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-582
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-763
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
Weaknesses CWE-582
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: misc: nsm: pin the module while the device is open 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.
Title misc: nsm: pin the module while the device is open
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-416

    Use After Free

  • CWE-763

    Release of Invalid Pointer or Reference

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Oct 19, 2026, 8:58 PM
Reserved
Jul 30, 2026, 9:28 AM
Status
Received
Published
Aug 10, 2026, 1:20 PM
Modified
Oct 19, 2026, 9:17 PM
Severity
Moderate
Public date
Aug 10, 2026, 11:59 AM