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.
Published: 2026-08-10
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A kernel module that implements a miscellaneous (misc) device can be loaded as a loadable module. When a user opens the character device /dev/nsm, the driver’s file operations are installed with a missing module owner reference. Consequently, an open file descriptor can survive the removal of the module that supplies the device’s ioctl handlers. The descriptor then allows execution of IOCTL commands that finally call into code that has already been unloaded from memory. This use‑after‑free scenario can lead to a kernel crash or, in the worst case, arbitrary code execution with kernel privileges if the attacker can control the IOCTL payload. The weakness is a classic use‑after‑free error caused by an unset owner field. Based on the description, the most likely attack vector is a local user with sufficient privileges to unload the module and subsequently issue IOCTLs through the retained descriptor.

Affected Systems

The flaw exists in the Linux kernel’s misc subsystem, affecting all kernels that expose the nsm misc driver as a loadable module. It is not tied to a particular Linux distribution version because the change was applied universally to the kernel source tree referenced in the CVE reports. Systems that compile the Linux kernel with the nsm driver as a module and expose /dev/nsm are impacted. No specific vendor or product version details are listed beyond the generic Linux kernel identifier.

Risk and Exploitability

The issue stems from a module reference not being pinned while the device remains open, creating a vulnerable use‑after‑free. The CVSS score of 7.8 indicates high severity, and the EPSS score is < 1%, indicating a low probability of exploitation in the near term. The vulnerability is not listed in the CISA KEV catalog, suggesting no confirmed widespread exploitation yet. Based on the description, the likely attack vector is local: an attacker would need to open /dev/nsm, unload the module, and then issue IOCTL commands through the remaining descriptor; this scenario implies access to the console or root privileges to unload the module. The risk remains high due to the kernel-level nature of the flaw, and automated exploitation could be developed once the module’s code to parse IOCTL parameters is understood.

Generated by OpenCVE AI on August 13, 2026 at 07:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel patch that sets nsm_dev_fops.owner to THIS_MODULE, thereby 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 August 13, 2026 at 07:03 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
History

Thu, 13 Aug 2026 22:45:00 +0000

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'}


Wed, 12 Aug 2026 00:15:00 +0000

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


Mon, 10 Aug 2026 19:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-582

Mon, 10 Aug 2026 12:30:00 +0000

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

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-17T05:00:19.564Z

Reserved: 2026-07-30T09:28:09.373Z

Link: CVE-2026-68178

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-10T13:20:04.720

Modified: 2026-08-17T05:18:19.463

Link: CVE-2026-68178

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-10T11:59:49Z

Links: CVE-2026-68178 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T07:15:12Z

Weaknesses
  • CWE-582

    Array Declared Public, Final, and Static

  • CWE-763

    Release of Invalid Pointer or Reference