From patchwork Fri Nov 6 09:21:23 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: 103248 Received: from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2432.1793956886987921934 for ; Fri, 06 Nov 2026 01:21:27 -0800 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=HYVjTTl1; spf=pass (domain: cisco.com, ip: 173.37.86.76, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=8902; q=dns/txt; s=iport01; t=1793956887; x=1795166487; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=UbZ3GKT4skvr+Ddhxqmw7baSV3a2OZLyHS4iK0kH5/A=; b=HYVjTTl1ngZAlDI4tgcrtxAr1taWVWEu1ux/owSWEtRFE2VV3zqxt76m /OsQB/yX6y3vbiQxBpWauNWy98T3JnzArU3v+1IUqi84kq34EmX61qgNH P/2h7DXotmmjlm/Yn2swMibbUirFSb8EtxJzd7nASXqbJGn1MGNdlnpZZ S5JaF1d4z904RKooO/ER4lIp6TG/A3meCnSS4iySvkFn4ZbNqImbbOnbQ 2qeXlkIYAUHt5YlBviJJN0wrNEDGEeqL7X5D02DsykpmLOUM33ZmztTMy gZXIgwmZLkyGYWtEsiasLvJ0MTFclGm16qb/l7WcKjy9P1SpGlS3YWeBD g==; X-CSE-ConnectionGUID: cIqM5FPkSZ+hx2KTTiNzjg== X-CSE-MsgGUID: vb7ndh2FQRGDGHt01mqjXw== X-IPAS-Result: A0BFAgDpmu1q/4r/Ja1aHgEBCxIMggULgld1YENJA5QngiGeJIF+DwEBAQ9EDQQBAYUFjh8CJjQJDgECBAMCA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LGJ/UQUEBAQWF6xrPW1h0L7UNVFJ mQQ+zEytu417EGtQ9z3UhG0rXLCuQQTM+e8CMUg4w2Lj66R6AGDCy1cF3hKaccts4k9QjlCO kK1ou4FzAdH6NW9IU9xPJ/Nxd9uEUD59VM/WBI= IronPort-HdrOrdr: A9a23:xcXm16qw0TvMy5g0jkpXJPQaV5obeYIsimQD101hICG9Ffbo9f xG88506faZslsssRIb6LO90de7IE80nKQdieJ6AV7IZmbbUQWTQL2KlbGD/xTQXwvj6+Vaya BsN4J6CNH2EBxGqPyS2njcLz7lq+P3l5xBQozlvhNQcT0= X-Talos-CUID: 9a23:beO2rWjAw1cwXlc3QOfeR9ilqjJueVzE6Sr+G0yDOyVpWOe2dWOR3rFmnJ87 X-Talos-MUID: 9a23:xE5gxAXxgQT5oEPq/CHm2zduNJ1G2p6BJG8tjc1fvtCGBTMlbg== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,197,1787011200"; d="scan'208";a="545314113" Received: from rcdn-l-core-01.cisco.com ([173.37.255.138]) by rcdn-iport-5.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 06 Nov 2026 09:21:26 +0000 Received: from sjc-ads-7857.cisco.com (sjc-ads-7857.cisco.com [10.30.222.144]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ciscoit-managed-infra-smtp-auth.cisco.com", Issuer "Internal Private TLS SubCA" (verified OK)) by rcdn-l-core-01.cisco.com (Postfix) with ESMTPS id 8312F180001F2 for ; Fri, 6 Nov 2026 09:21:25 +0000 (GMT) Received: by sjc-ads-7857.cisco.com (Postfix, from userid 1887505) id 293EFCC161E; Fri, 6 Nov 2026 01:21:25 -0800 (PST) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Subject: [OE-core][blacksail][PATCH 1/3] lrzsz: fix CVE-2026-105841 Date: Fri, 6 Nov 2026 01:21:23 -0800 Message-Id: <20261106092125.2587191-1-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 MIME-Version: 1.0 X-Outbound-Client-TLS: VERIFIED;sjc-ads-7857.cisco.com [10.30.222.144];TLSv1.3;TLS_AES_256_GCM_SHA384;256;ciscoit-managed-infra-smtp-auth.cisco.com X-Outbound-SMTP-Client: 10.30.222.144, sjc-ads-7857.cisco.com X-Outbound-Node: rcdn-l-core-01.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 ; Fri, 06 Nov 2026 09:21:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249626 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 --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch | 266 ++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 267 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 0000000000..000cb9b832 --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105841.patch @@ -0,0 +1,266 @@ +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. + +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 042cf7fbac..403266743e 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 Fri Nov 6 09:21:24 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: 103247 Received: from rcdn-iport-2.cisco.com (rcdn-iport-2.cisco.com [173.37.86.73]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2401.1793956886665127260 for ; Fri, 06 Nov 2026 01:21:26 -0800 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=JCQVr4EL; spf=pass (domain: cisco.com, ip: 173.37.86.73, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=5051; q=dns/txt; s=iport01; t=1793956886; x=1795166486; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=7TFDNWvo14yuQftCIhE88mRhqD78h+zk8HAc3nWi5GI=; b=JCQVr4ELQrnxoe4RZjA/c6i5FzMpTYKzj6Fy3ka2urQrEVx/Uq45TGgo +Bqhf8RZNgcHj1f3OGk+NzlehnQIqY2ha3mWfLHED3foS19HPmbOcltPw cRRKoZ3aX+ybpJu9VSK53scWdINGhbuX9VwNCfqzB1+pJgQ3vdfenMCbf I1gS399qVO0x4raszmRw2Sfj274xI+mLZjXFeTRA8y8pMDh5/Uryy3o8n O/TzysVYASZ1fnDADMTb6nfDI79yO4obRo69U1N5UHerWxWAkfDz/wpvC hyjfYUG3MX9mshCf+7KwaEeM6GNVGpiA8tTMbZcaFF/sLYqY54Fes74z+ A==; X-CSE-ConnectionGUID: kBCvjpR+RwWM2cK6Vgy6QQ== X-CSE-MsgGUID: AhzDx7gSSLiErOWdeGa5QQ== X-IPAS-Result: A0AnAABjmu1q/5L/Ja1aHQEBAQEJARIBBQUBgXwIAQsBglZ1YENJA4xvhziCIQOeIYF+DwEBAQ9EDQQBAYUFAo4dAiY0CQ4BAgQDAgMBAQEBAQEBAQEBAQEKAQEFAQEBAgEHBYEOE4ZPDZASAQIBAzIBGAE9HAMBAi8rIwgZGoJoAYJ0AxG8KY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RT9aY9tgv8gzLdA36 mK0cxrSLWQHmNWopbi1r994cRva1fApEFI/ IronPort-HdrOrdr: A9a23:bw/1UanXlEPJKKeGRS4aoHN5LPnpDfIA3DAbv31ZSRFFG/Fw8P re+MjzuiWbtN98YhwdcJW7Scq9qBDnhPtICPcqXItKNTOO0ADDEGgh1/qB/9SKIULDH4BmuZ uIC5IfNPTASX5nkM39/A60V/wkwNWB7eSUoN229QYLcemvAJsQljuQzW2gYytLeDU= X-Talos-CUID: 9a23:5NYd3GOQibTiuu5DWwNM6kwMIIMfbUL4lnzzfXG3GDhQcejA X-Talos-MUID: 9a23:4fEOsAjIkgKm6LVZdXPHoMMpHcd6z7TxB3s2tZQroe67OSFfMmqktWHi X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,197,1787011200"; d="scan'208";a="530772614" Received: from rcdn-l-core-09.cisco.com ([173.37.255.146]) by rcdn-iport-2.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 06 Nov 2026 09:21:25 +0000 Received: from sjc-ads-7857.cisco.com (sjc-ads-7857.cisco.com [10.30.222.144]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ciscoit-managed-infra-smtp-auth.cisco.com", Issuer "Internal Private TLS SubCA" (verified OK)) by rcdn-l-core-09.cisco.com (Postfix) with ESMTPS id 86C141800023D for ; Fri, 6 Nov 2026 09:21:25 +0000 (GMT) Received: by sjc-ads-7857.cisco.com (Postfix, from userid 1887505) id 2CE5CCBEF5A; Fri, 6 Nov 2026 01:21:25 -0800 (PST) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Subject: [OE-core][blacksail][PATCH 2/3] lrzsz: fix CVE-2026-105840 Date: Fri, 6 Nov 2026 01:21:24 -0800 Message-Id: <20261106092125.2587191-2-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261106092125.2587191-1-hthakar@cisco.com> References: <20261106092125.2587191-1-hthakar@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: VERIFIED;sjc-ads-7857.cisco.com [10.30.222.144];TLSv1.3;TLS_AES_256_GCM_SHA384;256;ciscoit-managed-infra-smtp-auth.cisco.com X-Outbound-SMTP-Client: 10.30.222.144, sjc-ads-7857.cisco.com X-Outbound-Node: rcdn-l-core-09.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 ; Fri, 06 Nov 2026 09:21:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249625 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 --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch | 105 ++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 106 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 0000000000..e9820e3a4d --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105840.patch @@ -0,0 +1,105 @@ +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. + +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 403266743e..ec98f69015 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 Fri Nov 6 09:21:25 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: 103246 Received: from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.2400.1793956886511139014 for ; Fri, 06 Nov 2026 01:21:26 -0800 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=ezdrSulJ; spf=pass (domain: cisco.com, ip: 173.37.86.80, mailfrom: hthakar@cisco.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.com; i=@cisco.com; l=3346; q=dns/txt; s=iport01; t=1793956886; x=1795166486; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=RlHdSiUWsCiIVgdFB2UG4GltWZ7hSgTS18a7oxI3F2Q=; b=ezdrSulJu0hlPywTXH/3vTdkrJqNQ0kMLSaf4/OBsUvTylyMzEVS2iMD eDq+gZFoZ+oP2U6EbMVnTkIGR/TDTOhualifwFy6t3aalntJDiNmSsMxl nyLwuapFswZ1dMdXC2x0YYad7StlXSSjLx/HyKw0twFpwaMT517Un0XRP GnptoBFeBJ35Q+ygDf0Z9lysQQOa/HlIL+TtOOYoz70KeYecy3Sgn0kmy S/5kC4aNSuqgvk3sHUobwRWF1Q8Kgj+fNwLDgg6PTvXhLH0WGstNXJ7bl 8U5BIVeuV09P07KORNxgYTzW9zrK+dAPts3iFPDoI/F1OEVzDUmfrar8K A==; X-CSE-ConnectionGUID: Xq7OvzChQg2ppAJC1rjl7w== X-CSE-MsgGUID: IlK470bVQAeBV55fuP684Q== X-IPAS-Result: A0BIAgDpmu1q/4z/Ja1aHgEBCxIMggULgld1YENJA5QngiEDniGBfg8BAQEPRA0EAQGFBQKOHQImNAkOAQIEAwIDAQEBAQEBAQEBAQEBCgEBBQEBAQIBBwWBDhOGTw2QEgECAQMyARgBPRwDAQIvKyM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F6gx7xuAj/KPpQ2YHWMDCDVGbbTKqfMLeNDj7 XfR9/uBONClmOT9pa61nltMkQ6PBA== IronPort-HdrOrdr: A9a23:G4wjWKpJhOZxv6Uw3s9/xaMaV5oHeYIsimQD101hICG9Ffbo8/ xG88506faZslsssTQb6LO90cq7MBbhHOBOgLX5VI3KNGKNhILrFvAB0WKI+VLd8kPFmtK1rZ 0BT4FOTPvtEFN9kcH2pCO8E9om3Z271ZrAv5a485+oJjsaEp2JKGxCe2CmLnE= X-Talos-CUID: 9a23:1ePeqGGxiMPpGx9OqmJX7REzBNIOckTSlm/ICm2TUHxrTOKKHAo= X-Talos-MUID: 9a23:UelX1A9ESfyO+oc5pqnWDxOQf+ZswPjxUEozqLwLkffZaCJtA2nN0A3iFw== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="6.27,197,1787011200"; d="scan'208";a="544130190" Received: from rcdn-l-core-03.cisco.com ([173.37.255.140]) by rcdn-iport-9.cisco.com with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 06 Nov 2026 09:21:25 +0000 Received: from sjc-ads-7857.cisco.com (sjc-ads-7857.cisco.com [10.30.222.144]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ciscoit-managed-infra-smtp-auth.cisco.com", Issuer "Internal Private TLS SubCA" (verified OK)) by rcdn-l-core-03.cisco.com (Postfix) with ESMTPS id 893B9180001D1 for ; Fri, 6 Nov 2026 09:21:25 +0000 (GMT) Received: by sjc-ads-7857.cisco.com (Postfix, from userid 1887505) id 2E3C2CBEF5B; Fri, 6 Nov 2026 01:21:25 -0800 (PST) From: "Hetvi Thakar -X (hthakar - E INFOCHIPS PRIVATE LIMITED at Cisco)" To: openembedded-core@lists.openembedded.org Subject: [OE-core][blacksail][PATCH 3/3] lrzsz: fix CVE-2026-105842 Date: Fri, 6 Nov 2026 01:21:25 -0800 Message-Id: <20261106092125.2587191-3-hthakar@cisco.com> X-Mailer: git-send-email 2.35.6 In-Reply-To: <20261106092125.2587191-1-hthakar@cisco.com> References: <20261106092125.2587191-1-hthakar@cisco.com> MIME-Version: 1.0 X-Outbound-Client-TLS: VERIFIED;sjc-ads-7857.cisco.com [10.30.222.144];TLSv1.3;TLS_AES_256_GCM_SHA384;256;ciscoit-managed-infra-smtp-auth.cisco.com X-Outbound-SMTP-Client: 10.30.222.144, sjc-ads-7857.cisco.com X-Outbound-Node: rcdn-l-core-03.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 ; Fri, 06 Nov 2026 09:21:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249624 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 --- .../lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch | 56 +++++++++++++++++++ meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb | 1 + 2 files changed, 57 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 0000000000..08b5cbb429 --- /dev/null +++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/CVE-2026-105842.patch @@ -0,0 +1,56 @@ +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. + +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 ec98f69015..a6d1f62c61 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"