contributions & advisories
Upstream vulnerability research and memory safety patches to libslirp (QEMU virtualization networking stack).
vulnerability disclosures
Libslirp: Out-of-bounds Heap Read in icmp_forward_error() Leaks Host Memory
In libslirp's icmp_forward_error() within src/ip_icmp.c, quoted original packet length was derived directly from the packet IP header without clamping against actual buffer size, allowing an unprivileged guest to trigger an out-of-bounds heap read and leak sensitive host memory.
Libslirp: Queue Pointer Corruption in if_output() Causes Host Denial of Service
In libslirp's if_output(), fast-to-batch queue transitions operated on arbitrary packets via ifm->m_nextpkt instead of unlinking and reinserting the session queue head, corrupting internal packet queue pointers and causing process crashes on burst traffic.
Libslirp: ICMP Echo Reply Length Desynchronization Leaks Host IP to Guest
When handling ICMP echo requests through the fallback socket path, libslirp failed to synchronize reply packet lengths to actual bytes received from the host OS network stack, returning uninitialized buffer slices containing the host's physical IP address across NAT boundaries.
upstream merged patches (libslirp)
Memory leak of tftp_server_name in slirp_cleanup()
tftp_server_name was heap-allocated during initialization but never freed in slirp_cleanup(), causing a persistent memory leak on every instance teardown in QEMU.
Buffer underflow in tftp_handle_rrq() when handling empty filename
When receiving a TFTP read request with an empty filename, pointer arithmetic resulted in a buffer underflow, reading before the start of the allocated buffer.
Protocol type mismatch in icmp6_receive(): IPv4 error emitted as ICMPv6
In icmp6_receive(), an IPv4 ICMP_UNREACH error was incorrectly emitted using the ICMPv6 send path, causing malformed packet construction.
Double socket descriptor leak in fork_exec() on argument parsing failure
Two connected socket descriptors allocated via slirp_socketpair_with_oob() were never closed if argument parsing failed prior to the fork, exhausting host process file descriptors.
Socket heap memory & buffer leak in slirp_state_load() on deserialization failure
If deserialization failed partway through, the allocated socket structure and its associated buffers were not freed before returning an error.
Non-reentrant static variable in tcp_emu() corrupts protocol parser across sessions
tcp_emu() used a static local variable to maintain parser state across calls, causing concurrent sessions to corrupt each other's protocol parser state.