🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #1298

Bug#1146714: libre: diff for NMU version 2.0.1-3.1

#1298
From: Adrian Bunk
Date: Sun, 18 Oct 2026 23:10
91 lines
5194 bytes
--jrNpcpHTY6MQ0j8l
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Control: tags 1146714 + patch

Dear maintainer,

I've prepared an NMU for libre (versioned as 2.0.1-3.1) and uploaded
it to DELAYED/2. Please feel free to tell me if I should cancel it.

cu
Adrian

--jrNpcpHTY6MQ0j8l
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment; filename="libre-2.0.1-3.1-nmu.diff"

diffstat for libre-2.0.1 libre-2.0.1

 changelog                                                               |    8 ++
 patches/0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch |   36 ++++++++++
 patches/series                                                          |    1 
 3 files changed, 45 insertions(+)

diff -Nru libre-2.0.1/debian/changelog libre-2.0.1/debian/changelog
--- libre-2.0.1/debian/changelog	2024-11-07 22:06:08.000000000 +0200
+++ libre-2.0.1/debian/changelog	2026-10-18 19:55:04.000000000 +0300
@@ -1,3 +1,11 @@
+libre (2.0.1-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * CVE-2026-50161: Integer overflow in websock_decode()
+    (Closes: #1146714)
+
+ -- Adrian Bunk <bunk@debian.org>  Sun, 18 Oct 2026 19:55:04 +0300
+
 libre (2.0.1-3) unstable; urgency=medium
 
   * Team upload
diff -Nru libre-2.0.1/debian/patches/0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch libre-2.0.1/debian/patches/0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch
--- libre-2.0.1/debian/patches/0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch	1970-01-01 02:00:00.000000000 +0200
+++ libre-2.0.1/debian/patches/0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch	2026-10-18 19:55:04.000000000 +0300
@@ -0,0 +1,36 @@
+From d381f643d2b2229cbe5d4bcf455dbbe87f20e539 Mon Sep 17 00:00:00 2001
+From: Tristan <1075304+TristanInSec@users.noreply.github.com>
+Date: Thu, 28 May 2026 16:32:12 +0200
+Subject: websock: Fix integer overflow in websock_decode() masked frame length
+ check (#1584)
+
+When a masked WebSocket frame uses the 64-bit extended length encoding
+with a value close to UINT64_MAX, the bounds check expression
+(4 + hdr->len) wraps to a small value due to unsigned overflow. This
+causes the check to pass, and the subsequent XOR unmasking loop writes
+past the end of the buffer.
+
+Add an explicit overflow guard before the addition. If hdr->len exceeds
+SIZE_MAX - 4, the frame is rejected as too large before the overflowing
+addition can occur.
+---
+ src/websock/websock.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/websock/websock.c b/src/websock/websock.c
+index a9ee2bd4..0c57a109 100644
+--- a/src/websock/websock.c
++++ b/src/websock/websock.c
+@@ -204,7 +204,8 @@ static int websock_decode(struct websock_hdr *hdr, struct mbuf *mb)
+ 
+ 	if (hdr->mask) {
+ 
+-		if (mbuf_get_left(mb) < (4 + hdr->len))
++		if (hdr->len > SIZE_MAX - 4 ||
++		    mbuf_get_left(mb) < (4 + hdr->len))
+ 			return ENODATA;
+ 
+ 		hdr->mkey[0] = mbuf_read_u8(mb);
+-- 
+2.47.3
+
diff -Nru libre-2.0.1/debian/patches/series libre-2.0.1/debian/patches/series
--- libre-2.0.1/debian/patches/series	2024-11-07 22:02:16.000000000 +0200
+++ libre-2.0.1/debian/patches/series	2026-10-18 19:55:04.000000000 +0300
@@ -1,3 +1,4 @@
 1001_system_header_locations.patch
 1002_remove_SYSROOT.patch
 1003_remove_MACHINE.patch
+0001-websock-Fix-integer-overflow-in-websock_decode-maske.patch

--jrNpcpHTY6MQ0j8l--
Technical Details
Message-ID: <NPIaR-6q6t-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NzGd3-fbD4-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Adrian Bunk <bunk@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1146714: libre: diff for NMU version 2.0.1-3.1
Date: Mon, 19 Oct 2026 01:10:01 +0200
Message-ID: <NPIaR-6q6t-3@gated-at.bofh.it>
References: <NzGd3-fbD4-3@gated-at.bofh.it>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sun Oct 18 23:05:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Adrian Bunk <bunk@debian.org>, 1146714@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: pkg-voip-maintainers@lists.alioth.debian.org
X-Debian-Pr-Message: followup 1146714
X-Debian-Pr-Package: src:libre
X-Debian-Pr-Keywords: upstream security pending fixed-upstream
X-Debian-Pr-Source: libre
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="jrNpcpHTY6MQ0j8l"
Content-Disposition: inline
X-Debian-User: bunk
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1997448
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 91
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 19 Oct 2026 02:04:28 +0300
X-Original-Message-ID: <atVQfCeOJ6s1mdoo@localhost>
X-Original-References: <178854384070.931527.1809830227489271911.reportbug@eldamar.lan>