Open Source · Vulnerability Research · Systems Engineering

Contributions & Advisories

Upstream security research, vulnerability disclosures, and code patches across production networking and systems infrastructure. All 9 contributions merged into libslirp (freedesktop.org), the user-mode TCP/IP stack powering QEMU, VirtualBox, and major virtualization platforms. Includes CVE-2026-120830, CVE-2026-120831, and CVE-2026-115449, acknowledged and published by Red Hat Product Security.

Vulnerability Disclosures

3 Disclosed CVEs · Red Hat Product Security Acknowledged

Upstream libslirp Commits

freedesktop.org · 9 commits merged
Merged CVE-2026-120830 CWE-125 · OOB Read

Out-of-bounds heap read and packet length clamping in icmp_forward_error()

Nov 2026 C · Memory Safety
Finding & Impact

When generating an ICMP error packet, icmp_forward_error() derived the quoted original IPv4 packet length directly from the packet IP header without clamping it to the actual packet buffer size. A truncated or malformed packet triggers an out-of-bounds heap read, leaking host memory back to guest virtual machines or containers.

Merged CVE-2026-120831 CWE-787 · DoS / Corruption

Memory queue pointer corruption in if_output() during session batch queue migration

Nov 2026 C · Queue Management
Finding & Impact

When transitioning a session from the fast queue to the batch queue, if_output() improperly unlinked and reinserted an arbitrary packet via ifm->m_nextpkt rather than the session queue head. This corrupted packet queue pointers, allowing guest burst traffic to crash the host networking process and cause a Denial of Service (DoS).

Merged CVE-2026-115449 Info Disclosure

Echo reply length desynchronization in icmp_receive() and icmp6_receive()

Oct 2026 C · Protocol Security
Finding & Impact

In both icmp_receive() and icmp6_receive(), the length field of echo reply packets is not correctly synchronized with actual received payload size. Under specific conditions where the normal ICMP socket is unavailable, this causes trailing uninitialized buffer bytes containing the host's actual IP to be emitted to the guest, breaking NAT isolation.

src/ip_icmp.c — icmp_receive()
     } else {
+        m->m_len = hlen + len;
+        ip->ip_len = htons(hlen + len);
+
         icmp_reflect(m);
         so->so_m = NULL; /* Don't m_free() it again! */
     }
Merged Security

Memory leak of tftp_server_name in slirp_cleanup()

Oct 18, 2026 C · Memory Safety
Finding

tftp_server_name is heap-allocated during initialization but never freed in the cleanup path slirp_cleanup(), causing a persistent memory leak on every instance teardown in QEMU and other consumers of libslirp.

src/slirp.c — slirp_cleanup()
 g_free(slirp->tftp_prefix);
 g_free(slirp->bootp_filename);
 g_free(slirp->vdomainname);
+g_free(slirp->tftp_server_name);
 g_free(slirp);
Merged Security

Buffer underflow in tftp_handle_rrq() when handling empty filename

Oct 2026 C · Memory Safety
Finding

When a TFTP read request (RRQ) is received with an empty filename, tftp_handle_rrq() performs pointer arithmetic that results in a buffer underflow — reading memory before the start of the allocated buffer. This can cause undefined behavior and potential memory exposure.

Merged Bug

Protocol type mismatch in icmp6_receive(): IPv4 ICMP_UNREACH emitted as ICMPv6

Oct 2026 C · Protocol
Finding

In icmp6_receive(), an IPv4 ICMP_UNREACH error is incorrectly emitted using the ICMPv6 send path. This protocol type mismatch causes malformed packets to be constructed and sent, breaking network error signaling for IPv4 unreachable conditions handled through the IPv6 receive path.

Merged Resource Leak

Double socket descriptor leak in fork_exec() on argument parsing failure

Oct 2026 C · Resource Management
Finding

In fork_exec(), two connected socket descriptors allocated via slirp_socketpair_with_oob() are never closed if argument parsing fails prior to the fork. Repeated failures in callers will exhaust the host process file descriptor table, resulting in denial of service for guest networking.

Merged Resource Leak

Socket heap memory & buffer leak in slirp_state_load() on deserialization failure

Oct 2026 C · Resource Management
Finding

In slirp_state_load(), if deserialization or validation of a socket fails partway through, the already-allocated socket structure and its associated send/receive buffers are not freed before returning an error. This results in heap memory and buffer leaks on failed state restore operations.

Merged Concurrency

Non-reentrant static variable in tcp_emu() corrupts protocol parser across sessions

Oct 2026 C · Concurrency
Finding

tcp_emu() used a static local variable to maintain parser state across calls. Because static local variables are shared across all call sites in a process, concurrent or interleaved sessions corrupted each other's protocol parser state — causing silent protocol parsing failures in multi-instance libslirp environments.

About libslirp

freedesktop.org

libslirp is the user-mode TCP/IP networking stack used by QEMU, VirtualBox, and major virtualization and emulation platforms. It implements a complete network stack in user space, translating guest network traffic without requiring elevated host operating system privileges. Security and memory safety issues in libslirp directly affect host-guest containment and hypervisor reliability.

All contributions documented above were identified through manual source-level code review, reported upstream with reproduction context and fix proposals, and subsequently merged into the main project repository.