Description
In the Linux kernel, the following vulnerability has been resolved:

misc: nsm: only unlock nsm_dev on post-lock error paths

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

Impact

The Linux kernel suffered a locking bug in the nsm character device implementation. A copy_from_user() failure before the mutex was acquired caused execution to jump to a common unlock path that unlocks the mutex anyway, resulting in an unlocked or incorrectly unlocked mutex. This mismatch can trigger lockdep warnings and, in a kernel built with the appropriate safeguards, may cause a kernel panic or other stability issues. The vulnerability is local and requires the attacker to be able to invoke the nsm ioctl interface, but it could be leveraged to crash the host system and disrupt services or provide a foothold for further escalation.

Affected Systems

All Linux kernel releases that contain the unpatched nsm_dev_ioctl() implementation are affected. The precise version range is not listed, but any kernel prior to the commit that introduced the fix referenced in the provided Git links is vulnerable.

Risk and Exploitability

The CVSS score is not publicly available, and the EPSS score is not provided, indicating that no widespread exploitation data exists. The vulnerability is not listed in CISA’s KEV catalog, which suggests a low probability of active exploitation. The attack vector is local through a misused ioctl on the misc device, meaning that privilege escalation is limited to a local user context. Given the lack of exploit evidence, the risk is moderate owing to the severity of a kernel crash but low in terms of exploit likelihood.

Generated by OpenCVE AI on August 10, 2026 at 14:32 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the commit that fixes the nsm_dev_ioctl unlock bug.
  • Rebuild or reconfigure the kernel if a prebuilt update is unavailable, ensuring the patched source is applied and compiled.
  • Reboot the system after the update to ensure the patched kernel is fully in use.

Generated by OpenCVE AI on August 10, 2026 at 14:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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

Type Values Removed Values Added
Weaknesses CWE-362

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: only unlock nsm_dev on post-lock error paths 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.
Title misc: nsm: only unlock nsm_dev on post-lock error paths
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-10T11:59:50.667Z

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

Link: CVE-2026-68179

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T17:15:02Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')