From patchwork Thu Oct 29 10:30:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 102369 Received: from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8731.1793269813858591155 for ; Thu, 29 Oct 2026 03:30:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=Xmb4nQ7n; spf=pass (domain: cisco.com, ip: 173.37.86.72, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=9053; q=dns/txt; s=iport01; t=1793269813; x=1794479413; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EbYqkTABKHSgV97/qNmsVJKkM3Wz0FvA5sPramM0R7E=; b=Xmb4nQ7nnGw5DQh0tkZm5Ocra+TrVgRjL1VOcTEcUvAkLqS+uFP9BCD+ 30VhACfOdgQ4hPqOcbyimhSC+lZkbMrwmp4uYbioJ2EY/XgUttCKSIa4E eYKO9v0BCvolvZDwJktvztsXyLqOg24ScYMhs/aiqDVZmVmgvs5M0z/Vk FzCqfB2JuSX5EL3X4KKg6shwEuD4cbHC35HNEwBgvtOW1hC+ne77G+exR XO+xaOc4Wr/KjsEj8I+LcgcZcdeVUjzdy71uR0yHrJmNgKRxLQpPmnBQ7 fh1UW4OV4OZT0T7DSnKpr+V+Nfh6ElHFcWmheJdqxBLP5SpULh0Tq3e8s Q==; X-CSE-ConnectionGUID: NHcnOr/NQICflBwmPHwDyA== X-CSE-MsgGUID: KGw/fI/GT/mI5TwEP7n7hw== X-IPAS-Result: A0AnAAAiH+Nq/5T/Ja1aHQEBAQEJARIBBQUBgXwIAQsBglZ1YENJA4xviVmeH4F+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zaLQ5dOv3Y5gbC91PxuvDipXz9B4INQejQGvlCxQf7KnYoIBoOWF22pPO0hkKzV5dUL FYZ0i4vtrQpskuzQ9/wWhe1rHKJslgbQdU4LgEhwBuGxqyR50OSAXIJC2cYLtcnr8QxAzct0 zdlgu/UONCmi5XNIVr1y1tehWja1fQ9RYPaWRI5cA== IronPort-HdrOrdr: A9a23:dO0CGa9gm0ruz3GWMJtuk+D0I+orL9Y04lQ7vn2ZhyY7TiX+rb HKoB11737JYVoqNU3I+urwWpVoP0m9yXcd2+B4Vt2ftWLd1ldAQrsP0WLK+UyFJ8SHzJ8/6Y 5QN45jFdb3EV92yez+4AW+DpIc5ePvytHOuQ8bpE0dND2DrMpbnmFENjo= X-Talos-CUID: 9a23:obscS2lATluY15NMzSCGJIeIxLXXOVv9x3H3OQieMEdCRrm/Vlqo2LxIguM7zg== X-Talos-MUID: 9a23:jbVLjQRdS7PXm3cFRXTPqy4lOuYvzJjpDWFQrYorg5aCaixvbmI= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,184,1787011200"; d="scan'208";a="541511813" Received: from rcdn-l-core-11.cisco.com ([173.37.255.148]) by rcdn-iport-1.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 29 Oct 2026 10:30:12 +0000 Received: from sjc-ads-5245.cisco.com (sjc-ads-5245.cisco.com [10.28.23.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-11.cisco.com (Postfix) with ESMTPS id C951018000173; Thu, 29 Oct 2026 10:30:12 +0000 (GMT) Received: by sjc-ads-5245.cisco.com (Postfix, from userid 1887505) id 719CBCC1611; Thu, 29 Oct 2026 03:30:12 -0700 (PDT) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Cc: xe-linux-external@cisco.com Subject: [OE-core][wrynose][PATCH v2 1/3] lrzsz: fix CVE-2026-105841 Date: Thu, 29 Oct 2026 03:30:10 -0700 Message-Id: <20261029103012.2335950-1-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 MIME-Version: 1.0 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5245.cisco.com [10.28.23.9];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.23.9, sjc-ads-5245.cisco.com X-Outbound-Node: rcdn-l-core-11.cisco.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 29 Oct 2026 10:30:18 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248930 From: Hetvi Thakar When invoked under a suffixed name such as lrztar, lrz passes sender-controlled filenames to popen() without shell escaping. A malicious sender can use this to execute commands with the receiving user's privileges. Backport upstream commit [1], which removes this pipe-execution mode, addressing the vulnerability described in [2]. [1] https://github.com/UweOhse/lrzsz/commit/9eef71ce20fda2b345ef8431359aec96121215bd [2] https://security-tracker.debian.org/tracker/CVE-2026-105841 Signed-off-by: Hetvi Thakar --- Changes in v2: - corrected the advisory reference in commit messsage --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch | 267 ++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 268 insertions(+) create mode 100644 meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch new file mode 100644 index 00000000000..268218fb8a6 --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch @@ -0,0 +1,267 @@ +From 9eef71ce20fda2b345ef8431359aec96121215bd Mon Sep 17 00:00:00 2001 +From: Uwe Ohse at akiar +Date: Mon, 10 Aug 2026 17:55:28 +0200 +Subject: [PATCH] remove topipe 'feature' + +CVE: CVE-2026-105841 +Upstream-Status: Backport [https://github.com/UweOhse/lrzsz/commit/9eef71ce20fda2b345ef8431359aec96121215bd] + +Backport Changes: +- Retained sys2() and exec2() and their declarations because 0.12.20 + still calls them in its separate, opt-in ZCOMMAND handling. Removing + them as upstream does causes undefined references when linking lrz. +- Omitted NEWS because its 0.13.0 release-note hunk conflicts with the + 0.12.20 release history and is not needed for the security fix. + +(cherry picked from commit 9eef71ce20fda2b345ef8431359aec96121215bd) +Signed-off-by: Hetvi Thakar +--- + src/lrz.c | 193 ++++++++++++++++++++++-------------------------------- + 1 file changed, 79 insertions(+), 114 deletions(-) + +diff --git a/src/lrz.c b/src/lrz.c +index ae3c62d..9c08a3d 100644 +--- a/src/lrz.c ++++ b/src/lrz.c +@@ -76,7 +76,6 @@ int skip_if_not_found; + char *Pathname; + const char *program_name; /* the name by which we were called */ + +-int Topipe=0; + int MakeLCPathname=TRUE; /* make received pathname lower case */ + int Verbose=0; + int Quiet=0; /* overrides logic that would otherwise set verbose */ +@@ -803,9 +802,6 @@ fubar: + shortname ? shortname : "no.name", protname()); + #endif + canit(STDOUT_FILENO); +- if (Topipe && fout) { +- pclose(fout); return ERROR; +- } + if (fout) + fclose(fout); + +@@ -1286,111 +1282,89 @@ procheader(char *name, struct zm_fileinfo *zi) + if (!zmodem_requested && MakeLCPathname && !IsAnyLower(name_static) + && !(zi->mode&UNIXFILE)) + uncaps(name_static); +- if (Topipe > 0) { +- if (Pathname) +- free(Pathname); +- Pathname=malloc((PATH_MAX)*2); +- if (!Pathname) +- error(1,0,_("out of memory")); +- sprintf(Pathname, "%s %s", program_name+2, name_static); +- if (Verbose) { +- vstringf("%s: %s %s\n", +- _("Topipe"), +- Pathname, Thisbinary?"BIN":"ASCII"); +- } +- if ((fout=popen(Pathname, "w")) == NULL) +- return ERROR; +- } else { +- if (protocol==ZM_XMODEM) +- /* we don't have the filename yet */ +- return OK; /* dummy */ +- if (Pathname) +- free(Pathname); +- Pathname=malloc((PATH_MAX)*2); +- if (!Pathname) +- error(1,0,_("out of memory")); +- strcpy(Pathname, name_static); +- if (Verbose) { +- /* overwrite the "waiting to receive" line */ +- vstring("\r \r"); +- vstringf(_("Receiving: %s\n"), name_static); +- } +- checkpath(name_static); +- if (Nflag) +- { +- /* cast because we might not have a prototyp for strdup :-/ */ +- free(name_static); +- name_static=(char *) strdup("/dev/null"); +- if (!name_static) +- { +- fprintf(stderr,"%s: %s\n", program_name, _("out of memory")); +- exit(1); +- } +- } +-#ifdef OMEN +- /* looks like a security hole -- uwe */ +- if (name_static[0] == '!' || name_static[0] == '|') { +- if ( !(fout = popen(name_static+1, "w"))) { +- return ERROR; +- } +- Topipe = -1; return(OK); +- } +-#endif +- if (Thisbinary && zconv==ZCRESUM) { +- struct stat st; +- fout = fopen(name_static, "r+"); +- if (fout && 0==fstat(fileno(fout),&st)) +- { +- int can_resume=TRUE; +- if (zmanag==ZF1_ZMCRC) { +- int r=do_crc_check(fout,zi->bytes_total,st.st_size); +- if (r==ERROR) { +- fclose(fout); +- return ZFERR; +- } +- if (r==ZCRC_DIFFERS) { +- can_resume=FALSE; +- } +- } +- if ((unsigned long)st.st_size > zi->bytes_total) { +- can_resume=FALSE; +- } +- /* retransfer whole blocks */ +- zi->bytes_skipped = st.st_size & ~(1023); +- if (can_resume) { +- if (fseek(fout, (long) zi->bytes_skipped, SEEK_SET)) { +- fclose(fout); +- return ZFERR; +- } +- } +- else +- zi->bytes_skipped=0; /* resume impossible, file has changed */ +- goto buffer_it; +- } +- zi->bytes_skipped=0; +- if (fout) +- fclose(fout); +- } +- fout = fopen(name_static, openmode); ++ ++ if (protocol==ZM_XMODEM) ++ /* we don't have the filename yet */ ++ return OK; /* dummy */ ++ if (Pathname) ++ free(Pathname); ++ Pathname=malloc((PATH_MAX)*2); ++ if (!Pathname) ++ error(1,0,_("out of memory")); ++ strcpy(Pathname, name_static); ++ if (Verbose) { ++ /* overwrite the "waiting to receive" line */ ++ vstring("\r \r"); ++ vstringf(_("Receiving: %s\n"), name_static); ++ } ++ checkpath(name_static); ++ if (Nflag) ++ { ++ /* cast because we might not have a prototyp for strdup :-/ */ ++ free(name_static); ++ name_static=(char *) strdup("/dev/null"); ++ if (!name_static) ++ { ++ fprintf(stderr,"%s: %s\n", program_name, _("out of memory")); ++ exit(1); ++ } ++ } ++ ++ if (Thisbinary && zconv==ZCRESUM) { ++ struct stat st; ++ fout = fopen(name_static, "r+"); ++ if (fout && 0==fstat(fileno(fout),&st)) ++ { ++ int can_resume=TRUE; ++ if (zmanag==ZF1_ZMCRC) { ++ int r=do_crc_check(fout,zi->bytes_total,st.st_size); ++ if (r==ERROR) { ++ fclose(fout); ++ return ZFERR; ++ } ++ if (r==ZCRC_DIFFERS) { ++ can_resume=FALSE; ++ } ++ } ++ if ((unsigned long)st.st_size > zi->bytes_total) { ++ can_resume=FALSE; ++ } ++ /* retransfer whole blocks */ ++ zi->bytes_skipped = st.st_size & ~(1023); ++ if (can_resume) { ++ if (fseek(fout, (long) zi->bytes_skipped, SEEK_SET)) { ++ fclose(fout); ++ return ZFERR; ++ } ++ } ++ else ++ zi->bytes_skipped=0; /* resume impossible, file has changed */ ++ goto buffer_it; ++ } ++ zi->bytes_skipped=0; ++ if (fout) ++ fclose(fout); ++ } ++ fout = fopen(name_static, openmode); + #ifdef ENABLE_MKDIR +- if ( !fout && Restricted < 2) { +- if (make_dirs(name_static)) +- fout = fopen(name_static, openmode); +- } ++ if ( !fout && Restricted < 2) { ++ if (make_dirs(name_static)) ++ fout = fopen(name_static, openmode); ++ } + #endif +- if ( !fout) +- { ++ if ( !fout) ++ { + #ifdef ENABLE_SYSLOG +- int e=errno; ++ int e=errno; + #endif +- zpfatal(_("cannot open %s"), name_static); +- DO_SYSLOG((LOG_ERR,"%s: cannot open: %s", +- protname(),strerror(e))); +- return ERROR; +- } +- } ++ zpfatal(_("cannot open %s"), name_static); ++ DO_SYSLOG((LOG_ERR,"%s: cannot open: %s", ++ protname(),strerror(e))); ++ return ERROR; ++ } ++ + buffer_it: +- if (Topipe == 0) { ++ { + static char *s=NULL; + static size_t last_length=0; + #if defined(F_GETFD) && defined(F_SETFD) && defined(O_SYNC) +@@ -1550,8 +1524,7 @@ report(int sct) + } + + /* +- * If called as [-][dir/../]vrzCOMMAND set Verbose to 1 +- * If called as [-][dir/../]rzCOMMAND set the pipe flag ++ * If called as [-][dir/../]vrz set Verbose to 1 + * If called as rb use YMODEM protocol + */ + static void +@@ -1576,8 +1549,6 @@ chkinvok(const char *s) + protocol=ZM_XMODEM; + if (s[0]=='r' && (s[1]=='b' || s[1]=='y')) + protocol=ZM_YMODEM; +- if (s[2] && protocol!=ZM_XMODEM) +- Topipe = 1; + } + + /* +@@ -2207,12 +2178,6 @@ static int + closeit(struct zm_fileinfo *zi) + { + int ret; +- if (Topipe) { +- if (pclose(fout)) { +- return ERROR; +- } +- return OK; +- } + if (in_tcpsync) { + rewind(fout); + if (!fgets(tcp_buf,sizeof(tcp_buf),fout)) { +-- +2.35.6 diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb index 042cf7fbaca..403266743e0 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb @@ -21,6 +21,7 @@ SRC_URI = "https://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ file://0001-Fix-cross-compilation-using-autoconf-detected-AR.patch \ file://0001-Fix-build-with-GCC-15.patch \ file://0001-lrzsz-convert-K-R-function-definitions-to-ANSI-C-pro.patch \ + file://CVE-2026-105841.patch \ " SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" From patchwork Thu Oct 29 10:30:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 102371 Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.8730.1793269814735903056 for ; Thu, 29 Oct 2026 03:30:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=AAoD9dMf; spf=pass (domain: cisco.com, ip: 173.37.86.79, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=5202; q=dns/txt; s=iport01; t=1793269814; x=1794479414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2mjoNzHsHFVo0MyhDHqLlq/XYB6dKQkDj/Q2JQkvebE=; b=AAoD9dMf6yVrcT2gKuyf7aOEHlxwdw3yjQrLSaBvavsHIY1dP/Rhp155 X56IoZyljnsRl9Ar6lqwfJz7yBbMQbnLdK5dF4a03sAoggH989cjf82Pa HLIYM240UtiCk1Ld+KUuTiHXcHZ/Q/oRmsmKlE3q9ZfT9TFqXpGMfr2Sf DxsE+vl1c76ekMnar20LWUYxO/TVYNZ1eRf5aIzj3IBpnUMmL7RrwY05e aX92kNw9+qRhi5o40na1QbuKcxKuVtEncI5mSpOJaK7n867SsV67i8v8a F7UjcGSSBXI8BDMgQRuuo1yzVXQOW4t6JKGW8lky9ef/XNxY8wVYf2URj g==; X-CSE-ConnectionGUID: uY8RN4L6TryLbseMla6b3Q== X-CSE-MsgGUID: LF6pIOOJQJ6ULred4UcLZw== X-IPAS-Result: A0BIAgAiH+Nq/5D/Ja1aHgEBCxIMggULgld1YENJA5ZIA54cgX4PAQEBD0QNBAEBhQUCjhwCJjQJDgECBAMCAwEBAQEBAQEBAQEBAQoBAQUBAQECAQc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WslDM AoT4icooK04+UCnQ9W7WAe3yENopTYGUNZWVul/4waXx++MvECSB3MPSXhKb9lOWNIKeAHGH 2Shx7vBbQGDepXOIZ5B3t94dQ+PBBU= IronPort-HdrOrdr: A9a23:0PU4QKwX41mwtDuC9cZ7KrPw9L1zdoMgy1knxilNoNJuHfBw8P re+8jzuiWUtN98YhwdcJW7Scu9qBDnhPpICPcqXYtKNTOO0ADDEGgh1/qG/9SKIUPDH4BmuZ uIWpIObuEYdWIK7vrS0U2fD8sqxsWB/eSDgOfTyGoocCRRApsQljuQzm2gYzZLrM4sP+tAKK ah X-Talos-CUID: 9a23:pKX2K2ovTmkhh6/A6je6EZXmUd0UIkf7kFOOH1WpLWxyRZiRQAGao5oxxg== X-Talos-MUID: 9a23:q5iiIgjNnYzdOwrhw1kjAsMpEOk2+4WJL2I0s8s7n9OJOXBNMBOvk2Hi X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,184,1787011200"; d="scan'208";a="533528266" Received: from rcdn-l-core-07.cisco.com ([173.37.255.144]) by rcdn-iport-8.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 29 Oct 2026 10:30:13 +0000 Received: from sjc-ads-5245.cisco.com (sjc-ads-5245.cisco.com [10.28.23.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-07.cisco.com (Postfix) with ESMTPS id CD1D918000228; Thu, 29 Oct 2026 10:30:12 +0000 (GMT) Received: by sjc-ads-5245.cisco.com (Postfix, from userid 1887505) id 73C29CBF201; Thu, 29 Oct 2026 03:30:12 -0700 (PDT) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Cc: xe-linux-external@cisco.com Subject: [OE-core][wrynose][PATCH v2 2/3] lrzsz: fix CVE-2026-105840 Date: Thu, 29 Oct 2026 03:30:11 -0700 Message-Id: <20261029103012.2335950-2-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261029103012.2335950-1-hthakar@cisco.com> References: <20261029103012.2335950-1-hthakar@cisco.com> MIME-Version: 1.0 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5245.cisco.com [10.28.23.9];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.23.9, sjc-ads-5245.cisco.com X-Outbound-Node: rcdn-l-core-07.cisco.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 29 Oct 2026 10:30:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248932 From: Hetvi Thakar When built without PUBDIR support, lrz does not reject absolute pathnames in restricted mode. A malicious sender can therefore write outside the receive directory, subject to the receiving user's filesystem permissions. Backport upstream commit [1], which removes PUBDIR support and makes absolute-path rejection unconditional in the restricted-mode checks, addressing the vulnerability described in [2]. [1] https://github.com/UweOhse/lrzsz/commit/b1fc8a01e3a074f8462a29dca45ed7c8fd2ef665 [2] https://security-tracker.debian.org/tracker/CVE-2026-105840 Signed-off-by: Hetvi Thakar --- Changes in v2: - corrected the advisory reference in commit messsage --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch | 106 ++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 107 insertions(+) create mode 100644 meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch new file mode 100644 index 00000000000..1bf5eae803c --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch @@ -0,0 +1,106 @@ +From b1fc8a01e3a074f8462a29dca45ed7c8fd2ef665 Mon Sep 17 00:00:00 2001 +From: Uwe Ohse at akiar +Date: Mon, 10 Aug 2026 18:09:20 +0200 +Subject: [PATCH] remove PUBDIR, fix the 2nd security hole found by + tristaninsec + +CVE: CVE-2026-105840 +Upstream-Status: Backport [https://github.com/UweOhse/lrzsz/commit/b1fc8a01e3a074f8462a29dca45ed7c8fd2ef665] + +Backport Changes: +- Applied the configure.ac change to configure.in, which is the build + configuration filename used by lrzsz 0.12.20. +- Omitted NEWS because its 0.13.0 release-note hunk conflicts with the + 0.12.20 release history and is not needed for the security fix. + +(cherry picked from commit b1fc8a01e3a074f8462a29dca45ed7c8fd2ef665) +Signed-off-by: Hetvi Thakar +--- + configure.in | 7 ------- + src/lrz.c | 16 +++++----------- + src/lsz.c | 9 ++------- + 3 files changed, 7 insertions(+), 25 deletions(-) + +diff --git a/configure.in b/configure.in +index b7c3c31..504bd32 100644 +--- a/configure.in ++++ b/configure.in +@@ -37,13 +37,6 @@ AC_ARG_ENABLE(timesync, + fi], + [AC_DEFINE(ENABLE_TIMESYNC)]) + AC_SUBST(ENABLE_TIMESYNC) +-AC_ARG_ENABLE(pubdir, +- [--enable-pubdir=/path include support for a public writeable directory], +- [if test "$enableval" = "no" ; then +- : +- else +- AC_DEFINE_UNQUOTED(PUBDIR,"$enableval") +- fi]) + AC_ARG_ENABLE(mkdir, + [--disable-mkdir disable support for creating directories (lrz)], + [if test "$enableval" = "no" ; then +diff --git a/src/lrz.c b/src/lrz.c +index 9c08a3d..168636e 100644 +--- a/src/lrz.c ++++ b/src/lrz.c +@@ -1553,12 +1553,10 @@ chkinvok(const char *s) + } + +-/* +- * Totalitarian Communist pathname processing +- */ + static void + checkpath(const char *name) + { + if (Restricted) { ++ FILE *noleak = NULL; + const char *p; + p=strrchr(name,'/'); + if (p) +@@ -1595,20 +1593,16 @@ checkpath(const char *name) + p=name; + /* don't overwrite any file in very restricted mode. + * don't overwrite hidden files in restricted mode */ +- if ((Restricted==2 || *name=='.') && fopen(name, "r") != NULL) { ++ if ((Restricted==2 || *name=='.') && (noleak = fopen(name, "r")) != NULL) { ++ fclose(noleak); + canit(STDOUT_FILENO); + vstring("\r\n"); + vstringf(_("%s: %s exists\n"), + program_name, name); + bibi(-1); + } +- /* restrict pathnames to current tree or uucppublic */ +- if ( strstr(name, "../") +-#ifdef PUBDIR +- || (name[0]== '/' && strncmp(name, PUBDIR, +- strlen(PUBDIR))) +-#endif +- ) { ++ /* restrict pathnames to the current tree */ ++ if ( strstr(name, "../") || name[0] == '/') { + canit(STDOUT_FILENO); + vstring("\r\n"); + vstringf(_("%s:\tSecurity Violation"),program_name); +diff --git a/src/lsz.c b/src/lsz.c +index 69f4fb8..3dd91b1 100644 +--- a/src/lsz.c ++++ b/src/lsz.c +@@ -1009,13 +1009,8 @@ wcs(const char *oname, const char *remotename) + + + if (Restricted) { +- /* restrict pathnames to current tree or uucppublic */ +- if ( strstr(oname, "../") +-#ifdef PUBDIR +- || (oname[0]== '/' && strncmp(oname, MK_STRING(PUBDIR), +- strlen(MK_STRING(PUBDIR)))) +-#endif +- ) { ++ /* restrict pathnames to current tree */ ++ if ( strstr(oname, "../") || oname[0] == '/') { + canit(STDOUT_FILENO); + vchar('\r'); + error(1,0, +-- +2.35.6 diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb index 403266743e0..ec98f690153 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb @@ -22,6 +22,7 @@ SRC_URI = "https://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ file://0001-Fix-build-with-GCC-15.patch \ file://0001-lrzsz-convert-K-R-function-definitions-to-ANSI-C-pro.patch \ file://CVE-2026-105841.patch \ + file://CVE-2026-105840.patch \ " SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1" From patchwork Thu Oct 29 10:30:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" X-Patchwork-Id: 102370 Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.8733.1793269813984050624 for ; Thu, 29 Oct 2026 03:30:14 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: message contains an insecure body length tag" header.i=@cisco.com header.s=iport01 header.b=DT3/G0LD; spf=pass (domain: cisco.com, ip: 173.37.86.78, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=3497; q=dns/txt; s=iport01; t=1793269814; x=1794479414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HsC5ytA7eOCh5Ap+NAEtFAlmKns0vhAlRPqoMT9rMqk=; b=DT3/G0LDuDWpaA7DCZlJQgy6dLMymVgUkdhI/mkeDhOvgfF3XKPcZJq7 KWuaah60voHRvslGGEaIOrEKnHmVbhIaUuoDX5GiBB5rYxCLKX65dW3Yp syBQlvLdwLt4sto8Ug0FJtUdve53wq1x3eD4tIItN6b05WOcLWDtxQJJg BWAjdgNzUreS1SsJwIV/3WbXAo+8Re4j189KR8wfPLXmy6ZkMeSYdJg0R ZW2/BCfF7IT+5hFz0gKqjxdQx/RqqW1whuviDCgBeHxWE2j++wfXv4r+8 NjQP89T0ryThyqVYS6MDPLO5fkfsXWMNNIG1ikJH3+TJVFXpYGCjBx2F7 w==; X-CSE-ConnectionGUID: ICDrRo71SJK4f5yq4skMdQ== X-CSE-MsgGUID: NLzrYYVlQta+dy7M41lb9Q== X-IPAS-Result: A0BIAgCjH+Nq/43/Ja1aglmCV3VgQ0kDlkgDnhyBfg8B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ddHfFG/3rsw6LGJ/UQUEBAQWF6xrPW1h0L7UNVFJ mQQ+zEytu417EGtQ9z3UhG0rXLCuQQTM+e8CMUg4w2Lj66R6AGDCy1cEnhKaccts4k9QjlCO kK1ou4FzAdH6NW9IU9xPJ/Oxd9uEUD59VM/WBI= IronPort-HdrOrdr: A9a23:51G+HawyaRpj55l0ZEf6KrPw9L1zdoMgy1knxilNoNJuHfBw8P re+8jzuiWUtN98YhwdcJW7Scu9qBDnhPpICPcqXYtKNTOO0ADDEGgh1/qG/9SKIUPDH4BmuZ uIWpIObuEYdWIK7vrS0U2fD8sqxsWB/eSDgOfTyGoocCRRApsQljuQzm2gYzZLrM4sP+tAKK ah X-Talos-CUID: 9a23:d/jZw2mkfnNfduzOXVoU2pbVlUzXOVz24G3qJBDhMkRKFLPIWEbM46BBn/M7zg== X-Talos-MUID: 9a23:hOPC0wUmQZ7jAkfq/BnIlitTBfls2rinS0wczrBa4s2OZBUlbg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,184,1787011200"; d="scan'208";a="541087996" Received: from rcdn-l-core-04.cisco.com ([173.37.255.141]) by rcdn-iport-7.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 29 Oct 2026 10:30:13 +0000 Received: from sjc-ads-5245.cisco.com (sjc-ads-5245.cisco.com [10.28.23.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by rcdn-l-core-04.cisco.com (Postfix) with ESMTPS id D0C51180005D0; Thu, 29 Oct 2026 10:30:12 +0000 (GMT) Received: by sjc-ads-5245.cisco.com (Postfix, from userid 1887505) id 78EAECBF202; Thu, 29 Oct 2026 03:30:12 -0700 (PDT) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Cc: xe-linux-external@cisco.com Subject: [OE-core][wrynose][PATCH v2 3/3] lrzsz: fix CVE-2026-105842 Date: Thu, 29 Oct 2026 03:30:12 -0700 Message-Id: <20261029103012.2335950-3-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261029103012.2335950-1-hthakar@cisco.com> References: <20261029103012.2335950-1-hthakar@cisco.com> MIME-Version: 1.0 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-Client-TLS: ANONYMOUS;sjc-ads-5245.cisco.com [10.28.23.9];TLSv1.3;TLS_AES_256_GCM_SHA384;256 X-Outbound-SMTP-Client: 10.28.23.9, sjc-ads-5245.cisco.com X-Outbound-Node: rcdn-l-core-04.cisco.com List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Thu, 29 Oct 2026 10:30:19 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/248931 From: Hetvi Thakar Overlong sender-controlled filenames can overflow the fixed-size Pathname buffer when copied with strcpy(), causing heap memory corruption. Backport upstream commit [1], which replaces the remaining fixed-size Pathname allocations and copies with strdup(). This allocates space for the complete filename and addresses the vulnerability described in [2]. [1] https://github.com/UweOhse/lrzsz/commit/f8caa7b1b1a3a1bb50cf08677b15be7b17c2956f [2] https://security-tracker.debian.org/tracker/CVE-2026-105842 Signed-off-by: Hetvi Thakar --- Changes in v2: - corrected the advisory reference in commit messsage --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch | 57 +++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 58 insertions(+) create mode 100644 meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch new file mode 100644 index 00000000000..afa6a8ab3b4 --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch @@ -0,0 +1,57 @@ +From f8caa7b1b1a3a1bb50cf08677b15be7b17c2956f Mon Sep 17 00:00:00 2001 +From: Uwe Ohse at akiar +Date: Mon, 10 Aug 2026 18:40:36 +0200 +Subject: [PATCH] avoid buffer overflows by strdup instead of + malloc(PATH_MAX+...). + +CVE: CVE-2026-105842 +Upstream-Status: Backport [https://github.com/UweOhse/lrzsz/commit/f8caa7b1b1a3a1bb50cf08677b15be7b17c2956f] + +Backport Changes: +- Omitted NEWS because its 0.13.0 release-note hunk conflicts with the + 0.12.20 release history and is not needed for the security fix. + +(cherry picked from commit f8caa7b1b1a3a1bb50cf08677b15be7b17c2956f) +Signed-off-by: Hetvi Thakar +--- + src/lrz.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/lrz.c b/src/lrz.c +index 168636e..e11f909 100644 +--- a/src/lrz.c ++++ b/src/lrz.c +@@ -743,11 +743,10 @@ wcreceive(int argc, char **argp) + if (Pathname) + free(Pathname); + errno=0; +- Pathname=malloc(PATH_MAX+1); ++ Pathname=strdup(*argp); + if (!Pathname) + error(1,0,_("out of memory")); + +- strcpy(Pathname, *argp); + checkpath(Pathname); + #ifdef ENABLE_SYSLOG + shortname=strrchr(*argp,'/'); +@@ -1288,15 +1287,16 @@ procheader(char *name, struct zm_fileinfo *zi) + return OK; /* dummy */ + if (Pathname) + free(Pathname); +- Pathname=malloc((PATH_MAX)*2); ++ ++ Pathname=strdup(name_static); + if (!Pathname) + error(1,0,_("out of memory")); +- strcpy(Pathname, name_static); + if (Verbose) { + /* overwrite the "waiting to receive" line */ + vstring("\r \r"); + vstringf(_("Receiving: %s\n"), name_static); + } ++ + checkpath(name_static); + if (Nflag) + { +-- +2.35.6 diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb index ec98f690153..a6d1f62c61e 100644 --- a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb +++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb @@ -23,6 +23,7 @@ SRC_URI = "https://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \ file://0001-lrzsz-convert-K-R-function-definitions-to-ANSI-C-pro.patch \ file://CVE-2026-105841.patch \ file://CVE-2026-105840.patch \ + file://CVE-2026-105842.patch \ " SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1"