🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Sven Wed, 25 Nov 2026 12:10
Bug#1145007: wsdd2: two remote memory-safety bugs in the WSD/LLMNR packet parsers
#6073
Author: Sven
Date: Wed, 25 Nov 2026 12:10
63 lines
4935 bytes
Hi,

I can confirm both issues on trixie (wsdd2 1.8.7+dfsg-1.2) and that the two
patches attached to this report fix them.

Setup: Debian source 1.8.7+dfsg-1.2 from the archive (checksums match the
.dsc). Both patches apply to it with "patch -p1" without offset or fuzz and
build without warnings (gcc, -Wall -Wextra). I built the unpatched and the
patched tree with -fsanitize=address,undefined and called
wsd_parse_http_header() and llmnr_send_response() directly from a small
harness, with heap buffers sized exactly to the input:

  input                                  unpatched                  patched
  "POST " without CRLF                   SEGV wsd.c:904 (*eol)      400
  valid POST header + body               200                        200
  LLMNR label running past packet end    heap-buffer-overflow       rejected
                                         llmnr.c:196 (strncat)
  LLMNR name, QTYPE/QCLASS missing       heap-buffer-overflow       rejected
                                         llmnr.c:217
  valid LLMNR A query, packet ending     answered                   answered
  exactly after QCLASS

3 million random packets (both parsers, exact-size buffers, 3 seeds) gave no
ASan/UBSan findings on the patched build. The same run against the
unpatched build stops with a heap-buffer-overflow at llmnr.c:196.

Two minor remarks on patch 2, neither blocking:
- "in_name_p + 1 + *in_name_p >= in_end" and "in_name_p + 4 >= in_end" form
  pointers beyond one-past-the-end before comparing, which is formally
  undefined in C. Comparing lengths avoids that, e.g.
  "*in_name_p >= (size_t)(in_end - in_name_p) - 1".
- Label lengths 64..191 are still accepted (pre-existing; harmless once the
  bounds checks are in place).

Both fixes are small and local, and the package has no active upstream any
more. Could the patches be applied, and the fix also go to trixie
(stable point or security update)? If no maintainer upload happens,
an NMU looks justified to me given the severity.

Workaround until then, for anyone affected: run wsdd2 with "-w" (WSD only,
no LLMNR), which avoids the second bug entirely, and restrict it to the
local network, e.g. via a systemd drop-in with "IPAddressDeny=any" plus
"IPAddressAllow=localhost multicast <LAN prefix>".

I can provide the harness if that is useful.

Regards

Sven
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads