CVE-2026-57842 NetBSD COMPAT_NETBSD32 Double Free / Use-After-Free via recvmsg() msg_iovlen
Local attackers can trigger kernel memory corruption or panic via recvmsg() in the COMPAT_NETBSD32 layer, potentially leading to code execution.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-57842?
CVE-2026-57842 is a high-severity use after free vulnerability in The NetBSD Foundation NetBSD, published on 11 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-57842?
How do I fix CVE-2026-57842?
No fix has been published for CVE-2026-57842 yet. Limit exposure of the affected software until one is available.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2026-57842 being exploited?
There is no known exploitation of CVE-2026-57842 in the wild and no public exploit code.
Sources
Also known as GHSA-gq6w-h4cf-wpff.