CVE-2026-57842

NetBSD COMPAT_NETBSD32 Double Free / Use-After-Free via recvmsg() msg_iovlen

Published Sep 11, 2026 CVSS 4.0 · 7.3 High EPSS < 1% KEV · Not listed
Description
NetBSD contains a use-after-free and double-free vulnerability in msg_recv_copyin() within the COMPAT_NETBSD32 compatibility layer due to a missing return statement before the cleanup label on the success path. Any local user able to execute a 32-bit binary on a 64-bit NetBSD system can trigger a kernel panic or memory corruption by calling recvmsg() with msg_iovlen between 9 and IOV_MAX, causing the kernel to access a freed iovec buffer and subsequently free the same allocation a second time.

Analysis

AI-generated

Technical impact

NetBSD's COMPAT_NETBSD32 layer contains a use‑after‑free and double‑free flaw in the msg_recv_copyin() routine due to a missing return before the cleanup label on the success path. When a local user runs a 32‑bit binary on a 64‑bit NetBSD system and calls recvmsg() with a msg_iovlen between 9 and IOV_MAX, the kernel accesses a freed iovec buffer and then frees the same memory again. This can lead to a kernel panic or memory corruption, potentially allowing the attacker to crash the system or execute arbitrary code with kernel privileges.

Affected Systems

Any installation of NetBSD that enables the COMPAT_NETBSD32 compatibility layer is affected. The vulnerability exists in the core kernel, so all versions of NetBSD running 32‑bit binaries on a 64‑bit machine are impacted. No specific version range is listed, but the fix applies to any current or future releases that have not yet applied the patch.

Risk and Exploitability

The CVSS score of 7.3 is available, and the vulnerability is not listed in the CISA KEV catalog. The exploit requires local user privileges and the ability to execute a 32‑bit binary; it may be driven using recvmsg() with a large msg_iovlen. Because it leads to a kernel panic or memory corruption, the risk is significant for systems that allow such binaries. No publicly disclosed exploits are known, but the local attack vector and high impact warrant prompt remediation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest NetBSD security update that fixes the msg_recv_copyin double‑free issue in COMPAT_NETBSD32.
  • Disable the COMPAT_NETBSD32 compatibility layer or restrict its use to trusted users if 32‑bit binaries are not required.
  • Keep the NetBSD kernel up to date by regularly checking vendor advisories and applying updates as they become available.

Generated by OpenCVE AI on September 11, 2026 at 16:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:o:netbsd:netbsd:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Netbsd
Netbsd netbsd
Vendors & Products Netbsd
Netbsd netbsd
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description NetBSD contains a use-after-free and double-free vulnerability in msg_recv_copyin() within the COMPAT_NETBSD32 compatibility layer due to a missing return statement before the cleanup label on the success path. Any local user able to execute a 32-bit binary on a 64-bit NetBSD system can trigger a kernel panic or memory corruption by calling recvmsg() with msg_iovlen between 9 and IOV_MAX, causing the kernel to access a freed iovec buffer and subsequently free the same allocation a second time.
Title NetBSD COMPAT_NETBSD32 Double Free / Use-After-Free via recvmsg() msg_iovlen
Weaknesses CWE-415
CWE-416
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 7.3, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 1, 2026, 3:20 PM
Reserved
Jun 25, 2026, 6:48 PM
Status
Awaiting Analysis
Published
Sep 11, 2026, 2:17 PM
Modified
Sep 24, 2026, 8:44 PM