Thread View: linux.debian.bugs.dist
3 messages
3 total messages
Started by Salvatore Bonaccorso
Wed, 07 Oct 2026 14:50
Bug#1150240: lrzsz: CVE-2026-105840 CVE-2026-105841 CVE-2026-105842
Author: Salvatore Bonaccorso
Date: Wed, 07 Oct 2026 14:50
Date: Wed, 07 Oct 2026 14:50
52 lines
3769 bytes
3769 bytes
Source: lrzsz
Version: 0.12.21rc-5
Severity: important
Tags: security upstream
X-Debbugs-Cc: carnil@debian.org, Debian Security Team <team@security.debian.org>
Hi,
The following vulnerabilities were published for lrzsz.
CVE-2026-105840[0]:
| lrzsz before 0.13.0 contains a path traversal vulnerability in the
| lrz receive utility's restricted mode that allows malicious ZMODEM
| senders to write files outside the current directory using absolute
| pathnames. Because checkpath() in src/lrz.c only rejects '../'
| sequences unless built with --enable-pubdir, attackers can send
| files named with absolute paths to overwrite any file writable by
| the receiving user.
CVE-2026-105841[1]:
| lrzsz before 0.13.0 contains an OS command injection vulnerability
| in the lrz receive utility's pipe mode that allows remote senders to
| execute commands by supplying crafted filenames. When lrz runs under
| a suffixed name such as lrztar, procheader() in src/lrz.c passes the
| unescaped ZMODEM/YMODEM filename to popen(), so shell metacharacters
| execute as the receiving user.
CVE-2026-105842[2]:
| lrzsz before 0.13.0 contains a heap-based buffer overflow
| vulnerability in procheader() of the lrz receive utility when
| copying overlong sender-supplied filenames into Pathname. Malicious
| ZMODEM senders can supply filenames up to 8192 bytes, overflowing
| the buffer via sprintf() in pipe mode or strcpy() to corrupt heap
| memory and crash lrz.
If you fix the vulnerabilities please also make sure to include the
CVE (Common Vulnerabilities & Exposures) ids in your changelog entry.
For further information see:
[0] https://security-tracker.debian.org/tracker/CVE-2026-105840
https://www.cve.org/CVERecord?id=CVE-2026-105840
[1] https://security-tracker.debian.org/tracker/CVE-2026-105841
https://www.cve.org/CVERecord?id=CVE-2026-105841
[2] https://security-tracker.debian.org/tracker/CVE-2026-105842
https://www.cve.org/CVERecord?id=CVE-2026-105842
Regards,
Salvatore
Bug#1150240: lrzsz: CVE-2026-105840 CVE-2026-105841 CVE-2026-105842
Author: Bastian Germann
Date: Sun, 11 Oct 2026 21:20
Date: Sun, 11 Oct 2026 21:20
26 lines
3284 bytes
3284 bytes
The CVE-2026-105841 code is contained but not reachable. It is fixed by https://github.com/UweOhse/lrzsz/commit/9eef71ce20fda2b345ef8431359aec96121215bd Evidence from the packaging: - debian/rules:39 configures with --program-transform-name=s/l//, so bin_PROGRAMS=lrz lsz (src/Makefile.am:1) install as rz and sz, plus the install-exec-local links rb, rx, sb, sx (src/Makefile.am:18-29). No lrztar/rztar/lrzip name is shipped anywhere (tree-wide search: none). - Topipe is set only in chkinvok() when the basename — after stripping leading -/dir and an optional v/l — has a non-null char at index 2: if (s[2] && protocol!=ZM_XMODEM) Topipe = 1; (src/lrz.c:1578). Trigger requires a >=3 char suffixed name like rztar/lrztar. - All installed names are exactly 2 chars (rz, sz, rb, rx, sb), s[2] is \0), so Topipe is never set and the vulnerable popen(Pathname,"w") at src/lrz.c:1299 is unreachable via the packaged binaries. Two caveats: 1. The vulnerable code is still compiled in, so exposure is purely a matter of invocation name. A local user or an enclosing program that creates a suffixed symlink/copy (ln -s /usr/bin/rz lrztar) would re-enable it. This matches the CVE/NEWS wording that the bug "was only accessible if the installer gave appended some string to the lrz (or rz) commands name." Debian does not do this. 2. This is separate from the -C/--allow-remote-commands ZCOMMAND rexec path (upstream 3dbc195), which is opt-in and additionally forced off in Restricted mode (default).
Bug#1150240: lrzsz: CVE-2026-105840 CVE-2026-105842
Author: Bastian Germann
Date: Sun, 11 Oct 2026 21:40
Date: Sun, 11 Oct 2026 21:40
116 lines
6602 bytes
6602 bytes
--e8wej2+GQTrK883n
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi Martin,
Would it be okay if I file the attached file as stable proposed update?
Thanks,
Bastian
--e8wej2+GQTrK883n
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
filename=lrzsz_0.12.21rc-0.2+deb13u1.debdiff
diff -Nru lrzsz-0.12.21rc/debian/changelog lrzsz-0.12.21rc/debian/changelog
--- lrzsz-0.12.21rc/debian/changelog 2025-01-01 13:16:48.000000000 +0100
+++ lrzsz-0.12.21rc/debian/changelog 2026-10-11 23:22:00.000000000 +0200
@@ -1,3 +1,14 @@
+lrzsz (0.12.21rc-0.2+deb13u1) trixie; urgency=medium
+
+ * CVE-2026-105840, 01-rz-reject-absolute-paths.diff:
+ reject sender-supplied absolute paths in rz restricted mode.
+ * CVE-2026-105842, 02-rz-terminate-received-strings.diff:
+ reject over-length received file names,
+ fixing an out-of-bounds read and a one-byte heap overwrite on
+ maximum-length ZFILE names; also terminate the receiver buffer.
+
+ -- Bastian Germann <bage@debian.org> Sun, 11 Oct 2026 23:22:00 +0200
+
lrzsz (0.12.21rc-0.2) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru lrzsz-0.12.21rc/debian/patches/01-rz-reject-absolute-paths.diff lrzsz-0.12.21rc/debian/patches/01-rz-reject-absolute-paths.diff
--- lrzsz-0.12.21rc/debian/patches/01-rz-reject-absolute-paths.diff 1970-01-01 01:00:00.000000000 +0100
+++ lrzsz-0.12.21rc/debian/patches/01-rz-reject-absolute-paths.diff 2026-10-11 23:20:12.000000000 +0200
@@ -0,0 +1,18 @@
+Description: rz: reject absolute pathnames in restricted mode
+ Without PUBDIR (the Debian default build) checkpath() only rejected the
+ literal "../" and accepted sender-supplied absolute pathnames, so a remote
+ sender could create files and directories at any receiver-writable absolute
+ path. Reject a leading '/' when no PUBDIR is configured, restoring the
+ restricted-mode behaviour that rz(1) documents.
+Forwarded: no
+--- fixed.orig/src/lrz.c
++++ fixed/src/lrz.c
+@@ -1629,6 +1629,8 @@ checkpath(const char *name)
+ #ifdef PUBDIR
+ || (name[0]== '/' && strncmp(name, PUBDIR,
+ strlen(PUBDIR)))
++#else
++ || (name[0] == '/')
+ #endif
+ ) {
+ canit(STDOUT_FILENO);
diff -Nru lrzsz-0.12.21rc/debian/patches/02-rz-terminate-received-strings.diff lrzsz-0.12.21rc/debian/patches/02-rz-terminate-received-strings.diff
--- lrzsz-0.12.21rc/debian/patches/02-rz-terminate-received-strings.diff 1970-01-01 01:00:00.000000000 +0100
+++ lrzsz-0.12.21rc/debian/patches/02-rz-terminate-received-strings.diff 2026-10-11 23:20:12.000000000 +0200
@@ -0,0 +1,45 @@
+Description: rz: bound received file name length and terminate data subpackets
+ zrdata()/zrdat32() left the receive buffer unterminated, and procheader() then
+ read the name with strlen() and parsed trailing attributes at
+ name + 1 + strlen(name). A maximum-length ZFILE name without a NUL byte caused
+ an out-of-bounds read, and copying such a name into the PATH_MAX*2 Pathname
+ buffer overran it by one byte. Terminate the buffer after the payload, and
+ reject names of PATH_MAX or longer in procheader(): on this platform PATH_MAX
+ (4096) is below the receive buffer size, so the bound keeps both the attribute
+ parsing and the Pathname copy inside their buffers, and such names cannot name
+ a file anyway.
+Forwarded: no
+--- fixed.orig/src/zm.c
++++ fixed/src/zm.c
+@@ -576,6 +576,7 @@ crcfoo:
+ return ERROR;
+ }
+ *bytes_received = length - (end - buf);
++ *buf = '\0'; /* terminate: name/attn parsed as C string */
+ COUNT_BLK(*bytes_received);
+ VPRINTF(3,("zrdata: %lu %s", (unsigned long) (*bytes_received),
+ Zendnames[(d-GOTCRCE)&3]));
+@@ -636,6 +637,7 @@ crcfoo:
+ return ERROR;
+ }
+ *bytes_received = length - (end - buf);
++ *buf = '\0'; /* terminate: name/attn parsed as C string */
+ COUNT_BLK(*bytes_received);
+ VPRINTF(3,("zrdat32: %lu %s", (unsigned long) *bytes_received,
+ Zendnames[(d-GOTCRCE)&3]));
+--- fixed.orig/src/lrz.c
++++ fixed/src/lrz.c
+@@ -1141,6 +1141,13 @@ procheader(char *name, struct zm_fileinf
+ name=p;
+ }
+ }
++ if (strlen(name) >= PATH_MAX) {
++ /* over-long names cannot open and would overrun nameend/Pathname */
++ if (Verbose) {
++ vstringf(_("file name too long, skipped: %s\n"), name);
++ }
++ return ERROR;
++ }
+ name_static=malloc(strlen(name)+1);
+ if (!name_static)
+ error(1,0,_("out of memory"));
diff -Nru lrzsz-0.12.21rc/debian/patches/series lrzsz-0.12.21rc/debian/patches/series
--- lrzsz-0.12.21rc/debian/patches/series 2024-09-13 08:57:20.000000000 +0200
+++ lrzsz-0.12.21rc/debian/patches/series 2026-10-11 23:20:37.000000000 +0200
@@ -13,3 +13,5 @@
ansi2knr.diff
gettext_external.diff
ignore-intl.diff
+01-rz-reject-absolute-paths.diff
+02-rz-terminate-received-strings.diff
--e8wej2+GQTrK883n--
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