Article View: linux.debian.bugs.dist
Article #6073Bug#1145007: wsdd2: two remote memory-safety bugs in the WSD/LLMNR packet parsers
From: Sven
Date: Wed, 25 Nov 2026 12:10
Date: Wed, 25 Nov 2026 12:10
63 lines
4935 bytes
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
Technical Details
Message-ID:
<O3jYZ-e43p-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<O3jYZ-e43p-3@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Sven <svenj27@proton.me> Newsgroups: linux.debian.bugs.dist Subject: Bug#1145007: wsdd2: two remote memory-safety bugs in the WSD/LLMNR packet parsers Date: Wed, 25 Nov 2026 13:10:01 +0100 Message-ID: <O3jYZ-e43p-1@gated-at.bofh.it> References: <O3jYZ-e43p-3@gated-at.bofh.it> X-Original-To: "1145007@bugs.debian.org" <1145007@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Nov 25 12:05:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.451 Reply-To: Sven <svenj27@proton.me>, 1145007@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: mfv@debian.org X-Debian-Pr-Message: followup 1145007 X-Debian-Pr-Package: wsdd2 X-Debian-Pr-Keywords: patch security upstream X-Debian-Pr-Source: wsdd2 Feedback-ID: 237336784:user:proton X-Pm-Message-ID: 8d6ea1852c449be20796c970e252226b46c0cb30 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004888 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 63 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 25 Nov 2026 11:55:39 +0000 X-Original-Message-ID: <hpcTPdH96bklQn9aHDWc7TfwQ_0G9tFYGXVza5QXp9mA1fXzdEoslJTiPHV7Uzb16UnmomF1m9FBDv309lU42j7vvsDYEldplnx85QzvBLc=@proton.me> X-Original-References: <SY7P282MB4909552C99AA1F6B04D4A869B4A32@SY7P282MB4909.AUSP282.PROD.OUTLOOK.COM>