From patchwork Thu Nov 19 15:22:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104899 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.91.1795101860446653509 for ; Thu, 19 Nov 2026 07:24:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=oPpbUZE5; spf=pass (domain: smile.fr, ip: 209.85.128.42, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4b467581b98so28332765e9.0 for ; Thu, 19 Nov 2026 07:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101859; x=1795706659; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=MzxnyjtxcFd1OM1gIjBP4I9HdDkZqUrRumcy47Cx0X4=; b=oPpbUZE5tuCQ8py9pZVQvXzQcJy00CwNx9J5U2UoSIJOtEhZ1qTW8V79SUZ06+Rb+m /+hV2EXZ8Hh8l3ssqCglIO1iSwQL6ONp/ZecspogEVJ/jr+j1pMdvgBgZdoHaGVqn1DB eTLnPewFUXPGg5Vq65Iqb89FdiPC+mg+AZMzuScwn9/eoWLMY5VYsw2rbAFkR0zZXsat jYwPUqdJuvf7Pkyf1qe8KVyfuoyCHoBW8GIMriPc5SMrpfhlo7E9J3qKrZ+yuZYV4ewY CtNEIKdBaf/75QPq1KD9vqD89R2b3zlZOTMt4tDvUOklUfgALppSWli18oUF+8tF4BOE /vhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101859; x=1795706659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=MzxnyjtxcFd1OM1gIjBP4I9HdDkZqUrRumcy47Cx0X4=; b=xCEAKtt23s/xmsYZHTLZIwHAcZN9RcB/OkdcoY2UMOO0tsRVWK56BovQHHMrcIDrKn cjGG02XOLJ7AZAzReZePm/zlMmENqCi5hMv6AS959fCZvqc9IqMDPTZMHf4lQZbMYYpF f7/bRL2HXYgVJXF1YFPoUxZIlSkFwsV0Dwnrf5gwIh/fLAss9q8zM20tgfDAOLFbxwIJ ThGGhWr+OLrYR4WcCQPyZ9EBV5OhzWzNbHEL6zDCf50peFXBqYy5wx6072pwy5Lq3W4V B/M30lWdncDxv3N92gicHB7CibcCQbxfCf1SPm50O1Abj6HVM8jrUgTdiyNV+g1+6is9 DYaw== X-Gm-Message-State: APuU4Z8ZaON3ddNPgMnntwJM8vrhLjEgjKp/RFG72HGVSj6xWeiqfZg3 DSfhmiyfPhSbu2AcCsSks0SmXftghMZhhMXcwKKQrFIknhkI4NpTlRCtApQEMZ35tLUhDd+gAfA Y8kk64KI= X-Gm-Gg: AYBFou3sx9jCteka4nUV2TewKPzrRVppxF30vAqq1e57UN1k07xUNtH9rMQ9YPLsLp3 a0mIWm17/mh4w2NqiBTLutsl7RjGdSIB+tYMWvAtAV/AKgZb23HzPucEFbv81xmmZrINePMdpr5 HxV/yX4QOAWmQE6BsP67I8T9sYBry7QFMTmixQKF9Nz5KT6LVsFVAboMNozYQBdV3sNDK44wkvt lDfKmNDnP2dsZVSqK0O99pyd1vfVbwNDw4UM552ynbxCgP2oGvTJWFNXYh1RSs99a6A+Ylx+xyc BFJTW3iU4B0hulkpqemnnfPu5x9y240YLKLnoi8xcWkjVjGtuDg9ZZKzNb/iA512qgin8PDtgEr 5iCDS8JMxXK3wQjeD+q94wm8RKSqOk1FcXxtmnMLD9M3pFd8Q45z2wNSxys95TIIeDdzrks1CBf Qk8VF60dsahGHDAbQm0Acb+LuRNDtKujCOlL2VkeAT9tGcY8xbQJY4/xZIQAgP2p5OscFYKoPn6 O6UOiLt6po6QrFgCmgMVU6crFTw+fZ7NErEtsTh9fq/bSjRTZMUuTxWCXiep4RRnbhVo1K2P4Ou oc5lVwnXE0zNy19M4pmIKvomJ7QsDj4WRwuZHbM2BpxGK1zKZWcPnkVLD3+ecmdSLFEeUPodHLm bxC+cL78yMxwLrY2p+iBpyKyo/gtlXcrHWMbjp8DkJo3vOvsCeJF26Kc= X-Received: by 2002:a05:600c:8b71:b0:4a7:76fa:87e9 with SMTP id 5b1f17b1804b1-4bb7da2c635mr116360935e9.21.1795101858443; Thu, 19 Nov 2026 07:24:18 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:18 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 01/19] nasm: fix CVE-2026-6067 Date: Thu, 19 Nov 2026 16:22:27 +0100 Message-ID: <8d5ed63e0e7bf7d927332d14e857b1c56db919dd.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250684 From: Kris Gavvala When using obj output format, specifying more than 256 segments in the GROUP directive of the .asm file causes a heap-buffer-overflow. This patch applies the upstream fix given by the commit in [1] to address the issue in [2]. [1] https://github.com/netwide-assembler/nasm/commit/8890d723d0aa9ed1a790e2ce1c55eee8dfa0cf94 [2] https://github.com/netwide-assembler/nasm/issues/203 [3] https://nvd.nist.gov/vuln/detail/cve-2026-6067 Signed-off-by: Kris Gavvala Signed-off-by: Bastien Jauny Signed-off-by: Fabien Thomas --- .../nasm/nasm/CVE-2026-6067.patch | 36 +++++++++++++++++++ meta/recipes-devtools/nasm/nasm_2.16.03.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2026-6067.patch diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2026-6067.patch b/meta/recipes-devtools/nasm/nasm/CVE-2026-6067.patch new file mode 100644 index 0000000000..f637a688e3 --- /dev/null +++ b/meta/recipes-devtools/nasm/nasm/CVE-2026-6067.patch @@ -0,0 +1,36 @@ +From 8bc3400afa0a3e46c890f8887d2f9bb5acc14024 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Mon, 29 Jun 2026 13:53:14 -0700 +Subject: [PATCH] outobj: fix buffer overflow when too many segments in a group + +The number of entries in a group was hard-coded, but not enforced. + +CVE: CVE-2026-6067 +Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/8890d723d0aa9ed1a790e2ce1c55eee8dfa0cf94] + +Reported-by: +Fixes: https://github.com/netwide-assembler/nasm/issues/203 +Signed-off-by: H. Peter Anvin (Intel) +Signed-off-by: Kris Gavvala +--- + output/outobj.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/output/outobj.c b/output/outobj.c +index fc336c194..ad4adb373 100644 +--- a/output/outobj.c ++++ b/output/outobj.c +@@ -1641,6 +1641,10 @@ obj_directive(enum directive directive, char *value) + /* + * Now p contains a segment name. Find it. + */ ++ if (grp->nentries >= GROUP_MAX) { ++ nasm_nonfatal("too many segments in a group"); ++ return DIRR_ERROR; ++ } + for (seg = seghead; seg; seg = seg->next) + if (!strcmp(seg->name, p)) + break; +-- +2.43.0 + diff --git a/meta/recipes-devtools/nasm/nasm_2.16.03.bb b/meta/recipes-devtools/nasm/nasm_2.16.03.bb index 281f3940e7..729dfe8916 100644 --- a/meta/recipes-devtools/nasm/nasm_2.16.03.bb +++ b/meta/recipes-devtools/nasm/nasm_2.16.03.bb @@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=90904486f8fbf1861cf42752e1a39efe" SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \ file://0001-stdlib-Add-strlcat.patch \ file://0002-Add-debug-prefix-map-option.patch \ + file://CVE-2026-6067.patch \ " SRC_URI[sha256sum] = "bef3de159bcd61adf98bb7cc87ee9046e944644ad76b7633f18ab063edb29e57" From patchwork Thu Nov 19 15:22:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104900 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.80.1795101861260811340 for ; Thu, 19 Nov 2026 07:24:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=NVKmjWeL; spf=pass (domain: smile.fr, ip: 209.85.128.54, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4bb666304fdso9080455e9.0 for ; Thu, 19 Nov 2026 07:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101859; x=1795706659; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=ZwRaXj4o+I3S08WSc1Cqboxjy7Z3l6pZB2aLUpSSWjk=; b=NVKmjWeLb6y6LbtylgjX84gvkhtHm7LlC5Z566lDPSBjvAaLckTnz3yHZ2ZpWcq4Am JTZ7tTwvxAuyJKiJvHKk7UlFsCHKidjWdJtBCPEU4S+/B2lBP76OcUzUMT3+3K2tC5jy w3TWih2rIHBX1dnqNUPthNWCo/kib0KLCgbNR4TKwKOtVmRSE5IgYq7oq8e18+Wp/Ilu 14nh/pvxPn2SKax1QIfkwJO/PG6H72U6d/0px/e9flHzbKPq24wZIViM6peyoArvt50F 0aLy0tE6TURMIkylB1usWDY59PsqC+QZMoNHHo2HyGdHGGmedD3qY093sXwAgKcoxuhL wozw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101859; x=1795706659; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=ZwRaXj4o+I3S08WSc1Cqboxjy7Z3l6pZB2aLUpSSWjk=; b=EUz+e5B6mnDczrkzncHLn5QCt6NZFfpXjZMh9Gqg4ieaEWH2eRpjPBnVYtJdu2CrqG Acgx6S2V8Lfh4SDs0eMclZknwx3nVHYOohFNvdaZKctWoqhl3hzm20OwT6bHIlqzDEgN AiLSY2HcycHgkhgwAfa0q+4E5yGVXU5gpZEZGrtMdxb9nQAeh8pXnYLmnqNsaDoZBk12 UaOEq7lzZz1elLFFxR4/u6IRWXyFB/odMbGvhhTFtJZVgvk3msd0DJPtLavTaDCqM0eQ vA6DRFiFtYy3rvuJuEMNmhjNrTt+2nbnb697JcpcxDBnxgvp1NUA1UBQTFu1hka33sIp nDdw== X-Gm-Message-State: APuU4Z9QEf0gyom+cLYDYsTJXftIjyZ5vt/PuuI03Hu2KeNcZtWWihly gdBBrf+rCy/CJLUoQaRwf5daMSf61ZcSdWui1EFyUnsVtgbZFXygZQoBQaI+qHf3lalpaT3DRc8 mosxGoww= X-Gm-Gg: AYBFou1fRhV6UtaipUSeHsqAooFwx5sqEKZOA65hjjL4oW36jgV6pFZ5RJB/wdEKqVA xnJvAFH26DPQM8X+r60yT17CPLfpFzd3j7GI6nacjhzRuRqa7I1GlToz3F06r8euP+zsqvDluDg AhXUFQVVoYjyLmFP3HBSDJJpAgCSna/rSrGIdkcQ5zg2jcgAMHzyVsnB3snLibyseDteEU+Qq+M jnttTZR12VKRcdyJVAn8oQbFrB5d6DjcHuC7PXPcEmW12kU0R54tRH+cSIDNAr8WIJmS7TrDuKt qwrBlyrhg1WDcLgAn+B0qlZMUMb6TtbrVYcjgikMNQctfmCT7sNS5UA3ZxVHC7b4pc3PzqMV2hF PfDQ4MxjPqqTE9zTgUrH55BDAgB6XV05cN0VHrBzRwlobJGDvNFTOBDl5PdIQg5G/MF66JcpRCl eBesSCBU/HIQRGZwHTclIY9VSC3ODqnZruQKvTTVYNDleoN1KNtf655QnZtbT9PLlZG3MOjQPMY L4VPtOxHVfJ/hUmOzBNHvJ6e3np+O/Y08cOuS0vrevXFoeKlDIsrmcStO3jCo3NQUGDpvFitl9k ZIh6aE4RNZUNvEZWAIdTIk8Z9445oE0klXi6neQdXozHfoZvNbCingTjVzbPqO/pNN1qbE8JYvw 0MdFsu0FivPjKfZLxt320Kw/yfvvKXW3MlPVJVup8/xsWGtFdzi9BTfA= X-Received: by 2002:a05:600c:468b:b0:4bb:5fd1:92aa with SMTP id 5b1f17b1804b1-4bb8612334cmr32388355e9.15.1795101859062; Thu, 19 Nov 2026 07:24:19 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:18 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 02/19] nasm: fix CVE-2026-6068 Date: Thu, 19 Nov 2026 16:22:28 +0100 Message-ID: <6a925592ce2eef44f568f08a8669e612a47e4da4.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250685 From: Kris Gavvala - CVE-2026-6068-1.patch applies the upstream fix in [2], addressing the issue in [1]. - CVE-2026-6068-2.patch applies [3], adding helper functions used in [2]. - CVE-2026-6068-3.patch applies [4], which prevents the compilation warning: assignment discards 'const' qualifier [1] https://github.com/netwide-assembler/nasm/issues/222 [2] https://github.com/netwide-assembler/nasm/commit/7bc82e7daf4cceb6a8af7ad2876485c9b4b01a56 [3] https://github.com/netwide-assembler/nasm/commit/44245e4684be1fac6c2fb7ac67dce8a55a574956 [4] https://github.com/netwide-assembler/nasm/commit/7b4e77dae29156a283d31fe707939ce21bf3eb3e Signed-off-by: Kris Gavvala Signed-off-by: Bastien Jauny Signed-off-by: Fabien Thomas --- .../nasm/nasm/CVE-2026-6068-1.patch | 98 +++++++++++++++++++ .../nasm/nasm/CVE-2026-6068-2.patch | 80 +++++++++++++++ .../nasm/nasm/CVE-2026-6068-3.patch | 51 ++++++++++ meta/recipes-devtools/nasm/nasm_2.16.03.bb | 3 + 4 files changed, 232 insertions(+) create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2026-6068-1.patch create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2026-6068-2.patch create mode 100644 meta/recipes-devtools/nasm/nasm/CVE-2026-6068-3.patch diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-1.patch b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-1.patch new file mode 100644 index 0000000000..44f691610a --- /dev/null +++ b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-1.patch @@ -0,0 +1,98 @@ +From e3a3fb40d21edb638f8191465574aaaaaacb336d Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin (Intel)" +Date: Fri, 26 Jun 2026 17:27:47 -0700 +Subject: [PATCH 2/3] asm/nasm.c: fix use-after-free for -M* options in -@ + files + +-M* options in response files would hold on to a pointer to the new +value, but in response files that is not a persistent buffer. Make +sure to make a copy instead. + +This uses the new nasm_str[dup]to() helpers. + +(Note that calling nasm_free() on a NULL pointer is guaranteed safe.) + +CVE: CVE-2026-6068 +Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/7bc82e7daf4cceb6a8af7ad2876485c9b4b01a56] + +Reported-by: +Fixes: https://github.com/netwide-assembler/nasm/issues/222 +Fixes: CVE-2026-6068 +Signed-off-by: H. Peter Anvin (Intel) +Signed-off-by: Kris Gavvala +--- + asm/nasm.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/asm/nasm.c b/asm/nasm.c +index 49fa00eb7..98bde83cb 100644 +--- a/asm/nasm.c ++++ b/asm/nasm.c +@@ -121,8 +121,8 @@ static unsigned int operating_mode; + /* Dependency flags */ + static bool depend_emit_phony = false; + static bool depend_missing_ok = false; +-static const char *depend_target = NULL; +-static const char *depend_file = NULL; ++static char *depend_target = NULL; ++static char *depend_file = NULL; + struct strlist *depend_list; + + static bool want_usage; +@@ -709,6 +709,8 @@ int main(int argc, char **argv) + stdscan_cleanup(); + src_free(); + strlist_free(&include_path); ++ nasm_free(depend_file); ++ nasm_free(depend_target); + + return terminate_after_phase; + } +@@ -750,7 +752,8 @@ static void copy_filename(const char **dst, const char *src, const char *what) + } + + /* +- * Convert a string to a POSIX make-safe form ++ * Convert a string to a POSIX make-safe form; returns a newly allocated ++ * string. + */ + static char *quote_for_pmake(const char *str) + { +@@ -830,7 +833,8 @@ static char *quote_for_pmake(const char *str) + } + + /* +- * Convert a string to a Watcom make-safe form ++ * Convert a string to a Watcom make-safe form; returns a newly allocated ++ * string. + */ + static char *quote_for_wmake(const char *str) + { +@@ -1188,20 +1192,20 @@ static bool process_arg(char *p, char *q, int pass) + case 'D': + operating_mode |= OP_DEPEND; + if (q && (q[0] != '-' || q[1] == '\0')) { +- depend_file = q; ++ nasm_strdupto(&depend_file, q); + advance = true; + } + break; + case 'F': +- depend_file = q; ++ nasm_strdupto(&depend_file, q); + advance = true; + break; + case 'T': +- depend_target = q; ++ nasm_strdupto(&depend_target, q); + advance = true; + break; + case 'Q': +- depend_target = quote_for_make(q); ++ nasm_strto(&depend_target, quote_for_make(q)); + advance = true; + break; + case 'W': +-- +2.43.0 + diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-2.patch b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-2.patch new file mode 100644 index 0000000000..4b2334776a --- /dev/null +++ b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-2.patch @@ -0,0 +1,80 @@ +From 4dfcfe9b333230788be7328e8fe943bda1610011 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin (Intel)" +Date: Fri, 26 Jun 2026 17:25:23 -0700 +Subject: [PATCH 1/3] Add nasm_strdupto() and nasm_strto(), to replace a string + variable + +It is common enough that one wants to set a string pointer to a newly +allocated string, freeing the old one if it is not NULL. + +Add specific helper functions for this. + +CVE: CVE-2026-6068 +Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/44245e4684be1fac6c2fb7ac67dce8a55a574956] + +Signed-off-by: H. Peter Anvin (Intel) +Signed-off-by: Kris Gavvala +--- + include/nasmlib.h | 23 +++++++++++++++++++++++ + nasmlib/alloc.c | 11 +++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/include/nasmlib.h b/include/nasmlib.h +index ed4222b11..fae86d3cd 100644 +--- a/include/nasmlib.h ++++ b/include/nasmlib.h +@@ -102,6 +102,29 @@ char * safe_alloc nasm_strndup(const char *, size_t); + char * safe_alloc nasm_strcat(const char *one, const char *two); + char * safe_alloc end_with_null nasm_strcatn(const char *one, ...); + ++/* ++ * Replace a string in a string pointer variable with a nasm_strdup() ++ * copy of the argument on the right, freeing the contents of the ++ * previous contents of the variable if non-NULL. ++ * ++ * If *str is NULL, simply return the old value of *ptrp. ++ */ ++char *nasm_strdupto(char **ptrp, const char *str); ++ ++/* ++ * Similar, but the new pointer must already have been heap allocated ++ * by the creating function. ++ */ ++static inline char *nasm_strto(char **ptrp, char *str) ++{ ++ char *ptr = *ptrp; ++ if (!str) ++ return ptr; ++ if (ptr) ++ nasm_free(ptr); ++ return *ptrp = str; ++} ++ + /* + * nasm_[v]asprintf() are variants of the semi-standard [v]asprintf() + * functions, except that we return the pointer instead of a count. +diff --git a/nasmlib/alloc.c b/nasmlib/alloc.c +index b77d48217..fa3e9e996 100644 +--- a/nasmlib/alloc.c ++++ b/nasmlib/alloc.c +@@ -101,6 +101,17 @@ char *nasm_strndup(const char *s, size_t len) + return memcpy(p, s, len); + } + ++char *nasm_strdupto(char **ptrp, const char *str) ++{ ++ char *ptr = *ptrp; ++ if (str) { ++ if (ptr) ++ nasm_free(ptr); ++ *ptrp = ptr = nasm_strdup(str); ++ } ++ return ptr; ++} ++ + char *nasm_strcat(const char *one, const char *two) + { + char *rslt; +-- +2.43.0 + diff --git a/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-3.patch b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-3.patch new file mode 100644 index 0000000000..b25a6de583 --- /dev/null +++ b/meta/recipes-devtools/nasm/nasm/CVE-2026-6068-3.patch @@ -0,0 +1,51 @@ +From db6cbdf6244ddb729b7c6331f62f42334bc00550 Mon Sep 17 00:00:00 2001 +From: Kris Gavvala +Date: Wed, 23 Sep 2026 00:57:12 -0500 +Subject: [PATCH] Drop const return type of filename_set_extension() + +filename_set_extension() always returns a newly allocated string +buffer, drop the "const" from the return type. + +CVE: CVE-2026-6068 +Upstream-Status: Backport [https://github.com/netwide-assembler/nasm/commit/7b4e77dae2] + +Signed-off-by: H. Peter Anvin (Intel) +Signed-off-by: Kris Gavvala +--- + include/nasmlib.h | 5 +++-- + nasmlib/filename.c | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/include/nasmlib.h b/include/nasmlib.h +index 494d7842e..2771c5951 100644 +--- a/include/nasmlib.h ++++ b/include/nasmlib.h +@@ -366,9 +366,10 @@ struct debug_prefix_list { + extern struct debug_prefix_list *debug_prefixes; + + /* +- * Add/replace or remove an extension to the end of a filename ++ * Add/replace or remove an extension to the end of a filename; ++ * returns a newly allocated buffer with the modified filename. + */ +-const char *filename_set_extension(const char *inname, const char *extension); ++char *filename_set_extension(const char *inname, const char *extension); + char *filename_debug_remap(char *dest, char const *inname, size_t len); + + /* +diff --git a/nasmlib/filename.c b/nasmlib/filename.c +index 0e27f69e2..85c42a21c 100644 +--- a/nasmlib/filename.c ++++ b/nasmlib/filename.c +@@ -16,7 +16,7 @@ struct debug_prefix_list *debug_prefixes = NULL; + * field at the very end of the filename. Returns a newly allocated + * string buffer. + */ +-const char *filename_set_extension(const char *inname, const char *extension) ++char *filename_set_extension(const char *inname, const char *extension) + { + const char *q = inname; + char *p; +-- +2.43.0 + diff --git a/meta/recipes-devtools/nasm/nasm_2.16.03.bb b/meta/recipes-devtools/nasm/nasm_2.16.03.bb index 729dfe8916..d2608e3e20 100644 --- a/meta/recipes-devtools/nasm/nasm_2.16.03.bb +++ b/meta/recipes-devtools/nasm/nasm_2.16.03.bb @@ -9,6 +9,9 @@ SRC_URI = "http://www.nasm.us/pub/nasm/releasebuilds/${PV}/nasm-${PV}.tar.bz2 \ file://0001-stdlib-Add-strlcat.patch \ file://0002-Add-debug-prefix-map-option.patch \ file://CVE-2026-6067.patch \ + file://CVE-2026-6068-1.patch \ + file://CVE-2026-6068-2.patch \ + file://CVE-2026-6068-3.patch \ " SRC_URI[sha256sum] = "bef3de159bcd61adf98bb7cc87ee9046e944644ad76b7633f18ab063edb29e57" From patchwork Thu Nov 19 15:22:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104901 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.92.1795101861607222263 for ; Thu, 19 Nov 2026 07:24:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=eaGzsdLx; spf=pass (domain: smile.fr, ip: 209.85.128.43, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4b467581b98so28333175e9.0 for ; Thu, 19 Nov 2026 07:24:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101860; x=1795706660; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=evc0hHMoD9tNO6nKijJp5ZIYc4F4YcTlSYQR6X4YCE4=; b=eaGzsdLx/Gs7fGX+g0AMcigmET8BEbnzodXAouY+yAc7EjZOxXdDv2GAkc5zdY8jyU pQRxUQBcNdDkuq95TfHq6PUsIVdBKGQAJfDXknw1mbIy48YaoOndmeNz2O9/rqnW5Won bArzaMdpGC9TNrcOc7s/OE7PGsuAYUY0aX8qizYNLtvuPEFRl+ntdprWDhlO/FBViNNo qcJgazWKzj8ts/1/5KM6//5QKSlLwJUbspqnmfw0aqGpTro6xbEcj9hA4LQhXrZ+6jcO J75a0+DDeZxjXN+QLsG/lgUYM+AZtkNFHIs0R7dmxFB0EZCZpAjBuLu9SYspXIegXPXC Ntfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101860; x=1795706660; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=evc0hHMoD9tNO6nKijJp5ZIYc4F4YcTlSYQR6X4YCE4=; b=Xb161NJau+4bScmqI6I+pLHkikNBc/X1CT9IleR62f3ydff/e0N1HtxlyZF8YRV42/ W3qpgAcGtdYhSdN0ERjbODVbmkAOp1LxikiP1DwbZc0FzEoNIvgtog0GnLv3zVwj51SF gdBWh6kPIjMFmkPvOXfleW/cFnhzP2SCS+HNM524SfgpSffTcNXJEU20mQu905oYcswo WRruCVWsUa4v+oq1PIMKQzcc1XbwpiMVvdJ9IxQO4zFbzHFFjCgyNbenlGOVJXd/vjhz HWsRi9LmnYW4n9euhysBsMVIGZyJgctNsDcLezQWf+XVLRu9Gm9NwCB890KV5VwKLQPZ zGww== X-Gm-Message-State: APuU4Z8cC/vy3SufcRwoAIc7Xu+RnRJvMW+0wRuwjHevLVQJfCpja2AE BRpLpkFXMi/5qRBVIcDm686/UEuz8BN5dOvl1Kme0Dc952GrUb9dm8+Tfsn+v6eyCR9HqUxk3Jg DSb2+lnw= X-Gm-Gg: AYBFou2Exzuf0R0aupHKEQ9375MyOR+c+VPaABIGUT6lirhq061uKHOVgRMPrcgBDXA /ZmT++HiSs2Da131Ol2+X3KW8F/zzdsqtGxS9fZ0pRqZWVSSYgp1dzcqnyanBc6ePMPpmaI4exI rPfY8fxtWs6hOJ7aQGJBfhD0CKHm+UPvEBxhX4qdUDa9U0ESnh865ClS1JOTPitcK9dAgkqrJuV CgsWBEIPQvURcGpivF3q3lEhbsv+GuF69Sz6oCvQBq4lUPWBzKs+5l8zzB15dy2MfFCPuoB3YeP P3YxW83I9W8K8CLxhEPtnA/LBH/zLIpYmF8i9/z0O7sVH6mtizq5xcWnkXGG7JWN+aZGWpX/RYH r8SOi4CNN6q/F4T2Rs9ZApvshK4RrqRIi9ruJZSAYbnrUZ/B5kXfHgmn8t+D8BxITsNqbmP9IB1 Nyo/s9oajksgZmd2YIUdH9wMz8F6UueqgquRWuYFz5iYsp00p0Sovm2lDFj+bFzRXLlH0kSq56y AY31axjcGU7AHv+N24pu9caR35HR45+pXunENVSVY2cRJKCMHFBWpxaNbiO4fAF8NEa3+j4HgiB OrmwyICwB6YuVclB+BM5VCRIkkvttDj23RZakTXt39ji2JgasPoi0nPc+6DZYOH/I5SkJk26QYw kjgsYwVVeTz7PxZUlVwq/mqYEPsstmy0FlOWJ7fTcOIjyGNzNrBwgnCU= X-Received: by 2002:a05:600c:c171:b0:4a1:d537:1c8d with SMTP id 5b1f17b1804b1-4bb7da283b9mr124732625e9.19.1795101859574; Thu, 19 Nov 2026 07:24:19 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:19 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 03/19] vim: Fix for CVE-2026-73076 Date: Thu, 19 Nov 2026 16:22:29 +0100 Message-ID: <18f649f788030bb828ae7ded61e2307c89360342.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250686 Pick the patch from [1], also referenced in the NVD report [2]. [1] https://github.com/vim/vim/commit/581a2f3ac9c6f96a26324f6b2c8c11415fd0d452 [2] https://nvd.nist.gov/vuln/detail/CVE-2026-73076 Signed-off-by: Hitendra Prajapati Signed-off-by: Bastien Jauny [fatho: fix indentations to stay consistent with upstream] Signed-off-by: Fabien Thomas --- .../vim/files/CVE-2026-73076.patch | 155 ++++++++++++++++++ meta/recipes-support/vim/vim.inc | 1 + 2 files changed, 156 insertions(+) create mode 100644 meta/recipes-support/vim/files/CVE-2026-73076.patch diff --git a/meta/recipes-support/vim/files/CVE-2026-73076.patch b/meta/recipes-support/vim/files/CVE-2026-73076.patch new file mode 100644 index 0000000000..87f2d4b62f --- /dev/null +++ b/meta/recipes-support/vim/files/CVE-2026-73076.patch @@ -0,0 +1,155 @@ +From c74d28b907af0b1f1621f881f098374124bcd53d Mon Sep 17 00:00:00 2001 +From: Christian Brabandt +Date: Fri, 24 Jul 2026 17:43:51 +0200 +Subject: [PATCH] patch 9.2.0847: [security]: vimball: code execution via + .VimballRecord file + +Problem: [security]: vimball: code execution via .VimballRecord file + (tdjackey) +Solution: Forbid arbitrary commands, fix broken directory deletion code, + refactor code + +Github Security Advisory: +https://github.com/vim/vim/security/advisories/GHSA-r22p-fhw4-84p2 +Signed-off-by: Christian Brabandt + +Backport Changes: + +The .VimballRecord rejection is placed after the fenc/filecnt extraction +because the earlier strange-filename check block present in upstream 9.2 does +not exist in the 9.1.1683 vim sources. +Omitted src/testdir/test_plugin_vimball.vim because the current vim source +archive does not include it. + +CVE: CVE-2026-73076 +Upstream-Status: Backport [https://github.com/vim/vim/commit/581a2f3ac9c6f96a26324f6b2c8c11415fd0d452] +Signed-off-by: Hitendra Prajapati +--- + runtime/autoload/vimball.vim | 62 +++++++++++++++++++++--------------- + 1 file changed, 37 insertions(+), 25 deletions(-) + +diff --git a/runtime/autoload/vimball.vim b/runtime/autoload/vimball.vim +index 6456984411..5791c7f44a 100644 +--- a/runtime/autoload/vimball.vim ++++ b/runtime/autoload/vimball.vim +@@ -18,9 +18,9 @@ if &cp || exists("g:loaded_vimball") + finish + endif + let g:loaded_vimball = "v37" +-if v:version < 702 ++if v:version < 900 + echohl WarningMsg +- echo "***warning*** this version of vimball needs vim 7.2" ++ echo "***warning*** this version of vimball needs vim 9.0" + echohl Normal + finish + endif +@@ -270,6 +270,13 @@ fun! vimball#Vimball(really,...) + let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','') + let filecnt = filecnt + 1 + " call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc) ++ if fname =~? '\%(^\|/\)\.VimballRecord$' ++ echomsg "(Vimball) Forbidding .VimballRecord filename, aborting..." ++ exe "tabn ".curtabnr ++ bw! Vimball ++ call s:ChgDir(curdir) ++ return ++ endif + + if a:really + echomsg "extracted <".fname.">: ".fsize." lines" +@@ -309,7 +316,7 @@ fun! vimball#Vimball(really,...) + else + call mkdir(dirname) + endif +- call s:RecordInVar(home,"rmdir('".dirname."')") ++ call s:RecordDirInVar(dirname) + endif + endwhile + endif +@@ -343,7 +350,7 @@ fun! vimball#Vimball(really,...) + exe "silent w! ".fnameescape(fnamepath) + endif + echo "wrote ".fnameescape(fnamepath) +- call s:RecordInVar(home,"call delete('".fnamepath."')") ++ call s:RecordInVar(fnamepath) + endif + + " return to tab with vimball +@@ -464,11 +471,17 @@ fun! vimball#RmVimball(...) + let s:VBRstring= substitute(exestring,'call delete(','','g') + let s:VBRstring= substitute(s:VBRstring,"[')]",'','g') + " call Decho("exe ".exestring) +- sil! keepalt keepjumps exe exestring ++ let nr_files= 0 ++ for line in split(exestring, '|') ++ if line !~ '^call delete(''[^'']\{-}''\(,"d"\)\?)$' ++ echomsg "ignoring .VimballRecord entry: " line ++ else ++ sil! keepalt keepjumps exe line ++ let nr_files+= 1 ++ endif ++ endfor + sil! keepalt keepjumps d +- let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g")) +-" call Decho("exestring<".exestring.">") +- echomsg "removed ".exestring." files" ++ echomsg "removed ".nr_files." files" + else + let s:VBRstring= '' + let curfile = substitute(curfile,'\.vmb','','') +@@ -622,23 +635,22 @@ fun! s:ChgDir(newdir) + endfun + + " --------------------------------------------------------------------- +-" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2 +-fun! s:RecordInVar(home,cmd) +-" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)") +- if a:cmd =~ '^rmdir' +-" if !exists("s:recorddir") +-" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'') +-" else +-" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'') +-" endif +- elseif !exists("s:recordfile") +- let s:recordfile= a:cmd +- else +- let s:recordfile= s:recordfile."|".a:cmd ++" s:RecordInVar: record a un-vimball file deletion in the .VimballRecord file {{{2 ++fun! s:RecordInVar(file) ++ if !exists("s:recordfile") ++ let s:recordfile=[] + endif +-" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">") ++ call add(s:recordfile, $'call delete({string(a:file)})') + endfun + ++" s:RecordDirInVar: record a un-vimball dir deletion in the .VimballRecord file {{{2 ++fun! s:RecordDirInVar(dir) ++ if !exists("s:recorddir") ++ let s:recorddir = [] ++ endif ++ call add(s:recorddir, $'call delete({string(a:dir)},"d")') ++ endfun ++ + " --------------------------------------------------------------------- + " s:RecordInFile: {{{2 + fun! s:RecordInFile(home) +@@ -660,11 +672,11 @@ fun! s:RecordInFile(home) + setlocal ma + $ + if exists("s:recordfile") && exists("s:recorddir") +- let cmd= cmd.s:recordfile."|".s:recorddir ++ let cmd= cmd.join(s:recordfile, '|')."|".join(s:recorddir, '|') + elseif exists("s:recorddir") +- let cmd= cmd.s:recorddir ++ let cmd= cmd.join(s:recorddir, '|') + elseif exists("s:recordfile") +- let cmd= cmd.s:recordfile ++ let cmd= cmd.join(s:recordfile, '|') + else + " call Dret("s:RecordInFile : neither recordfile nor recorddir exist") + return +-- +2.50.1 + diff --git a/meta/recipes-support/vim/vim.inc b/meta/recipes-support/vim/vim.inc index f84d2a9688..3a8b67085a 100644 --- a/meta/recipes-support/vim/vim.inc +++ b/meta/recipes-support/vim/vim.inc @@ -58,6 +58,7 @@ SRC_URI = "git://github.com/vim/vim.git;branch=master;protocol=https \ file://CVE-2026-73074.patch \ file://CVE-2026-73077.patch \ file://CVE-2026-73078.patch \ + file://CVE-2026-73076.patch \ " PV .= ".1683" From patchwork Thu Nov 19 15:22:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104898 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.81.1795101862407191590 for ; Thu, 19 Nov 2026 07:24:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=Ct6hQR6W; spf=pass (domain: smile.fr, ip: 209.85.128.47, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-49d05d51553so17002875e9.2 for ; Thu, 19 Nov 2026 07:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101861; x=1795706661; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=D8C8V9sOqamg7GzJx5JcpMbi+s5GXHeioJp2MeKzPZY=; b=Ct6hQR6W8u/Z+9MUDdyrS7EM+tYisET+jhxh95LQ7EIVVaNn4/UrdlOTP0A42hAvQL gONXsjhNOhjesX9KmUKpGg0a/G0qI9XjpTiTK9QvsAC+XzzyrAROLh5ygcAd6rLFAhsx q0d+7GCo+9JoH/eZKKSwNDe7JHqaSuSwrXK2ZOcA9HBhBi0xCqtLPQtctVm6Rd9NaHVf JE0puYMhbmzlmBcY7dH4mJxVfmd7IrOo1a6lKk65BSohbhZJ8tPEm49uAauNcrRjIxPz FYxMex95hRnlPJVzzJDzeDpu2ECdbrY5ZB4GmTTwLgwnp6Fq3k1nhhPUD4s0UEukHyKv KmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101861; x=1795706661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=D8C8V9sOqamg7GzJx5JcpMbi+s5GXHeioJp2MeKzPZY=; b=2SxZncsr5QOcOjczogCV+1pOKIhVPBCwpe1mfazFJUIMEN+ZWoon//ZG/J7AlQrgiX r9NM0JochJJuaDXpis1c0khHdkI/4ndRpycgxoZLIKiHkLeFsrhBfzjWAwbutF48rkJb WQ+k8HTyBzocQBmJSvnRwbEAvFno8SzH6Q4qHQZhEVRfUJIiWlkEkbSXD6/PKPTP/O1b JnD0f4+WnCQhXDFXxjx0MExKecOsaTlr2POZMJh0Qt4M8gXnLiRPxLdkoFAcvXUC+h8Y N+TMyRchamcZjkrJ6JQYHpdtfrHZAxdHG6Bocm/R+ct1SMgU31ooRAE6iGjxMF3U5PGT 8MQA== X-Gm-Message-State: APuU4Z/hG+bRqWaDziUJNHTo0BWsYn6ez9/SBHHN8Zgn2oYlTkAYBgHH Z3NearUR3dFGu4Rnb2WkOI6mnZD2cOIpG/4l/s1e8xC2ORjLGRJABtSN+LPMxZW665WKB2X+IPG dnGtJx0M= X-Gm-Gg: AYBFou20Y0SPGx4yiLWMuYljc0ygzysvldYJtbkspBc+q1srkZXzGqne+aLzY/n7vIR VMbrqavObz6neyPBuVNAZ1N06XiAIqIPZBqjYbJq3L36WSmYcDxFHKkXUcMum1jsDpW0YD9XZ42 kCV0b/wL3Bus8STfyd7brmrplnZCoKfHqNKFLauHDUi+CLxcnAogR3E2uUSnFnXHALoKc3/yem+ L1mBKsfq+1d7KVwur1Vr1vx/rsVThltiKUwSN2EImxmR+f9cbs2lRrGNcQK1ESIblVqizqUcjV2 Voz2LReWkrWkBRakzFMKLyuHdvtxYfUfUq1KQAc9nhrPJ/XE/0OlubpJgJKMcu9+xDwNz/ScBUA rnGB9p5gMYK0YMKVzU3EecBFaGX/egzZUq3OCscbWXy6UhOU1qMYYSqtUE3OR8kCmNkzveQmbHK tRbkkwmtZ6Ml9WoYxVPHjgKCrWWjrRi4rN0C6zw9fi+mSoHr32TCS3rVgW7Xh13xAc3NirofNNA WxJVU8Q4z0eESOkd9KE85t1ZX5DduPeKEQsevY1MZdwbY280nNJ1ma7D4D9rznce+ZF5PA3xfyO q+c9cNy74vmiHdHY3BadAMBCFZTPVxC8N7BuGTrt9l4J7uxNqlakJTbfAEYZt2IAxaFVt5fJiML EmI6KkGZx0sdU2cZK6/R+9m3F1IT8Cb6xsf1UF4ZmT9WvSrD09SVcFJU= X-Received: by 2002:a05:600d:a:b0:4bb:7e4e:de53 with SMTP id 5b1f17b1804b1-4bb7e4edf38mr99766165e9.12.1795101860181; Thu, 19 Nov 2026 07:24:20 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:19 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 04/19] bind: Security fix for CVE-2026-19667 Date: Thu, 19 Nov 2026 16:22:30 +0100 Message-ID: <7034c3e577101096a72616bee839d4804907a21e.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250687 From: Rohini Sangam Pick patch from [1] and [2] also mentioned at Debian tracker in [3] [1] https://github.com/isc-projects/bind9/commit/c4203fb70e3985452afddeadb7075aa91ae05d7d [2] https://github.com/isc-projects/bind9/commit/993d10fe15adbac485d399f1e4144b55ed226ecf [3] https://security-tracker.debian.org/tracker/CVE-2026-19667 Signed-off-by: Rohini Sangam Signed-off-by: Bastien Jauny Signed-off-by: Fabien Thomas --- .../bind/bind/CVE-2026-19667-1.patch | 139 +++++++ .../bind/bind/CVE-2026-19667-2.patch | 355 ++++++++++++++++++ .../recipes-connectivity/bind/bind_9.18.49.bb | 2 + 3 files changed, 496 insertions(+) create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-19667-1.patch create mode 100644 meta/recipes-connectivity/bind/bind/CVE-2026-19667-2.patch diff --git a/meta/recipes-connectivity/bind/bind/CVE-2026-19667-1.patch b/meta/recipes-connectivity/bind/bind/CVE-2026-19667-1.patch new file mode 100644 index 0000000000..5c52e42034 --- /dev/null +++ b/meta/recipes-connectivity/bind/bind/CVE-2026-19667-1.patch @@ -0,0 +1,139 @@ +From e5c7129b2d312d14759aa8b4a146f78a6a60020e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= +Date: Thu, 6 Aug 2026 17:15:26 +0200 +Subject: [PATCH 1/2] Reject negative cache records that do not fit in a + dns_rdata_t + +dns_ncache_add() assembles each negative cache record in a 64 KiB stack +buffer and then stores its size in dns_rdata_t.length, which is 16 bits +wide. A record that fills the buffer exactly is recorded as being zero +bytes long, which is small enough to satisfy the size checks in +dns_rdataslab_fromrdataset() that would otherwise have rejected it. The +truncated record is committed to the cache, and every reader of it then +fails an assertion. + +A response whose authority section repeats one SOA record, with MNAME +and RNAME compressed against a long QNAME, expands to exactly that size, +so check the length where the record is produced rather than relying on +the slab code to notice. Every other way of building a dns_rdata_t +already refuses anything longer than DNS_RDATA_MAXLENGTH. + +While here, refuse a singleton RRset with more than one record and a +second SOA RRset as DNS_R_TOOMANYRECORDS, which is now also what more +than DNS_NCACHE_RDATA records reports instead of ISC_R_NOSPACE. The +message parser and the resolver already reject duplicate singletons +and a second SOA on their own, but dns_ncache_add() should not depend +on its callers for that. + +Co-authored-by: Mark Andrews +(cherry picked from commit 8b20ed0a647cd1e9efc3bf442fc5d898f6a4de57) + +CVE: CVE-2026-19667 +Upstream-Status: Backport [https://github.com/isc-projects/bind9/commit/c4203fb70e3985452afddeadb7075aa91ae05d7d] + +Signed-off-by: Rohini Sangam +--- + lib/dns/ncache.c | 48 +++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 45 insertions(+), 3 deletions(-) + +diff --git a/lib/dns/ncache.c b/lib/dns/ncache.c +index c99c266..bab42bf 100644 +--- a/lib/dns/ncache.c ++++ b/lib/dns/ncache.c +@@ -63,14 +63,30 @@ copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) { + return ISC_R_NOSPACE; + } + count = dns_rdataset_count(rdataset); ++ ++ /* ++ * Reject duplicate singleton records. ++ */ ++ if (dns_rdatatype_issingleton(rdataset->type) && count != 1) { ++ return DNS_R_TOOMANYRECORDS; ++ } ++ + INSIST(count <= 65535); + isc_buffer_putuint16(buffer, (uint16_t)count); + ++ if (ar.length < 2 + count * 2) { ++ /* ++ * The count took 2 bytes and each rdata needs at least 2 ++ * more for its length. Bail early if that cannot fit. ++ */ ++ return ISC_R_NOSPACE; ++ } ++ + result = dns_rdataset_first(rdataset); + while (result == ISC_R_SUCCESS) { + dns_rdataset_current(rdataset, &rdata); + dns_rdata_toregion(&rdata, &r); +- INSIST(r.length <= 65535); ++ INSIST(r.length <= DNS_RDATA_MAXLENGTH); + isc_buffer_availableregion(buffer, &ar); + if (ar.length < 2) { + return ISC_R_NOSPACE; +@@ -79,6 +95,7 @@ copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) { + * Copy the rdata length to the buffer. + */ + isc_buffer_putuint16(buffer, (uint16_t)r.length); ++ + /* + * Copy the rdata to the buffer. + */ +@@ -129,8 +146,9 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, + dns_rdata_t rdata[DNS_NCACHE_RDATA]; + dns_rdataset_t ncrdataset; + dns_rdatalist_t ncrdatalist; +- unsigned char data[65536]; ++ unsigned char data[UINT16_MAX]; + unsigned int next = 0; ++ bool seen_soa = false; + + /* + * Convert the authority data from 'message' into a negative cache +@@ -177,6 +195,20 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, + continue; + } + type = rdataset->type; ++ ++ /* ++ * A negative response carries one SOA ++ * RRset. The resolver rejects a second ++ * one before it gets here; don't rely on ++ * that. ++ */ ++ if (type == dns_rdatatype_soa) { ++ if (seen_soa) { ++ return DNS_R_TOOMANYRECORDS; ++ } ++ seen_soa = true; ++ } ++ + if (type == dns_rdatatype_rrsig) { + type = rdataset->covers; + } +@@ -224,10 +256,20 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node, + } + + if (next >= DNS_NCACHE_RDATA) { +- return ISC_R_NOSPACE; ++ return DNS_R_TOOMANYRECORDS; + } + dns_rdata_init(&rdata[next]); + isc_buffer_remainingregion(&buffer, &r); ++ /* ++ * dns_rdata_t.length is 16 bits wide, ++ * so a longer record would be silently ++ * truncated here and would then pass ++ * the size checks in ++ * dns_rdataslab_fromrdataset(). ++ */ ++ if (r.length > DNS_RDATA_MAXLENGTH) { ++ return ISC_R_NOSPACE; ++ } + rdata[next].data = r.base; + rdata[next].length = r.length; + rdata[next].rdclass = +-- +2.44.4 + diff --git a/meta/recipes-connectivity/bind/bind/CVE-2026-19667-2.patch b/meta/recipes-connectivity/bind/bind/CVE-2026-19667-2.patch new file mode 100644 index 0000000000..8427eae31f --- /dev/null +++ b/meta/recipes-connectivity/bind/bind/CVE-2026-19667-2.patch @@ -0,0 +1,355 @@ +From 993d10fe15adbac485d399f1e4144b55ed226ecf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= +Date: Tue, 1 Sep 2026 10:05:05 +0200 +Subject: [PATCH 2/2] Test that an oversized negative cache record is rejected + +Nothing exercised dns_ncache_add() with a record too large to store, so +the missing range check went unnoticed for as long as the length field +was wide enough to hold one. + +The record has to be built below the message parser. SOA is the only +record type whose negative cache form is larger than its wire form, and +the parser now collapses repeated identical SOA records into one, so a +response can no longer be made to reach the limit. Assemble the +authority section by hand instead, sized to the exact 64 KiB fill that +used to be stored as a zero-length record and to either side of +DNS_RDATA_MAXLENGTH, and cover the singleton and record-count +rejections while at it. + +Assisted-by: Claude:claude-fable-5 +(cherry picked from commit a82c98e5db5b0ca3e2a1e2f42bcd7374d0235f70) + +CVE: CVE-2026-19667 +Upstream-Status: Backport [https://github.com/isc-projects/bind9/commit/993d10fe15adbac485d399f1e4144b55ed226ecf] + +Signed-off-by: Rohini Sangam +--- + tests/dns/Makefile.am | 1 + + tests/dns/ncache_test.c | 303 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 304 insertions(+) + create mode 100644 tests/dns/ncache_test.c + +diff --git a/tests/dns/Makefile.am b/tests/dns/Makefile.am +index 7062c60..512329e 100644 +--- a/tests/dns/Makefile.am ++++ b/tests/dns/Makefile.am +@@ -27,6 +27,7 @@ check_PROGRAMS = \ + dst_test \ + keytable_test \ + name_test \ ++ ncache_test \ + nsec3_test \ + nsec3param_test \ + private_test \ +diff --git a/tests/dns/ncache_test.c b/tests/dns/ncache_test.c +new file mode 100644 +index 0000000..19a30b2 +--- /dev/null ++++ b/tests/dns/ncache_test.c +@@ -0,0 +1,303 @@ ++/* ++ * Copyright (C) Internet Systems Consortium, Inc. ("ISC") ++ * ++ * SPDX-License-Identifier: MPL-2.0 ++ * ++ * This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, you can obtain one at https://mozilla.org/MPL/2.0/. ++ * ++ * See the COPYRIGHT file distributed with this work for additional ++ * information regarding copyright ownership. ++ */ ++ ++#include ++#include /* IWYU pragma: keep */ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define UNIT_TESTING ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* ++ * dns_ncache_add() turns every RRset it keeps from the authority section ++ * into one negative cache record laid out as ++ * ++ * owner name | type | trust | count | count * (rdlen | rdata) ++ * ++ * The rdata is copied verbatim and never parsed, so the tests below fill ++ * it from this buffer and only care about its length. ++ */ ++static unsigned char filler[UINT16_MAX]; ++ ++/* ++ * dns_rdataslab_fromrdataset() stores each record behind a 2-byte length, ++ * or an 8-byte length, offset and order header with --enable-fixed-rrset, ++ * and refuses a record that would exceed DNS_RDATA_MAXLENGTH together ++ * with that header. ++ */ ++#if DNS_RDATASET_FIXED ++#define SLAB_OVERHEAD 8 ++#else ++#define SLAB_OVERHEAD 2 ++#endif ++ ++static dns_name_t * ++name_fromstring(dns_fixedname_t *fixed, const char *namestr) { ++ dns_name_t *name = dns_fixedname_initname(fixed); ++ isc_result_t result; ++ ++ result = dns_name_fromstring(name, namestr, 0, NULL); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ ++ return name; ++} ++ ++static dns_message_t * ++negative_response(void) { ++ dns_message_t *msg = NULL; ++ ++ dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &msg); ++ msg->flags = DNS_MESSAGEFLAG_QR | DNS_MESSAGEFLAG_AA; ++ msg->rcode = dns_rcode_nxdomain; ++ ++ return msg; ++} ++ ++/* ++ * Add an RRset of 'count' rdatas to the authority section of 'msg', at ++ * 'ownerstr', marked for negative caching the way the resolver marks ++ * them. The rdata lengths are chosen so that the negative cache record ++ * built from the RRset is exactly 'size' bytes long. ++ */ ++static void ++add_rrset(dns_message_t *msg, const char *ownerstr, dns_rdatatype_t type, ++ dns_rdatatype_t covers, unsigned int count, size_t size) { ++ dns_name_t *name = NULL; ++ dns_rdatalist_t *rdatalist = NULL; ++ dns_rdataset_t *rdataset = NULL; ++ size_t payload, rdlen; ++ isc_result_t result; ++ ++ result = dns_message_gettempname(msg, &name); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ name_fromstring((dns_fixedname_t *)name, ownerstr); ++ name->attributes |= DNS_NAMEATTR_NCACHE; ++ ++ result = dns_message_gettemprdatalist(msg, &rdatalist); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ rdatalist->rdclass = dns_rdataclass_in; ++ rdatalist->type = type; ++ rdatalist->covers = covers; ++ rdatalist->ttl = 3600; ++ ++ /* ++ * Split the rdata bytes evenly, giving the remainder to the first ++ * rdatas one byte at a time. ++ */ ++ assert_true(size >= name->length + 5 + count * 2); ++ payload = size - name->length - 5 - count * 2; ++ rdlen = payload / count; ++ ++ for (unsigned int i = 0; i < count; i++) { ++ dns_rdata_t *rdata = NULL; ++ ++ result = dns_message_gettemprdata(msg, &rdata); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ rdata->rdclass = dns_rdataclass_in; ++ rdata->type = type; ++ rdata->data = filler; ++ rdata->length = rdlen + (i < payload % count ? 1 : 0); ++ assert_true(rdata->length <= DNS_RDATA_MAXLENGTH); ++ ISC_LIST_APPEND(rdatalist->rdata, rdata, link); ++ } ++ ++ result = dns_message_gettemprdataset(msg, &rdataset); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ result = dns_rdatalist_tordataset(rdatalist, rdataset); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ rdataset->trust = dns_trust_authauthority; ++ rdataset->attributes |= DNS_RDATASETATTR_NCACHE; ++ ISC_LIST_APPEND(name->list, rdataset, link); ++ ++ dns_message_addname(msg, name, DNS_SECTION_AUTHORITY); ++ /* ++ * dns_ncache_add() skips the section when its count is zero. ++ */ ++ msg->counts[DNS_SECTION_AUTHORITY] += count; ++} ++ ++/* ++ * Cache 'msg' as an NXDOMAIN for 'qname' in a fresh cache and return the ++ * result of dns_ncache_add(), and in 'find_result' what a lookup of ++ * 'qname' sees afterwards: DNS_R_NCACHENXDOMAIN if the record was stored, ++ * ISC_R_NOTFOUND if it was rejected. ++ */ ++static isc_result_t ++ncache_add(dns_message_t *msg, const dns_name_t *qname, ++ isc_result_t *find_result) { ++ isc_stdtime_t now; ++ dns_db_t *db = NULL; ++ dns_dbnode_t *node = NULL; ++ dns_fixedname_t ffound; ++ dns_name_t *found = dns_fixedname_initname(&ffound); ++ dns_rdataset_t rdataset = DNS_RDATASET_INIT; ++ isc_result_t result; ++ ++ isc_stdtime_get(&now); ++ ++ result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_cache, ++ dns_rdataclass_in, 0, NULL, &db); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ ++ result = dns_db_findnode(db, qname, true, &node); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ ++ result = dns_ncache_add(msg, db, node, dns_rdatatype_any, now, 0, 3600, ++ NULL); ++ ++ dns_db_detachnode(db, &node); ++ ++ *find_result = dns_db_find(db, qname, NULL, dns_rdatatype_a, 0, now, ++ NULL, found, &rdataset, NULL); ++ if (dns_rdataset_isassociated(&rdataset)) { ++ dns_rdataset_disassociate(&rdataset); ++ } ++ ++ dns_db_detach(&db); ++ ++ return result; ++} ++ ++/* ++ * A record that does not fit in dns_rdata_t.length must be rejected. ++ * Its size used to be truncated to 16 bits instead, so a record of ++ * exactly 65536 bytes was committed to the cache with a length of zero ++ * and every subsequent reader of the cache entry failed an assertion. ++ */ ++ISC_RUN_TEST_IMPL(ncache_add_size) { ++ struct { ++ size_t size; ++ isc_result_t expected; ++ } tests[] = { ++ /* ++ * The largest record that can be stored: the slab needs ++ * SLAB_OVERHEAD more bytes for its record header. ++ */ ++ { DNS_RDATA_MAXLENGTH - SLAB_OVERHEAD, ISC_R_SUCCESS }, ++ { DNS_RDATA_MAXLENGTH + 1, ISC_R_NOSPACE }, ++ { 65536, ISC_R_NOSPACE }, ++ }; ++ dns_fixedname_t fqname; ++ dns_name_t *qname = name_fromstring(&fqname, "missing.example."); ++ ++ for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { ++ dns_message_t *msg = negative_response(); ++ isc_result_t result, find_result; ++ ++ /* ++ * Two RRSIG(NSEC) records, because a single rdata cannot be ++ * longer than DNS_RDATA_MAXLENGTH. ++ */ ++ add_rrset(msg, "example.", dns_rdatatype_rrsig, ++ dns_rdatatype_nsec, 2, tests[i].size); ++ ++ result = ncache_add(msg, qname, &find_result); ++ assert_int_equal(result, tests[i].expected); ++ assert_int_equal(find_result, tests[i].expected == ISC_R_SUCCESS ++ ? DNS_R_NCACHENXDOMAIN ++ : ISC_R_NOTFOUND); ++ ++ dns_message_detach(&msg); ++ } ++} ++ ++/* ++ * A negative response holds at most one SOA record. The message parser ++ * and the resolver enforce that on their own, so exercise the checks in ++ * dns_ncache_add() with hand-built messages. ++ */ ++ISC_RUN_TEST_IMPL(ncache_add_soa) { ++ dns_fixedname_t fqname; ++ dns_name_t *qname = name_fromstring(&fqname, "missing.example."); ++ dns_message_t *msg = NULL; ++ isc_result_t result, find_result; ++ ++ /* One SOA is fine. */ ++ msg = negative_response(); ++ add_rrset(msg, "example.", dns_rdatatype_soa, dns_rdatatype_none, 1, ++ 100); ++ result = ncache_add(msg, qname, &find_result); ++ assert_int_equal(result, ISC_R_SUCCESS); ++ assert_int_equal(find_result, DNS_R_NCACHENXDOMAIN); ++ dns_message_detach(&msg); ++ ++ /* Two SOA records in one RRset are not. */ ++ msg = negative_response(); ++ add_rrset(msg, "example.", dns_rdatatype_soa, dns_rdatatype_none, 2, ++ 100); ++ result = ncache_add(msg, qname, &find_result); ++ assert_int_equal(result, DNS_R_TOOMANYRECORDS); ++ assert_int_equal(find_result, ISC_R_NOTFOUND); ++ dns_message_detach(&msg); ++ ++ /* Neither are two SOA RRsets. */ ++ msg = negative_response(); ++ add_rrset(msg, "example.", dns_rdatatype_soa, dns_rdatatype_none, 1, ++ 100); ++ add_rrset(msg, "sub.example.", dns_rdatatype_soa, dns_rdatatype_none, 1, ++ 100); ++ result = ncache_add(msg, qname, &find_result); ++ assert_int_equal(result, DNS_R_TOOMANYRECORDS); ++ assert_int_equal(find_result, ISC_R_NOTFOUND); ++ dns_message_detach(&msg); ++} ++ ++/* ++ * dns_ncache_add() stores at most DNS_NCACHE_RDATA (100) records. ++ */ ++ISC_RUN_TEST_IMPL(ncache_add_count) { ++ dns_fixedname_t fqname; ++ dns_name_t *qname = name_fromstring(&fqname, "missing.example."); ++ dns_message_t *msg = negative_response(); ++ isc_result_t result, find_result; ++ ++ for (unsigned int i = 0; i < 101; i++) { ++ char owner[64]; ++ ++ snprintf(owner, sizeof(owner), "nsec%u.example.", i); ++ add_rrset(msg, owner, dns_rdatatype_nsec, dns_rdatatype_none, 1, ++ 100); ++ } ++ ++ result = ncache_add(msg, qname, &find_result); ++ assert_int_equal(result, DNS_R_TOOMANYRECORDS); ++ assert_int_equal(find_result, ISC_R_NOTFOUND); ++ dns_message_detach(&msg); ++} ++ ++ISC_TEST_LIST_START ++ISC_TEST_ENTRY(ncache_add_size) ++ISC_TEST_ENTRY(ncache_add_soa) ++ISC_TEST_ENTRY(ncache_add_count) ++ISC_TEST_LIST_END ++ ++ISC_TEST_MAIN +-- +2.44.4 + diff --git a/meta/recipes-connectivity/bind/bind_9.18.49.bb b/meta/recipes-connectivity/bind/bind_9.18.49.bb index 723a09e739..fef00e363f 100644 --- a/meta/recipes-connectivity/bind/bind_9.18.49.bb +++ b/meta/recipes-connectivity/bind/bind_9.18.49.bb @@ -18,6 +18,8 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ file://bind-ensure-searching-for-json-headers-searches-sysr.patch \ file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ file://0001-avoid-start-failure-with-bind-user.patch \ + file://CVE-2026-19667-1.patch \ + file://CVE-2026-19667-2.patch \ " SRC_URI[sha256sum] = "c43ce4548ebed788cd9df63658a7de105ceafba43fcd63fa352b1093e525cd24" From patchwork Thu Nov 19 15:22:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104902 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.82.1795101863177885084 for ; Thu, 19 Nov 2026 07:24:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=phzWlcFO; spf=pass (domain: smile.fr, ip: 209.85.221.44, mailfrom: fabien.thomas@smile.fr) Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-4a7b8abe209so1389615f8f.0 for ; Thu, 19 Nov 2026 07:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101861; x=1795706661; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=hOuSjuvLkT5beRUffWJ/AJlvfHqOhxzk+VKgbu5oKnY=; b=phzWlcFOAemC3HWbE0HcSqdjWWGuYCldQbL72RyeFi033RjJC1NCyNFkuPhP4l3XW+ tMJ31irhKbKbc13UgPamHKZgc1g4PA8ohcimRJicpF2/1m02bfjBv8OLI69Z0akngPTT 4KYZWmdOPmzr/n7KyIVu8qofChHGJKMND+LBO4e95HkzTRCnAWKrfMGS1MO77qjxoW3w qOhyp2O0yUfYJJ3L+/cKyYDbfo/qhUHu0EYbhEDizv2kcm382bGP3NOSCe3hffEJKd9k 1Oosr1MOHPFh6E05/fWwnGBoTCE7EqKIW0mOT0bzLpQosLuqQfMDkTMfUHCHMw7wgybQ FyVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101861; x=1795706661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=hOuSjuvLkT5beRUffWJ/AJlvfHqOhxzk+VKgbu5oKnY=; b=duxeaM4E7l82zY/ei2SqLRrVHn2B3EoUPxXIfdxGZXqHG0PU2YBFnXnj848D2GVVwI id+6OWxQ0lhsaH5Gsw3H24kmqD13mGrEEG5B0uv7cN5x8uQzxL3iFtU6r2L+K6fj/jQM kCuXFVVSi5P9rzPNPE+Au/6VvWkXkP7M/BZIszqx/qC1Ey+IkIObkPcmRVyecFzLApR3 ITPD8v7kSNFa+dVXQfsmaGb8Fa1acGZN4l4B9vCA7hIYH4CMqRuv0kFyLaMLgCwV4M3s E8zSad4XF8Vh3ccNYWIJFifglaX/+UzOd10jfQsKReXPMmn+Gg3LapbwqI2ZLTA9E/7v 0wPA== X-Gm-Message-State: APuU4Z+PiO53oZ3oycp5LGYQu2ippO5Pu0GAMOuOVmCErLQ0U34fIzDl mYol7HcpZZk1G0ZIWguN04bGPqh4xb+8Svms3IMowpyqT+NxDBGlLkRHCsueOaP+gH/hIWJnYx7 NWsy9dOQ= X-Gm-Gg: AYBFou1+hOPE8lGPNXurwweZjl9jnV7f8OY9m0kNxxVE/HAL+SXSPNwxiGooo55YG5v 8+f3CJyXa1A64LIU6TZpCXNncjj1UazMbGmSI+ox2E125KmlsFmEMgfJ7Zjpq4W8ABFwaLMZVQl tbmzlVy8KfJq5/ESVB1mZabXMhStKO63ZZVu7otthmuoYlr/I4mG28mcP7kwUruua7YsxUuMBXk cS/KUQkm4q2JV3OdGPeklwYicYafPh7HF/3IPe06vtBUMzU1UekKZQfCQG2mZIUmlG/mS+fcHPA zroBpQRhOrInbVvnEvn6vCgGn/2WLhwabOS9jgTAFyGOGD9tfP7TWaFlSCpumUQTFgEy5IBQOiV 6W9hyQpayZLlfzXtPVqKJaWcoTcQyiTGssUf7qHbkYsBFdjNY7s+QgPXfnsFHcTxOLs6s+804Wu y3xJ85V0m36EhjT326ePObKdXV7w58NfVmH20tm+kCuXOvczI18isgXHEXd+utL0ZrS/iQpNsZD ZjlIClT2KWmrSH/+Jvov7+w7Kxtxr25iuXFsAEZskJeCzUoG08kvCUjZAu6LGD4iQ8RPU3t8eKM rmkIjnvodSeUSPejm5iRPwMwJRfjMLQNcZd+f6/L9NGs5I1VojIQ3H9EO0ZDV0qei1xHKdWmnSk a3uZbJerqX+ds9+rRvWohUpSiEd2mqTkKUUmkqxTxMM3prkMWpDShmQw= X-Received: by 2002:a05:600c:4504:b0:4bb:82f7:549f with SMTP id 5b1f17b1804b1-4bb82f754e8mr68943075e9.19.1795101860777; Thu, 19 Nov 2026 07:24:20 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:20 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 05/19] oeqa/selftest/recipetool: Update create_go test. Date: Thu, 19 Nov 2026 16:22:31 +0100 Message-ID: <25c3032bf21ea1c0191e897373b16f385854da11.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250688 From: Alexander Yurkov Adjust test_recipetool_go_create test to a smaller repository. Combine test_recipetool_go_create and test_recipetool_go_replace_modules tests into test_recipetool_go_create, the new test performs both tests. Signed-off-by: Alexander Yurkov Signed-off-by: Vyacheslav Yurkov Signed-off-by: Richard Purdie (cherry picked from commit d1256f8ff4a94d4f32b2b9ca855359dd2d691beb) Backport to fix test_recipetool_create_go failing on the autobuilder: google.golang.org/protobuf's go-import meta now points to github.com/protocolbuffers/protobuf-go instead of go.googlesource.com/protobuf, so the hardcoded expectation no longer matches. Upstream switched the test to a dedicated small repository, which avoids this dependency entirely. Seen on https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/5235 Signed-off-by: Bastien Jauny Signed-off-by: Fabien Thomas --- meta/lib/oeqa/selftest/cases/recipetool.py | 212 ++------------------- 1 file changed, 16 insertions(+), 196 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index 8c54e65ad6..5bde8903f3 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -760,13 +760,13 @@ class RecipetoolCreateTests(RecipetoolBase): temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - recipefile = os.path.join(temprecipe, 'edgex-go_git.bb') - deps_require_file = os.path.join(temprecipe, 'edgex-go', 'edgex-go-modules.inc') - lics_require_file = os.path.join(temprecipe, 'edgex-go', 'edgex-go-licenses.inc') - modules_txt_file = os.path.join(temprecipe, 'edgex-go', 'modules.txt') + recipefile = os.path.join(temprecipe, 'recipetool-go-test_git.bb') + deps_require_file = os.path.join(temprecipe, 'recipetool-go-test', 'recipetool-go-test-modules.inc') + lics_require_file = os.path.join(temprecipe, 'recipetool-go-test', 'recipetool-go-test-licenses.inc') + modules_txt_file = os.path.join(temprecipe, 'recipetool-go-test', 'modules.txt') - srcuri = 'https://github.com/edgexfoundry/edgex-go.git' - srcrev = "v3.0.0" + srcuri = 'https://git.yoctoproject.org/recipetool-go-test.git' + srcrev = "c3e213c01b6c1406b430df03ef0d1ae77de5d2f7" srcbranch = "main" result = runCmd('recipetool create -o %s %s -S %s -B %s' % (temprecipe, srcuri, srcrev, srcbranch)) @@ -775,207 +775,27 @@ class RecipetoolCreateTests(RecipetoolBase): inherits = ['go-vendor'] checkvars = {} - checkvars['GO_IMPORT'] = "github.com/edgexfoundry/edgex-go" + checkvars['GO_IMPORT'] = "git.yoctoproject.org/recipetool-go-test" checkvars['SRC_URI'] = {'git://${GO_IMPORT};destsuffix=git/src/${GO_IMPORT};nobranch=1;name=${BPN};protocol=https', 'file://modules.txt'} - checkvars['LIC_FILES_CHKSUM'] = {'file://src/${GO_IMPORT}/LICENSE;md5=8f8bc924cf73f6a32381e5fd4c58d603'} + checkvars['LIC_FILES_CHKSUM'] = { + 'file://src/${GO_IMPORT}/LICENSE;md5=4e3933dd47afbf115e484d11385fb3bd', + 'file://src/${GO_IMPORT}/is/LICENSE;md5=62beaee5a116dd1e80161667b1df39ab' + } - self.assertTrue(os.path.isfile(recipefile)) self._test_recipe_contents(recipefile, checkvars, inherits) + self.assertNotIn('Traceback', result.output) checkvars = {} checkvars['VENDORED_LIC_FILES_CHKSUM'] = set( - ['file://src/${GO_IMPORT}/vendor/github.com/Microsoft/go-winio/LICENSE;md5=69205ff73858f2c22b2ca135b557e8ef', - 'file://src/${GO_IMPORT}/vendor/github.com/armon/go-metrics/LICENSE;md5=d2d77030c0183e3d1e66d26dc1f243be', - 'file://src/${GO_IMPORT}/vendor/github.com/cenkalti/backoff/LICENSE;md5=1571d94433e3f3aa05267efd4dbea68b', - 'file://src/${GO_IMPORT}/vendor/github.com/davecgh/go-spew/LICENSE;md5=c06795ed54b2a35ebeeb543cd3a73e56', - 'file://src/${GO_IMPORT}/vendor/github.com/eclipse/paho.mqtt.golang/LICENSE;md5=dcdb33474b60c38efd27356d8f2edec7', - 'file://src/${GO_IMPORT}/vendor/github.com/eclipse/paho.mqtt.golang/edl-v10;md5=3adfcc70f5aeb7a44f3f9b495aa1fbf3', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-bootstrap/v3/LICENSE;md5=0d6dae39976133b2851fba4c1e1275ff', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-configuration/v3/LICENSE;md5=0d6dae39976133b2851fba4c1e1275ff', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-core-contracts/v3/LICENSE;md5=0d6dae39976133b2851fba4c1e1275ff', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-messaging/v3/LICENSE;md5=0d6dae39976133b2851fba4c1e1275ff', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-registry/v3/LICENSE;md5=0d6dae39976133b2851fba4c1e1275ff', - 'file://src/${GO_IMPORT}/vendor/github.com/edgexfoundry/go-mod-secrets/v3/LICENSE;md5=f9fa2f4f8e0ef8cc7b5dd150963eb457', - 'file://src/${GO_IMPORT}/vendor/github.com/fatih/color/LICENSE.md;md5=316e6d590bdcde7993fb175662c0dd5a', - 'file://src/${GO_IMPORT}/vendor/github.com/fxamacker/cbor/v2/LICENSE;md5=827f5a2fa861382d35a3943adf9ebb86', - 'file://src/${GO_IMPORT}/vendor/github.com/go-jose/go-jose/v3/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57', - 'file://src/${GO_IMPORT}/vendor/github.com/go-jose/go-jose/v3/json/LICENSE;md5=591778525c869cdde0ab5a1bf283cd81', - 'file://src/${GO_IMPORT}/vendor/github.com/go-kit/log/LICENSE;md5=5b7c15ad5fffe2ff6e9d58a6c161f082', - 'file://src/${GO_IMPORT}/vendor/github.com/go-logfmt/logfmt/LICENSE;md5=98e39517c38127f969de33057067091e', - 'file://src/${GO_IMPORT}/vendor/github.com/go-playground/locales/LICENSE;md5=3ccbda375ee345400ad1da85ba522301', - 'file://src/${GO_IMPORT}/vendor/github.com/go-playground/universal-translator/LICENSE;md5=2e2b21ef8f61057977d27c727c84bef1', - 'file://src/${GO_IMPORT}/vendor/github.com/go-playground/validator/v10/LICENSE;md5=a718a0f318d76f7c5d510cbae84f0b60', - 'file://src/${GO_IMPORT}/vendor/github.com/go-redis/redis/v7/LICENSE;md5=58103aa5ea1ee9b7a369c9c4a95ef9b5', - 'file://src/${GO_IMPORT}/vendor/github.com/golang/protobuf/LICENSE;md5=939cce1ec101726fa754e698ac871622', - 'file://src/${GO_IMPORT}/vendor/github.com/gomodule/redigo/LICENSE;md5=2ee41112a44fe7014dce33e26468ba93', - 'file://src/${GO_IMPORT}/vendor/github.com/google/uuid/LICENSE;md5=88073b6dd8ec00fe09da59e0b6dfded1', - 'file://src/${GO_IMPORT}/vendor/github.com/gorilla/mux/LICENSE;md5=33fa1116c45f9e8de714033f99edde13', - 'file://src/${GO_IMPORT}/vendor/github.com/gorilla/websocket/LICENSE;md5=c007b54a1743d596f46b2748d9f8c044', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/consul/api/LICENSE;md5=b8a277a612171b7526e9be072f405ef4', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/errwrap/LICENSE;md5=b278a92d2c1509760384428817710378', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/go-cleanhttp/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/go-hclog/LICENSE;md5=ec7f605b74b9ad03347d0a93a5cc7eb8', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/go-immutable-radix/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/go-multierror/LICENSE;md5=d44fdeb607e2d2614db9464dbedd4094', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/go-rootcerts/LICENSE;md5=65d26fcc2f35ea6a181ac777e42db1ea', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/golang-lru/LICENSE;md5=f27a50d2e878867827842f2c60e30bfc', - 'file://src/${GO_IMPORT}/vendor/github.com/hashicorp/serf/LICENSE;md5=b278a92d2c1509760384428817710378', - 'file://src/${GO_IMPORT}/vendor/github.com/leodido/go-urn/LICENSE;md5=8f50db5538ec1148a9b3d14ed96c3418', - 'file://src/${GO_IMPORT}/vendor/github.com/mattn/go-colorable/LICENSE;md5=24ce168f90aec2456a73de1839037245', - 'file://src/${GO_IMPORT}/vendor/github.com/mattn/go-isatty/LICENSE;md5=f509beadd5a11227c27b5d2ad6c9f2c6', - 'file://src/${GO_IMPORT}/vendor/github.com/mitchellh/consulstructure/LICENSE;md5=96ada10a9e51c98c4656f2cede08c673', - 'file://src/${GO_IMPORT}/vendor/github.com/mitchellh/copystructure/LICENSE;md5=56da355a12d4821cda57b8f23ec34bc4', - 'file://src/${GO_IMPORT}/vendor/github.com/mitchellh/go-homedir/LICENSE;md5=3f7765c3d4f58e1f84c4313cecf0f5bd', - 'file://src/${GO_IMPORT}/vendor/github.com/mitchellh/mapstructure/LICENSE;md5=3f7765c3d4f58e1f84c4313cecf0f5bd', - 'file://src/${GO_IMPORT}/vendor/github.com/mitchellh/reflectwalk/LICENSE;md5=3f7765c3d4f58e1f84c4313cecf0f5bd', - 'file://src/${GO_IMPORT}/vendor/github.com/nats-io/nats.go/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327', - 'file://src/${GO_IMPORT}/vendor/github.com/nats-io/nkeys/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327', - 'file://src/${GO_IMPORT}/vendor/github.com/nats-io/nuid/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327', - 'file://src/${GO_IMPORT}/vendor/github.com/pmezard/go-difflib/LICENSE;md5=e9a2ebb8de779a07500ddecca806145e', - 'file://src/${GO_IMPORT}/vendor/github.com/rcrowley/go-metrics/LICENSE;md5=1bdf5d819f50f141366dabce3be1460f', - 'file://src/${GO_IMPORT}/vendor/github.com/spiffe/go-spiffe/v2/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327', - 'file://src/${GO_IMPORT}/vendor/github.com/stretchr/objx/LICENSE;md5=d023fd31d3ca39ec61eec65a91732735', - 'file://src/${GO_IMPORT}/vendor/github.com/stretchr/testify/LICENSE;md5=188f01994659f3c0d310612333d2a26f', - 'file://src/${GO_IMPORT}/vendor/github.com/x448/float16/LICENSE;md5=de8f8e025d57fe7ee0b67f30d571323b', - 'file://src/${GO_IMPORT}/vendor/github.com/zeebo/errs/LICENSE;md5=84914ab36fc0eb48edbaa53e66e8d326', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/crypto/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/mod/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/net/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/sync/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/sys/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/text/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/golang.org/x/tools/LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707', - 'file://src/${GO_IMPORT}/vendor/google.golang.org/genproto/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57', - 'file://src/${GO_IMPORT}/vendor/google.golang.org/grpc/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57', - 'file://src/${GO_IMPORT}/vendor/google.golang.org/protobuf/LICENSE;md5=02d4002e9171d41a8fad93aa7faf3956', - 'file://src/${GO_IMPORT}/vendor/gopkg.in/eapache/queue.v1/LICENSE;md5=1bfd4408d3de090ef6b908b0cc45a316', - 'file://src/${GO_IMPORT}/vendor/gopkg.in/yaml.v3/LICENSE;md5=3c91c17266710e16afdbb2b6d15c761c']) - + ['file://src/${GO_IMPORT}/vendor/github.com/godbus/dbus/v5/LICENSE;md5=09042bd5c6c96a2b9e45ddf1bc517eed', + 'file://src/${GO_IMPORT}/vendor/github.com/matryer/is/LICENSE;md5=62beaee5a116dd1e80161667b1df39ab']) self.assertTrue(os.path.isfile(lics_require_file)) self._test_recipe_contents(lics_require_file, checkvars, []) + # make sure that dependencies don't mention local directory ./matryer/is dependencies = \ - [ ('github.com/eclipse/paho.mqtt.golang','v1.4.2', '', '', ''), - ('github.com/edgexfoundry/go-mod-bootstrap','v3.0.1','github.com/edgexfoundry/go-mod-bootstrap/v3','/v3', ''), - ('github.com/edgexfoundry/go-mod-configuration','v3.0.0','github.com/edgexfoundry/go-mod-configuration/v3','/v3', ''), - ('github.com/edgexfoundry/go-mod-core-contracts','v3.0.0','github.com/edgexfoundry/go-mod-core-contracts/v3','/v3', ''), - ('github.com/edgexfoundry/go-mod-messaging','v3.0.0','github.com/edgexfoundry/go-mod-messaging/v3','/v3', ''), - ('github.com/edgexfoundry/go-mod-secrets','v3.0.1','github.com/edgexfoundry/go-mod-secrets/v3','/v3', ''), - ('github.com/fxamacker/cbor','v2.4.0','github.com/fxamacker/cbor/v2','/v2', ''), - ('github.com/gomodule/redigo','v1.8.9', '', '', ''), - ('github.com/google/uuid','v1.3.0', '', '', ''), - ('github.com/gorilla/mux','v1.8.0', '', '', ''), - ('github.com/rcrowley/go-metrics','v0.0.0-20201227073835-cf1acfcdf475', '', '', ''), - ('github.com/spiffe/go-spiffe','v2.1.4','github.com/spiffe/go-spiffe/v2','/v2', ''), - ('github.com/stretchr/testify','v1.8.2', '', '', ''), - ('go.googlesource.com/crypto','v0.8.0','golang.org/x/crypto', '', ''), - ('gopkg.in/eapache/queue.v1','v1.1.0', '', '', ''), - ('gopkg.in/yaml.v3','v3.0.1', '', '', ''), - ('github.com/microsoft/go-winio','v0.6.0','github.com/Microsoft/go-winio', '', ''), - ('github.com/hashicorp/go-metrics','v0.3.10','github.com/armon/go-metrics', '', ''), - ('github.com/cenkalti/backoff','v2.2.1+incompatible', '', '', ''), - ('github.com/davecgh/go-spew','v1.1.1', '', '', ''), - ('github.com/edgexfoundry/go-mod-registry','v3.0.0','github.com/edgexfoundry/go-mod-registry/v3','/v3', ''), - ('github.com/fatih/color','v1.9.0', '', '', ''), - ('github.com/go-jose/go-jose','v3.0.0','github.com/go-jose/go-jose/v3','/v3', ''), - ('github.com/go-kit/log','v0.2.1', '', '', ''), - ('github.com/go-logfmt/logfmt','v0.5.1', '', '', ''), - ('github.com/go-playground/locales','v0.14.1', '', '', ''), - ('github.com/go-playground/universal-translator','v0.18.1', '', '', ''), - ('github.com/go-playground/validator','v10.13.0','github.com/go-playground/validator/v10','/v10', ''), - ('github.com/go-redis/redis','v7.3.0','github.com/go-redis/redis/v7','/v7', ''), - ('github.com/golang/protobuf','v1.5.2', '', '', ''), - ('github.com/gorilla/websocket','v1.4.2', '', '', ''), - ('github.com/hashicorp/consul','v1.20.0','github.com/hashicorp/consul/api', '', 'api'), - ('github.com/hashicorp/errwrap','v1.0.0', '', '', ''), - ('github.com/hashicorp/go-cleanhttp','v0.5.1', '', '', ''), - ('github.com/hashicorp/go-hclog','v0.14.1', '', '', ''), - ('github.com/hashicorp/go-immutable-radix','v1.3.0', '', '', ''), - ('github.com/hashicorp/go-multierror','v1.1.1', '', '', ''), - ('github.com/hashicorp/go-rootcerts','v1.0.2', '', '', ''), - ('github.com/hashicorp/golang-lru','v0.5.4', '', '', ''), - ('github.com/hashicorp/serf','v0.10.1', '', '', ''), - ('github.com/leodido/go-urn','v1.2.3', '', '', ''), - ('github.com/mattn/go-colorable','v0.1.12', '', '', ''), - ('github.com/mattn/go-isatty','v0.0.14', '', '', ''), - ('github.com/mitchellh/consulstructure','v0.0.0-20190329231841-56fdc4d2da54', '', '', ''), - ('github.com/mitchellh/copystructure','v1.2.0', '', '', ''), - ('github.com/mitchellh/go-homedir','v1.1.0', '', '', ''), - ('github.com/mitchellh/mapstructure','v1.5.0', '', '', ''), - ('github.com/mitchellh/reflectwalk','v1.0.2', '', '', ''), - ('github.com/nats-io/nats.go','v1.25.0', '', '', ''), - ('github.com/nats-io/nkeys','v0.4.4', '', '', ''), - ('github.com/nats-io/nuid','v1.0.1', '', '', ''), - ('github.com/pmezard/go-difflib','v1.0.0', '', '', ''), - ('github.com/stretchr/objx','v0.5.0', '', '', ''), - ('github.com/x448/float16','v0.8.4', '', '', ''), - ('github.com/zeebo/errs','v1.3.0', '', '', ''), - ('go.googlesource.com/mod','v0.8.0','golang.org/x/mod', '', ''), - ('go.googlesource.com/net','v0.9.0','golang.org/x/net', '', ''), - ('go.googlesource.com/sync','v0.1.0','golang.org/x/sync', '', ''), - ('go.googlesource.com/sys','v0.7.0','golang.org/x/sys', '', ''), - ('go.googlesource.com/text','v0.9.0','golang.org/x/text', '', ''), - ('go.googlesource.com/tools','v0.6.0','golang.org/x/tools', '', ''), - ('github.com/googleapis/go-genproto','v0.0.0-20230223222841-637eb2293923','google.golang.org/genproto', '', ''), - ('github.com/grpc/grpc-go','v1.53.0','google.golang.org/grpc', '', ''), - ('go.googlesource.com/protobuf','v1.28.1','google.golang.org/protobuf', '', ''), - ] - - src_uri = set() - for d in dependencies: - src_uri.add(self._go_urifiy(*d)) - - checkvars = {} - checkvars['GO_DEPENDENCIES_SRC_URI'] = src_uri - - self.assertTrue(os.path.isfile(deps_require_file)) - self._test_recipe_contents(deps_require_file, checkvars, []) - - def test_recipetool_create_go_replace_modules(self): - # Check handling of replaced modules - temprecipe = os.path.join(self.tempdir, 'recipe') - os.makedirs(temprecipe) - - recipefile = os.path.join(temprecipe, 'openapi-generator_git.bb') - deps_require_file = os.path.join(temprecipe, 'openapi-generator', 'go-modules.inc') - lics_require_file = os.path.join(temprecipe, 'openapi-generator', 'go-licenses.inc') - modules_txt_file = os.path.join(temprecipe, 'openapi-generator', 'modules.txt') - - srcuri = 'https://github.com/OpenAPITools/openapi-generator.git' - srcrev = "v7.2.0" - srcbranch = "master" - srcsubdir = "samples/openapi3/client/petstore/go" - - result = runCmd('recipetool create -o %s %s -S %s -B %s --src-subdir %s' % (temprecipe, srcuri, srcrev, srcbranch, srcsubdir)) - - self.maxDiff = None - inherits = ['go-vendor'] - - checkvars = {} - checkvars['GO_IMPORT'] = "github.com/OpenAPITools/openapi-generator/samples/openapi3/client/petstore/go" - checkvars['SRC_URI'] = {'git://${GO_IMPORT};destsuffix=git/src/${GO_IMPORT};nobranch=1;name=${BPN};protocol=https', - 'file://modules.txt'} - - self.assertNotIn('Traceback', result.output) - self.assertIn('No license file was detected for the main module', result.output) - self.assertTrue(os.path.isfile(recipefile)) - self._test_recipe_contents(recipefile, checkvars, inherits) - - # make sure that dependencies don't mention local directory ./go-petstore - dependencies = \ - [ ('github.com/stretchr/testify','v1.8.4', '', '', ''), - ('go.googlesource.com/oauth2','v0.10.0','golang.org/x/oauth2', '', ''), - ('github.com/davecgh/go-spew','v1.1.1', '', '', ''), - ('github.com/golang/protobuf','v1.5.3', '', '', ''), - ('github.com/kr/pretty','v0.3.0', '', '', ''), - ('github.com/pmezard/go-difflib','v1.0.0', '', '', ''), - ('github.com/rogpeppe/go-internal','v1.9.0', '', '', ''), - ('go.googlesource.com/net','v0.12.0','golang.org/x/net', '', ''), - ('github.com/golang/appengine','v1.6.7','google.golang.org/appengine', '', ''), - ('go.googlesource.com/protobuf','v1.31.0','google.golang.org/protobuf', '', ''), - ('gopkg.in/check.v1','v1.0.0-20201130134442-10cb98267c6c', '', '', ''), - ('gopkg.in/yaml.v3','v3.0.1', '', '', ''), + [ ('github.com/godbus/dbus','v5.1.0', 'github.com/godbus/dbus/v5', '/v5', ''), ] src_uri = set() From patchwork Thu Nov 19 15:22:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104894 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.83.1795101863532402831 for ; Thu, 19 Nov 2026 07:24:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=fdxg59xS; spf=pass (domain: smile.fr, ip: 209.85.128.54, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4bb6c7b6dbdso32839095e9.0 for ; Thu, 19 Nov 2026 07:24:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101862; x=1795706662; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Pmybtl7xiyq1l0BvgS98K0PonIvF//wxWi9a5I5W6Ng=; b=fdxg59xStRLI337qoWW7XK1tMJM7+wYqAE1OvGODrhk6Zdxu9WT4EjOKrYCnsH1/18 Yko/3vA9atNUiKLLjhqi4sn3uFx5ajGKWVtxk+JU9vvWMddJ9lRBq8KnXHjTTe1CKdgB qwLo9YqEuX1//qBhY22VfUzeM/EAQUl9TsIemP1TnC+0cB4jr9rhlTkqKSew3gWjSV/A 0hauJxI+NKhifR85jH3bcCquteuqlaNKJ/d0GLLfa/RfdEaxlxO08uTke9ivEgfzYACX IjkLgrLICMKuQhfCe4pVrEZn0jSjpDhMHI+rlzeK4LLR3t1rQr0NMrRPTfgevV+lO8rv SXpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101862; x=1795706662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Pmybtl7xiyq1l0BvgS98K0PonIvF//wxWi9a5I5W6Ng=; b=Kx4Yzdo87JztQ6oATZeTO7H1HKYJn2u34tcNdXPOKlaj3UEHuTv7+JkJNtjcKfM+qW seRfqCmwoc9xxg/blIKMAJuGpFYdomabsWW2oNaGDv6kf8JDsCZdYGWslltQxqt/SBYP nkpjuCw6V/dAW9evtvaGc/lbYWvfWymNU5SQEAPGw8DE2IO6w6F3Cu/eoBw+PyulsAie 1janYt5hr2fDoSp19i5Fnxmd+s78m0tqP3iSESYl8qfCIPSF5bOMF+NpzsKGTX+hKlxd DRz7RpNVXz8kXk4mikCnY5jLIk0+y5hW1JY0yEGxylsAjlMmbXIvzN0Vsv3ZZHXXyJE3 TUpw== X-Gm-Message-State: APuU4Z//s0aW1m6gr1TWU5MSGUD7ZRKnS2wI7QkZVZJ2N2wqe3LnQ3ja Pm3xgF4+4O5oJ0NFwareGtde5aoe1VIRlKEF1nLXFRIOuYTy3Cfw+IPcl0iMc4794SS0zo8PBp/ AljB1fOE= X-Gm-Gg: AYBFou1NLXMqyKYjQgNZ+yttGVIkpzORwaSoddpVzWzxNhGZGjx9J3nfVlq7nQwbteS NYjL7XYbvG78T/9JdlNUtMsWMc0VBM4xTYENc1tDtElP56rLx3ONYzksEj5Swi+winrBzKLlF/Y fbtCpz5qFfpE0HQRVDjAQg9SdTwWrGogJjZjOfUI3zxTLzLxGNIjomBanV0csVqwO3PCIpcjH7B q54lB1gLS556bao19n/ipZ4JfykIZeO4avkL/ZTzQq4Zbf1m9DX4X3DXQWG84yfYLrDHfu7ihdy T8iLwtBdGAPtGVT6GmZme/em4g7FjqHHLDYUqwhykFYeq2nm+QwkRcPqtST/onNhKAnzDar+N6M ViKNcOG4MdObxf2fAwgtZTCKjqzua3H1lopMxD+PRfL/U/3WKV3yfwfTb5LeEsR34opaqXbVHGj bGcOO3oCJ0NyfJNam3L6qNfgNRtgxF3pd9H/UxUxixpHsxCm9/9sYWxgEVnQBzMrncWlOa9PBaw RYyOfKPVH7JsSwn+mpMJ/mSs31nH+dnsHTKLDkOs6xX9/h0rjnB2Ry/5A5qkSP0KAhWkerxtg3K FZm0iZvLQ46hhRuVoozhCXU8SFLKqjcDeR2c/VjcdkXPvHxMnkdr0oeZ/SU3zxe5IQrD+WIrz5R qJNe4TUAKl1ee9hPGcyVfRG5ScTauHoac6v7qzgmFt61P4o6PBpPiHVk= X-Received: by 2002:a05:600c:46c7:b0:4bb:76f6:d23a with SMTP id 5b1f17b1804b1-4bb7da45409mr136736655e9.21.1795101861735; Thu, 19 Nov 2026 07:24:21 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:21 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 06/19] pseudo: Upgrade 1.9.11 -> 1.9.12+git Date: Thu, 19 Nov 2026 16:22:32 +0100 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250689 From: Yoann Congal Switch from master to the pseudo-1.9 stable branch. Changelog: * pseudo_client: Fix xattr/rename handling with empty paths * ports/linux/guts: Add open_tree wrapper * test: Add open_tree test * ports/linux/pseudo_wrappers.c: Add syscall support for open_tree() wrapper * test: Add open_tree syscall test * test: Add open_tree_attr syscall test * ports/linux/guts: Add open_tree_attr wrapper * ports/linux/pseudo_wrappers: forward pre-init syscall/prctl to the real function * pseudo_util: bound pseudo_get_value()'s recovery re-init * Makefile.in: Bump to 1.9.12 * ports/linux: Add missing header * ports/linux: Fix header ordering for Ubuntu 22.04 * ports/linux/guts: Fix uninitialized pseudo_path in open_tree wrappers Signed-off-by: Yoann Congal Signed-off-by: Fabien Thomas --- meta/recipes-devtools/pseudo/pseudo_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index 1320d19ad4..764f81b683 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -1,6 +1,6 @@ require pseudo.inc -SRC_URI = "git://git.yoctoproject.org/pseudo;branch=master;protocol=https \ +SRC_URI = "git://git.yoctoproject.org/pseudo;branch=pseudo-1.9;protocol=https \ file://fallback-passwd \ file://fallback-group \ " @@ -12,9 +12,9 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "ba8887e5f1e922f866681ec7dec1a00b602a9328" +SRCREV = "e627b0dcb639f387db935fae1f9b93b30cded5e1" S = "${WORKDIR}/git" -PV = "1.9.11" +PV = "1.9.12+git" # largefile and 64bit time_t support adds these macros via compiler flags globally # remove them for pseudo since pseudo intercepts some of the functions which will be From patchwork Thu Nov 19 15:22:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104895 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.97.1795101866213311870 for ; Thu, 19 Nov 2026 07:24:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=j0Z1NYwB; spf=pass (domain: smile.fr, ip: 209.85.128.43, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4bb68c197c7so34050985e9.1 for ; Thu, 19 Nov 2026 07:24:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101864; x=1795706664; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7F/aYCft6Ttd+cNvWV0b3re4/XBTyN1eaVwdWYEScIo=; b=j0Z1NYwBMBUPz0CmulgMI85vj+AUMuips5HjLBP1b4YmIm+lnRFStGG0tzbk/e+ha8 JXAjdhvlQEwNYraH1Qk99J6TMUboi7AUfnmSN9IXwlgv016FFX3KxwuuZ2F5etuyvziY qIBOs3u60MGUWqR5lwN5vNM72pXDPeSCShYU6iX4mfH2xco2ynZ/DvZHzoVhvSMM5Tih exHtzBYErWld/Ee8DqDxrfjQWCb8Fz/suxnM0Y7bHbfOslefmg3PGot6yl8IcM2g5axi Cz48TLqEdlbS6HnghcJzWSmzO9FuCysm2TBmqvdnTpr7xNHy/SPwnNVHe0MRBwx9r2EI c4RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101864; x=1795706664; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7F/aYCft6Ttd+cNvWV0b3re4/XBTyN1eaVwdWYEScIo=; b=nZj/yyqZje439oj+NDiq6V2Rp2ZJ1ADXRmRryLlpYqezv91C8pWffFzdXwS9Z3jc7O gfT+7NJUHk8x11lSLL1i1mHLuyLs2k8/FJaMOHgha2+gZ3qEFekXyHLcwTYTI2DKoStf htdnnEBIARHVb/9FcvZJ/BNJWIl/5q5DEzMcYypyzJjckNEpvP93OLrWYNXNaatU8AlS 9u0eDaDAxpSMT/Zvscy/CXsNyesIaPGOvHR5j1m9i5s9bVEB+VqRj+qIdU+zGby1S0Hw MbcSZEprjfZyf3nhvWsyeVOL/Mo2LCCh6kH9lQvLAAD826aGtE5MUzGw2Qtr+1Ufjad0 kXYg== X-Gm-Message-State: APuU4Z++Zi/0KdTzg9pe5ChaM58hMANl/fJcLJPBScF4QT1vLiEP3eBx FhvsBpalJr6JWDkZt7BWgRVugY+xfWSnHgQibaGNL69nGwC8dx8G+QMCGSQbveiOFhfNlM4cjnr Yw+jRwFY= X-Gm-Gg: AYBFou0A1bJii2Ybs2SDzrept12kD9pgxqQK58ROj8v+h9wzvyAhKTCUCYqwU5fwQks q/2YdhLe0sxJKCC+mU1ojrEWkfr1tgJOR4gFlk/fZa9NWhDmipVhtmzOrBBTiPYg2M/sBFKFHm8 6oStPs80/dxytEsSN3kRrKaIg2IWACYajujIpLRDYkYTsUKnaNGLqjwAJ7R+Ae7Smq4hT/Wk/+Z l5Uz+xoTfTzjwVUzOV/WmJt0h5zzIBjC12yhzLX1EsHAyenD2KEAcKWHMWpnnJaxDezxBGpQoNR Pxc3H94XwxKn38+a7UGtT3nPjT6PG2+tdQiowAgTQzJ4zrfiq+PeZYoux4faWUw1jGBPRfl+i9L YG1ccP6nQ8urnwXCSPqeK1SKpj1vcGz2rH2uWI1GgDA0MudgwHtWC0MjMyGjF5fxmGpZ+4iu92Q qpktfFVYaFIYxfs7WSIPu8tKV5yLeFR6R0YEI8eNoNw9aCAirYCN8g9w43TIstw9MaA/AlAb7pn 3ToNu/w+x7zdWOJoM15FYtdYII4GsYDRIocBT+MR+HOIVuUGa4NeqIdfHRZ80Pwn1ml7rpvPOBD Zm5g8tJ3+hwLMkM9Ekq29hKlbUe2+mJMF1xlHlPKCF8DPBMGaNDlvBa4wvs9EXlc0ZYzxm2itFM 4koec3MQlswZ7ayRkVXitJ+9q//VSHn64A4M12pH5+b8E0pK80Bn23ic= X-Received: by 2002:a05:600c:468b:b0:49f:e8bf:8f9b with SMTP id 5b1f17b1804b1-4bb7d6cc2f4mr124452595e9.4.1795101862835; Thu, 19 Nov 2026 07:24:22 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:22 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 07/19] TEST-pseudo: test patches Date: Thu, 19 Nov 2026 16:22:33 +0100 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250691 From: Yoann Congal Signed-off-by: Yoann Congal Signed-off-by: Fabien Thomas --- ...ree-tests-when-the-function-or-sysca.patch | 157 ++++++++ ...-t-generate-unused-_int-paths-with-n.patch | 59 +++ ...ts-linux-Don-t-require-linux-mount.h.patch | 67 ++++ ...004-configure-Require-GCC-5-or-later.patch | 76 ++++ ...erialize-path-changes-across-clients.patch | 339 ++++++++++++++++++ ...ath-lock-in-create-and-metadata-wrap.patch | 182 ++++++++++ ...ted-files-under-the-path-lock-before.patch | 248 +++++++++++++ ...s-Add-a-parallel-create-rename-link-.patch | 87 +++++ ...Add-information-specific-to-file-pro.patch | 216 +++++++++++ ...S.md-Add-to-assist-future-developers.patch | 113 ++++++ meta/recipes-devtools/pseudo/pseudo_git.bb | 10 + 11 files changed, 1554 insertions(+) create mode 100644 meta/recipes-devtools/pseudo/files/0001-test-Skip-open_tree-tests-when-the-function-or-sysca.patch create mode 100644 meta/recipes-devtools/pseudo/files/0002-makewrappers-Don-t-generate-unused-_int-paths-with-n.patch create mode 100644 meta/recipes-devtools/pseudo/files/0003-ports-linux-Don-t-require-linux-mount.h.patch create mode 100644 meta/recipes-devtools/pseudo/files/0004-configure-Require-GCC-5-or-later.patch create mode 100644 meta/recipes-devtools/pseudo/files/0005-pseudo_client-serialize-path-changes-across-clients.patch create mode 100644 meta/recipes-devtools/pseudo/files/0006-ports-hold-the-path-lock-in-create-and-metadata-wrap.patch create mode 100644 meta/recipes-devtools/pseudo/files/0007-ports-check-created-files-under-the-path-lock-before.patch create mode 100644 meta/recipes-devtools/pseudo/files/0008-test-parallel-ops-Add-a-parallel-create-rename-link-.patch create mode 100644 meta/recipes-devtools/pseudo/files/0009-README.security-Add-information-specific-to-file-pro.patch create mode 100644 meta/recipes-devtools/pseudo/files/0010-AGENTS.md-Add-to-assist-future-developers.patch diff --git a/meta/recipes-devtools/pseudo/files/0001-test-Skip-open_tree-tests-when-the-function-or-sysca.patch b/meta/recipes-devtools/pseudo/files/0001-test-Skip-open_tree-tests-when-the-function-or-sysca.patch new file mode 100644 index 0000000000..4100a66213 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0001-test-Skip-open_tree-tests-when-the-function-or-sysca.patch @@ -0,0 +1,157 @@ +From a4ba40892a621f342846139397fb2c636ca9dcf8 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:03 -0600 +Subject: [PATCH] test: Skip open_tree tests when the function or syscall is + unavailable + +From: Mark Hatle + +test-open_tree failed to build on systems where glibc does not provide +open_tree() (added in glibc 2.36), e.g. Ubuntu 22.04, breaking 'make test'. + +Declare open_tree() weak so the test links, and skip the test if the +symbol is not resolved or the call returns ENOSYS. Under pseudo the +symbol always resolves to libpseudo's wrapper, which returns ENOSYS +when libc lacks open_tree(). + +test-open_tree_attr-syscall failed on kernels older than 6.15 which do +not implement the open_tree_attr syscall. Probe the syscall first and +skip the test if it returns ENOSYS. + +Both tests return 77 to indicate a skip, which the shell wrappers convert +to 255 so run_tests.sh reports them as skipped, matching the existing +openat2 tests. + +(cherry picked from commit ef3fadb80ea4822fd6ddbdd6fd21dd6a358f010f) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + test/test-open_tree.c | 25 +++++++++++++++++++++++++ + test/test-open_tree.sh | 15 +++++++++++++-- + test/test-open_tree_attr-syscall.c | 11 +++++++++++ + test/test-open_tree_attr-syscall.sh | 15 +++++++++++++-- + 4 files changed, 62 insertions(+), 4 deletions(-) + +diff --git a/test/test-open_tree.c b/test/test-open_tree.c +index 9570f11..3b1b7ea 100644 +--- a/test/test-open_tree.c ++++ b/test/test-open_tree.c +@@ -10,6 +10,14 @@ + #define TEST_DIR "test-open-tree-dir" + #define TEST_FILE "test-open-tree-file" + ++/* ++ * Older glibc versions (< 2.36) do not provide open_tree(). Declare it ++ * weak so the test still links; at runtime it resolves to glibc's or ++ * libpseudo's open_tree if either provides it, otherwise it is NULL and ++ * the test is skipped. ++ */ ++extern int open_tree(int dirfd, const char *path, unsigned int flags) __attribute__((weak)); ++ + static int test_no_flags(void) { + int treefd = -1; + int fd = -1; +@@ -124,6 +132,23 @@ static void cleanup(void) { + } + + int main(void) { ++ int probefd; ++ ++ if (!open_tree) { ++ fprintf(stderr, "open_tree() not available, skipping.\n"); ++ return 77; ++ } ++ ++ /* pseudo exports open_tree() but returns ENOSYS if libc lacks it */ ++ probefd = open_tree(AT_FDCWD, ".", 0); ++ if (probefd == -1 && errno == ENOSYS) { ++ fprintf(stderr, "open_tree() returned ENOSYS, skipping.\n"); ++ return 77; ++ } ++ if (probefd != -1) { ++ close(probefd); ++ } ++ + cleanup(); + + if (mkdir(TEST_DIR, 0777) == -1) { +diff --git a/test/test-open_tree.sh b/test/test-open_tree.sh +index 427d550..274c654 100755 +--- a/test/test-open_tree.sh ++++ b/test/test-open_tree.sh +@@ -1,9 +1,20 @@ + #!/bin/sh + +-./test/test-open_tree ++# rc 77 indicates open_tree() is not available, so report skipped (255). ++# This usually indicates that glibc does not have the open_tree function. ++run_test() { ++ "$@" ++ rc=$? ++ if [ "$rc" -eq 77 ]; then ++ exit 255 ++ fi ++ return "$rc" ++} ++ ++run_test ./test/test-open_tree + rc1=$? + +-PSEUDO_IGNORE_PATHS=/ ./test/test-open_tree ++run_test env PSEUDO_IGNORE_PATHS=/ ./test/test-open_tree + rc2=$? + + exit $((rc1 | rc2)) +diff --git a/test/test-open_tree_attr-syscall.c b/test/test-open_tree_attr-syscall.c +index cc38c5f..e4e652e 100644 +--- a/test/test-open_tree_attr-syscall.c ++++ b/test/test-open_tree_attr-syscall.c +@@ -150,6 +150,17 @@ static void cleanup(void) { + } + + int main(void) { ++ int probefd; ++ ++ probefd = do_open_tree_attr_syscall(AT_FDCWD, ".", 0); ++ if (probefd == -1 && errno == ENOSYS) { ++ fprintf(stderr, "open_tree_attr syscall not supported, skipping.\n"); ++ return 77; ++ } ++ if (probefd != -1) { ++ close(probefd); ++ } ++ + cleanup(); + + if (mkdir(TEST_DIR, 0777) == -1) { +diff --git a/test/test-open_tree_attr-syscall.sh b/test/test-open_tree_attr-syscall.sh +index f6e51f4..d87043e 100755 +--- a/test/test-open_tree_attr-syscall.sh ++++ b/test/test-open_tree_attr-syscall.sh +@@ -1,9 +1,20 @@ + #!/bin/sh + +-./test/test-open_tree_attr-syscall ++# rc 77 indicates the open_tree_attr syscall is not supported (ENOSYS), ++# so report skipped (255). This usually indicates an older kernel. ++run_test() { ++ "$@" ++ rc=$? ++ if [ "$rc" -eq 77 ]; then ++ exit 255 ++ fi ++ return "$rc" ++} ++ ++run_test ./test/test-open_tree_attr-syscall + rc1=$? + +-PSEUDO_IGNORE_PATHS=/ ./test/test-open_tree_attr-syscall ++run_test env PSEUDO_IGNORE_PATHS=/ ./test/test-open_tree_attr-syscall + rc2=$? + + exit $((rc1 | rc2)) diff --git a/meta/recipes-devtools/pseudo/files/0002-makewrappers-Don-t-generate-unused-_int-paths-with-n.patch b/meta/recipes-devtools/pseudo/files/0002-makewrappers-Don-t-generate-unused-_int-paths-with-n.patch new file mode 100644 index 0000000000..923a33edf7 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0002-makewrappers-Don-t-generate-unused-_int-paths-with-n.patch @@ -0,0 +1,59 @@ +From 9e4a0cec44021a548adeb3c55ab4c8240da5659a Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:04 -0600 +Subject: [PATCH] makewrappers: Don't generate unused _int paths with + noignore_path + +From: Mark Hatle + +With preserve_paths=1 the canonical path from pseudo_root_path() is +stored in _int rather than overwriting the path argument. The +only reader of _int is the ignore_paths() check, which is not +generated when noignore_path=1 is also set. + +open_tree, open_tree_attr and openat2 set both options, so path_int was +assigned but never used, resulting in: + + warning: variable 'path_int' set but not used [-Wunused-but-set-variable] + +It also meant an extra pseudo_root_path() call per invocation, as the +guts for these functions resolve the path themselves. + +Skip the declaration and assignment of the _int paths when both options +are set. The generated code for all other wrappers is unchanged. + +(cherry picked from commit f86ca21137e8a846ba64e66243a54554be533c5e) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + makewrappers | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/makewrappers b/makewrappers +index 19508fa..4c99cf3 100755 +--- a/makewrappers ++++ b/makewrappers +@@ -389,7 +389,8 @@ class Function: + return self.args.call() + + def paths_decl(self): +- if self.preserve_paths: ++ # path_int is only read by the ignore_paths() check ++ if self.preserve_paths and not self.noignore_path: + return "\n\t".join("char *" + path + "_int;" for path in self.paths_to_munge) + return "" + +@@ -420,6 +421,9 @@ class Function: + "\t\t\t%s -1;\n" + "\t\t\tgoto quick_exit;\n" + "\t\t}\n" % (path, self.rc_assign())) ++ if self.preserve_paths and self.noignore_path: ++ # path_int is only read by the ignore_paths() check ++ continue + fix_paths.append( + "%s = pseudo_root_path(__func__, __LINE__, %s%s, %s, %s);" % + (pathvar, prefix, self.dirfd, path, self.flags)) diff --git a/meta/recipes-devtools/pseudo/files/0003-ports-linux-Don-t-require-linux-mount.h.patch b/meta/recipes-devtools/pseudo/files/0003-ports-linux-Don-t-require-linux-mount.h.patch new file mode 100644 index 0000000000..7ec83a39f3 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0003-ports-linux-Don-t-require-linux-mount.h.patch @@ -0,0 +1,67 @@ +From 71e5702d36d9ecf27c32f064105459e25b1721f2 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:05 -0600 +Subject: [PATCH] ports/linux: Don't require + +From: Mark Hatle + + only exists in kernel headers from 5.2, so pseudo no +longer built on older hosts such as CentOS 7. pseudo only needs +OPEN_TREE_CLONE, which already has a fallback, and struct mount_attr, +which is only used through pointers, so declare it instead of including +the header. The forward declaration is also needed without the header, +or each prototype using the struct declares a different type. + +(cherry picked from commit e545758f96dbe8a70623957009fd79502e638cd1) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + ports/linux/portdefs.h | 7 +++++-- + test/test-open_tree_attr-syscall.c | 1 - + 2 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h +index ac1d971..546c33b 100644 +--- a/ports/linux/portdefs.h ++++ b/ports/linux/portdefs.h +@@ -35,7 +35,6 @@ GLIBC_COMPAT_SYMBOL(memcpy,2.0); + #include + #include + #include +-#include + + /* close_range()'s flags, and unshare(), are only declared by glibc under + * _GNU_SOURCE, which pseudo does not build with. is +@@ -94,11 +93,15 @@ extern int unshare(int flags); + #define SYS_open_tree __NR_open_tree + #endif + +-/* OPEN_TREE_CLONE may be missing from older host headers. ++/* The new mount API is only in from glibc 2.36, and ++ * is missing from older kernel headers (before 5.2), so ++ * don't rely on either. OPEN_TREE_CLONE is kernel ABI, and struct ++ * mount_attr is only used through pointers, so it can stay incomplete. + */ + #ifndef OPEN_TREE_CLONE + #define OPEN_TREE_CLONE (1U << 0) + #endif ++struct mount_attr; + + #ifndef SYS_open_tree_attr + +diff --git a/test/test-open_tree_attr-syscall.c b/test/test-open_tree_attr-syscall.c +index e4e652e..aead9d4 100644 +--- a/test/test-open_tree_attr-syscall.c ++++ b/test/test-open_tree_attr-syscall.c +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include + + #ifndef SYS_open_tree_attr diff --git a/meta/recipes-devtools/pseudo/files/0004-configure-Require-GCC-5-or-later.patch b/meta/recipes-devtools/pseudo/files/0004-configure-Require-GCC-5-or-later.patch new file mode 100644 index 0000000000..1f4d7051b1 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0004-configure-Require-GCC-5-or-later.patch @@ -0,0 +1,76 @@ +From 19829a590a6504b148223d0de3ea3835699c876c Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:06 -0600 +Subject: [PATCH] configure: Require GCC 5 or later + +From: Mark Hatle + +pseudo uses __has_include, which GCC only supports from version 5, so +older compilers such as GCC 4.8 on CentOS 7 failed part way through the +build. + +clang reports itself as GCC 4.2.1, so it is only checked for +__has_include. + +(cherry picked from commit 7add07ba4f5b5095a66614bb210e5d42cfe33555) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + README | 3 +++ + configure | 25 +++++++++++++++++++++++++ + 2 files changed, 28 insertions(+) + +diff --git a/README b/README +index c4cb997..039f960 100644 +--- a/README ++++ b/README +@@ -11,6 +11,9 @@ environment, allowing ordinary users to run commands which give the illusion + of creating device nodes, changing file ownership, and otherwise doing + things necessary for creating distribution packages or filesystems. + ++Building pseudo requires GCC 5 or later (or clang), which the configure ++script checks for. ++ + To configure, run the provided configure script. Note that this is + NOT an autoconf script. + +diff --git a/configure b/configure +index 68c9962..f561dcb 100755 +--- a/configure ++++ b/configure +@@ -232,6 +232,31 @@ if [ -z "$opt_sqlite_lib" ]; then + opt_sqlite_lib=$opt_lib + fi + ++# pseudo uses __has_include, which needs GCC 5 or later. clang reports ++# itself as GCC 4.2.1, so only check its support for __has_include. ++if ! cc_version=$(${CC:-cc} -dumpversion 2>/dev/null); then ++ echo >&2 "Error: can't run the C compiler '${CC:-cc}'." ++ exit 1 ++fi ++cc_check=$(mktemp -d "${TMPDIR:-/tmp}/pseudo-configure.XXXXXX") || exit 1 ++cat > "$cc_check/cc_check.c" <&1); then ++ echo >&2 "Error: pseudo requires GCC 5 or later (${CC:-cc} reports version $cc_version)." ++ echo >&2 "$cc_check_out" ++ rm -rf "$cc_check" ++ exit 1 ++fi ++rm -rf "$cc_check" ++ + if [ ! -f "${opt_sqlite}/include/sqlite3.h" ]; then + echo >&2 "SQLite3 headers not found in at ${opt_sqlite}/include/sqlite3.h. Please check that SQLite3 and SQLite3 headers are installed." + exit 1 diff --git a/meta/recipes-devtools/pseudo/files/0005-pseudo_client-serialize-path-changes-across-clients.patch b/meta/recipes-devtools/pseudo/files/0005-pseudo_client-serialize-path-changes-across-clients.patch new file mode 100644 index 0000000000..e0008a53f8 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0005-pseudo_client-serialize-path-changes-across-clients.patch @@ -0,0 +1,339 @@ +From 7d712bbcec30795defab1f5e6d4a5f1b2a9a9bbf Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:07 -0600 +Subject: [PATCH] pseudo_client: serialize path changes across clients + +From: Mark Hatle + +test-parallel-rename and test-parallel-symlinks failed with "inode +mismatch" and "path mismatch" errors, and clients were aborted by the +server. + +rename() and unlink() look at the destination, send OP_MAY_UNLINK, +make the change on disk, and then send OP_DID_UNLINK and OP_RENAME, as +separate steps. The wrapper lock only covers one process, so another +client can rename onto the same name in between. The first client then +marks and removes the wrong inode, and its OP_RENAME finds a different +entry at the destination. ln -sf does the same, as it creates a +temporary symlink and renames it over the link. + +Readers race in the same way: a client can lstat() a name before +another client replaces it, but only report the result to the server +afterwards. If the filesystem has meanwhile reused the inode number +for a new file, the server sees the inode under the wrong path, and +aborts the reader. + +Add a path lock shared by all clients of a server, using fcntl() locks +on pseudo.pathlock in the local state directory. makewrappers gains a +path_lock option which holds the lock around the guts of a wrapper: +exclusive (path_lock=1) for rename, renameat, unlink, unlinkat and +rmdir, and shared (path_lock=shared) for the stat family, so readers +don't block each other but can't observe a name in the middle of a +change. + +fcntl() locks belong to the process, so a forked child doesn't share +them, and they are released if the process dies. The descriptor is +kept open and protected like pseudo's other internal descriptors. If +the lock can't be taken the operation runs unlocked as before. + +Both tests now pass consistently, including with PSEUDO_DEBUG set. The +lock adds about 4us to an lstat() (about 12%) and 2% to a rename. + +(cherry picked from commit 4a605712d6a4c9b410cc51c33f3d08a2836ab7d0) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + makewrappers | 17 +++++++ + ports/linux/statx/wrapfuncs.in | 2 +- + ports/linux/wrapfuncs.in | 24 +++++----- + ports/unix/wrapfuncs.in | 10 ++-- + pseudo.h | 1 + + pseudo_client.c | 83 +++++++++++++++++++++++++++++++++- + pseudo_client.h | 2 + + templates/wrapfuncs.c | 2 +- + 8 files changed, 121 insertions(+), 20 deletions(-) + +diff --git a/makewrappers b/makewrappers +index 4c99cf3..6b96c74 100755 +--- a/makewrappers ++++ b/makewrappers +@@ -244,6 +244,11 @@ class Function: + self.noignore_path = False + self.hand_wrapped = None + self.async_skip = None ++ # Hold the client path lock (pseudo_client_path_lock()) around ++ # the guts: path_lock=1 (exclusive) for operations that check, ++ # change and then record a path in separate steps, and ++ # path_lock=shared for operations that only look at a path. ++ self.path_lock = None + # used for the copyright date when creating stub functions + self.date = datetime.date.today().year + # Used to define pointers that should EFAULT if null +@@ -494,6 +499,18 @@ class Function: + else: + return "rc =" + ++ def path_lock_begin(self): ++ """take the client path lock, for path_lock=1 functions""" ++ if self.path_lock: ++ return "int path_lock_fd = pseudo_client_path_lock(%d);\n\t\t\t" % (self.path_lock == "shared") ++ return "" ++ ++ def path_lock_end(self): ++ """release the client path lock, for path_lock=1 functions""" ++ if self.path_lock: ++ return "\n\t\t\tpseudo_client_path_unlock(path_lock_fd);" ++ return "" ++ + def def_return(self): + """return default value (or just return)""" + if self.type == 'void': +diff --git a/ports/linux/statx/wrapfuncs.in b/ports/linux/statx/wrapfuncs.in +index a81fb91..3ca40ac 100644 +--- a/ports/linux/statx/wrapfuncs.in ++++ b/ports/linux/statx/wrapfuncs.in +@@ -1 +1 @@ +-int statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf); /* efault=path */ ++int statx(int dirfd, const char *path, int flags, unsigned int mask, struct statx *statxbuf); /* efault=path, path_lock=shared */ +diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in +index d417ed3..65f2d7a 100644 +--- a/ports/linux/wrapfuncs.in ++++ b/ports/linux/wrapfuncs.in +@@ -2,12 +2,12 @@ int open(const char *path, int flags, ...{mode_t mode}); /* flags=((flags&O_NOFO + int __open_2(const char *path, int flags); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int __open64_2(const char *path, int flags); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + char *get_current_dir_name(void); +-int __xstat(int ver, const char *path, struct stat *buf); +-int __lxstat(int ver, const char *path, struct stat *buf); /* flags=AT_SYMLINK_NOFOLLOW */ ++int __xstat(int ver, const char *path, struct stat *buf); /* path_lock=shared */ ++int __lxstat(int ver, const char *path, struct stat *buf); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int __fxstat(int ver, int fd, struct stat *buf); + int lchmod(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ + int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW */ +-int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags); ++int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags); /* path_lock=shared */ + int openat(int dirfd, const char *path, int flags, ...{mode_t mode}); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int __openat_2(int dirfd, const char *path, int flags); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int open_tree(int dirfd, const char *path, unsigned int flags); /* preserve_paths=1, noignore_path=1 */ +@@ -25,18 +25,18 @@ int open64(const char *path, int flags, ...{mode_t mode}); /* flags=((flags&O_NO + int openat64(int dirfd, const char *path, int flags, ...{mode_t mode}); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int __openat64_2(int dirfd, const char *path, int flags); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int creat64(const char *path, mode_t mode); +-int stat(const char *path, struct stat *buf); /* real_func=pseudo_stat */ +-int lstat(const char *path, struct stat *buf); /* real_func=pseudo_lstat, flags=AT_SYMLINK_NOFOLLOW */ ++int stat(const char *path, struct stat *buf); /* real_func=pseudo_stat, path_lock=shared */ ++int lstat(const char *path, struct stat *buf); /* real_func=pseudo_lstat, flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int fstat(int fd, struct stat *buf); /* real_func=pseudo_fstat */ +-int fstatat(int dirfd, const char *path, struct stat *buf, int flags); +-int stat64(const char *path, struct stat64 *buf); /* real_func=pseudo_stat64 */ +-int lstat64(const char *path, struct stat64 *buf); /* real_func=pseudo_lstat64, flags=AT_SYMLINK_NOFOLLOW */ ++int fstatat(int dirfd, const char *path, struct stat *buf, int flags); /* path_lock=shared */ ++int stat64(const char *path, struct stat64 *buf); /* real_func=pseudo_stat64, path_lock=shared */ ++int lstat64(const char *path, struct stat64 *buf); /* real_func=pseudo_lstat64, flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int fstat64(int fd, struct stat64 *buf); /* real_func=pseudo_fstat64 */ +-int fstatat64(int dirfd, const char *path, struct stat64 *buf, int flags); +-int __xstat64(int ver, const char *path, struct stat64 *buf); +-int __lxstat64(int ver, const char *path, struct stat64 *buf); /* flags=AT_SYMLINK_NOFOLLOW */ ++int fstatat64(int dirfd, const char *path, struct stat64 *buf, int flags); /* path_lock=shared */ ++int __xstat64(int ver, const char *path, struct stat64 *buf); /* path_lock=shared */ ++int __lxstat64(int ver, const char *path, struct stat64 *buf); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int __fxstat64(int ver, int fd, struct stat64 *buf); +-int __fxstatat64(int ver, int dirfd, const char *path, struct stat64 *buf, int flags); ++int __fxstatat64(int ver, int dirfd, const char *path, struct stat64 *buf, int flags); /* path_lock=shared */ + FILE *fopen64(const char *path, const char *mode); /* noignore_path=1 */ + int nftw64(const char *path, int (*fn)(const char *, const struct stat64 *, int, struct FTW *), int nopenfd, int flag); /* noignore_path=1 */ + FILE *freopen64(const char *path, const char *mode, FILE *stream); /* noignore_path=1 */ +diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in +index 5665735..a4892fe 100644 +--- a/ports/unix/wrapfuncs.in ++++ b/ports/unix/wrapfuncs.in +@@ -53,13 +53,13 @@ int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW */ + int mkostemp(char *template, int oflags); /* flags=AT_SYMLINK_NOFOLLOW */ + int mkstemps(char *template, int suffixlen); /* flags=AT_SYMLINK_NOFOLLOW */ + int mkostemps(char *template, int suffixlen, int oflags); /* flags=AT_SYMLINK_NOFOLLOW */ +-int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ +-int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ +-int rmdir(const char *path); /* flags=AT_SYMLINK_NOFOLLOW */ ++int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int rmdir(const char *path); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int symlink(const char *oldname, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ + int symlinkat(const char *oldname, int dirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ +-int unlink(const char *path); /* flags=AT_SYMLINK_NOFOLLOW */ +-int unlinkat(int dirfd, const char *path, int rflags); /* flags=AT_SYMLINK_NOFOLLOW */ ++int unlink(const char *path); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int unlinkat(int dirfd, const char *path, int rflags); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + # primarily for use with chroot() + ssize_t readlink(const char *path, char *buf, size_t bufsiz); /* flags=AT_SYMLINK_NOFOLLOW */ + ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz); /* flags=AT_SYMLINK_NOFOLLOW */ +diff --git a/pseudo.h b/pseudo.h +index 3e98c0b..c1077cb 100644 +--- a/pseudo.h ++++ b/pseudo.h +@@ -109,6 +109,7 @@ extern char *pseudo_version; + + #define PSEUDO_LOCKFILE "pseudo.lock" + #define PSEUDO_LOGFILE "pseudo.log" ++#define PSEUDO_PATHLOCK "pseudo.pathlock" + #define PSEUDO_PIDFILE "pseudo.pid" + #define PSEUDO_SOCKET "pseudo.socket" + +diff --git a/pseudo_client.c b/pseudo_client.c +index 6bdb17c..759afeb 100644 +--- a/pseudo_client.c ++++ b/pseudo_client.c +@@ -47,6 +47,7 @@ static char *base_path(int dirfd, const char *path, int leave_last); + static int connect_fd = -1; + static int server_pid = 0; + int pseudo_localstate_dir_fd = -1; ++static int pseudo_pathlock_fd = -1; + int pseudo_pwd_fd = -1; + int pseudo_pwd_lck_fd = -1; + char *pseudo_pwd_lck_name = NULL; +@@ -532,6 +533,7 @@ pseudo_init_client(void) { + /* Ensure that all of the values are reset */ + server_pid = 0; + pseudo_localstate_dir_fd = -1; ++ pseudo_pathlock_fd = -1; + pseudo_pwd_fd = -1; + pseudo_pwd_lck_fd = -1; + pseudo_pwd_lck_name = NULL; +@@ -1173,6 +1175,80 @@ pseudo_fd(int fd, int how) { + return(newfd); + } + ++/* Operations such as rename() and unlink() look at the destination, change ++ * it on disk, and then tell the server what happened, in several separate ++ * steps. Another client doing the same to the same name in between makes ++ * the database describe a file that is no longer there, which the server ++ * reports as an inode or path mismatch. Wrappers marked path_lock=1 hold ++ * this lock, shared by every client of the server, for the whole sequence. ++ * ++ * fcntl() locks belong to the process, so a forked child does not share ++ * them even though it inherits the descriptor, and they are released if ++ * the process dies. The descriptor is kept open and protected like ++ * pseudo's other internal descriptors. ++ * ++ * Wrappers that only look at a path (stat() and friends) take the lock ++ * shared: they don't block each other, but can't observe a path between ++ * the change on disk and the database update. ++ * ++ * Returns the descriptor to pass to pseudo_client_path_unlock(), or -1 if ++ * the lock could not be taken, in which case the operation runs unlocked. ++ */ ++int ++pseudo_client_path_lock(int shared) { ++ static char *lock_path = NULL; ++ struct flock lk = { .l_type = shared ? F_RDLCK : F_WRLCK, .l_whence = SEEK_SET }; ++ int save_errno = errno; ++ int locked = 0, retried = 0; ++ ++ pseudo_antimagic(); ++ for (;;) { ++ if (pseudo_pathlock_fd == -1) { ++ if (!lock_path) ++ lock_path = pseudo_localstatedir_path(PSEUDO_PATHLOCK); ++ if (lock_path) ++ pseudo_pathlock_fd = pseudo_fd(open(lock_path, ++ O_RDWR | O_CREAT | O_CLOEXEC, 0644), MOVE_FD); ++ if (pseudo_pathlock_fd == -1) { ++ pseudo_debug(PDBGF_CLIENT, "path lock: can't open '%s': %s\n", ++ lock_path ? lock_path : "", strerror(errno)); ++ break; ++ } ++ } ++ if (fcntl(pseudo_pathlock_fd, F_SETLKW, &lk) == 0) { ++ locked = 1; ++ break; ++ } ++ if (errno == EINTR) ++ continue; ++ /* closed behind our back: reopen it once */ ++ if (errno == EBADF && !retried) { ++ pseudo_pathlock_fd = -1; ++ retried = 1; ++ continue; ++ } ++ pseudo_debug(PDBGF_CLIENT, "path lock: can't lock '%s': %s\n", ++ lock_path ? lock_path : "", strerror(errno)); ++ break; ++ } ++ pseudo_magic(); ++ errno = save_errno; ++ return locked ? pseudo_pathlock_fd : -1; ++} ++ ++void ++pseudo_client_path_unlock(int fd) { ++ struct flock lk = { .l_type = F_UNLCK, .l_whence = SEEK_SET }; ++ int save_errno = errno; ++ ++ if (fd != -1) { ++ pseudo_antimagic(); ++ fcntl(fd, F_SETLK, &lk); ++ pseudo_magic(); ++ } ++ errno = save_errno; ++} ++ + static int + client_connect(void) { + /* we have a server pid, is it responsive? */ +@@ -1913,6 +1989,8 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path + startfd = pseudo_util_evlog_fd + 1; + if (pseudo_localstate_dir_fd >= startfd) + startfd = pseudo_localstate_dir_fd + 1; ++ if (pseudo_pathlock_fd >= startfd) ++ startfd = pseudo_pathlock_fd + 1; + if (pseudo_pwd_fd >= startfd) + startfd = pseudo_pwd_fd + 1; + if (pseudo_pwd_lck_fd >= startfd) +@@ -1926,7 +2004,8 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path + */ + for (i = fd; i < startfd && i <= close_range_maxfd; ++i) { + if (i == pseudo_util_debug_fd || i == pseudo_util_evlog_fd || +- i == pseudo_localstate_dir_fd || i == pseudo_pwd_fd || ++ i == pseudo_localstate_dir_fd || i == pseudo_pathlock_fd || ++ i == pseudo_pwd_fd || + i == pseudo_pwd_lck_fd || i == pseudo_grp_fd || + i == connect_fd) + continue; +@@ -1952,6 +2031,8 @@ pseudo_client_op(pseudo_op_t op, int access, int fd, int dirfd, const char *path + pseudo_util_debug_fd = pseudo_fd(fd, COPY_FD); + } else if (fd == pseudo_localstate_dir_fd) { + pseudo_localstate_dir_fd = pseudo_fd(fd, COPY_FD); ++ } else if (fd == pseudo_pathlock_fd) { ++ pseudo_pathlock_fd = pseudo_fd(fd, COPY_FD); + } else if (fd == pseudo_pwd_fd) { + pseudo_pwd_fd = pseudo_fd(fd, COPY_FD); + /* since we have a FILE * on it, we close that... */ +diff --git a/pseudo_client.h b/pseudo_client.h +index 9b9f86a..217981d 100644 +--- a/pseudo_client.h ++++ b/pseudo_client.h +@@ -28,6 +28,8 @@ extern void pseudo_client_touchgid(void); + extern char *pseudo_client_fdpath(int fd); + extern int pseudo_client_shutdown(int); + extern int pseudo_fd(int fd, int how); ++extern int pseudo_client_path_lock(int shared); ++extern void pseudo_client_path_unlock(int fd); + #define MOVE_FD 0 + #define COPY_FD 1 + #define PSEUDO_MIN_FD 20 +diff --git a/templates/wrapfuncs.c b/templates/wrapfuncs.c +index 9385a40..a57c997 100644 +--- a/templates/wrapfuncs.c ++++ b/templates/wrapfuncs.c +@@ -68,7 +68,7 @@ ${maybe_async_skip} + } else { + /* exec*() use this to restore the sig mask */ + pseudo_saved_sigmask = saved; +- ${rc_assign} wrap_$name(${call_args}); ++ ${path_lock_begin}${rc_assign} wrap_$name(${call_args});${path_lock_end} + } + } + ${variadic_end} diff --git a/meta/recipes-devtools/pseudo/files/0006-ports-hold-the-path-lock-in-create-and-metadata-wrap.patch b/meta/recipes-devtools/pseudo/files/0006-ports-hold-the-path-lock-in-create-and-metadata-wrap.patch new file mode 100644 index 0000000000..23815b7aac --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0006-ports-hold-the-path-lock-in-create-and-metadata-wrap.patch @@ -0,0 +1,182 @@ +From e52f678bbc2c34b1bc8519a42f03c9006657b161 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:08 -0600 +Subject: [PATCH] ports: hold the path lock in create and metadata wrappers + +From: Mark Hatle + +Like rename() and unlink(), the wrappers that create a name, or that +look at a path and then change its metadata in the database, do so in +separate steps: the real operation on disk, then a request to the +server. Another client renaming onto or removing the same name in +between leaves the database out of step with the filesystem, which the +server reports as an inode or path mismatch, and may abort a client. + +Hold the path lock exclusively in the wrappers that create a name: +link, linkat, symlink, symlinkat, mkdir, mkdirat, mkfifo, mkfifoat, +mknod, mknodat, __xmknod, __xmknodat, bind, mkdtemp and the mkstemp +family. None of these can block indefinitely. + +Hold it shared in the wrappers that look at a path and then record or +query its metadata: chmod, lchmod, fchmodat, chown, lchown, fchownat, +fts_read, fts_children, and the path based xattr calls. + +(cherry picked from commit c8b1b3ab4d552570f854d3ee19f3bf9611ae633a) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + ports/linux/wrapfuncs.in | 16 ++++++------ + ports/linux/xattr/wrapfuncs.in | 16 ++++++------ + ports/unix/wrapfuncs.in | 46 +++++++++++++++++----------------- + 3 files changed, 39 insertions(+), 39 deletions(-) + +diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in +index 65f2d7a..a682383 100644 +--- a/ports/linux/wrapfuncs.in ++++ b/ports/linux/wrapfuncs.in +@@ -5,17 +5,17 @@ char *get_current_dir_name(void); + int __xstat(int ver, const char *path, struct stat *buf); /* path_lock=shared */ + int __lxstat(int ver, const char *path, struct stat *buf); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int __fxstat(int ver, int fd, struct stat *buf); +-int lchmod(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ +-int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW */ ++int lchmod(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ ++int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags); /* path_lock=shared */ + int openat(int dirfd, const char *path, int flags, ...{mode_t mode}); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int __openat_2(int dirfd, const char *path, int flags); /* flags=((flags&O_NOFOLLOW)||((flags&(O_CREAT|O_EXCL))==(O_CREAT|O_EXCL))), noignore_path=1 */ + int open_tree(int dirfd, const char *path, unsigned int flags); /* preserve_paths=1, noignore_path=1 */ + int open_tree_attr(int dirfd, const char *path, unsigned int flags, struct mount_attr *attr, size_t size); /* preserve_paths=1, noignore_path=1*/ +-int mknod(const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknod */ +-int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknodat */ +-int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */ +-int __xmknodat(int ver, int dirfd, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */ ++int mknod(const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknod, path_lock=1 */ ++int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknodat, path_lock=1 */ ++int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int __xmknodat(int ver, int dirfd, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int fcntl(int fd, int cmd, ...{struct flock *lock}); /* noignore_path=1 */ + int fcntl64(int fd, int cmd, ...{struct flock *lock}); /* noignore_path=1 */ + # just so we know the inums of symlinks +@@ -44,8 +44,8 @@ int ftw64(const char *path, int (*fn)(const char *, const struct stat64 *, int), + int glob64(const char *pattern, int flags, int (*errfunc)(const char *, int), glob64_t *pglob); + int scandir64(const char *path, struct dirent64 ***namelist, int (*filter)(const struct dirent64 *), int (*compar)()); + int truncate64(const char *path, off64_t length); +-int mkostemp64(char *template, int oflags); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkstemp64(char *template); /* flags=AT_SYMLINK_NOFOLLOW */ ++int mkostemp64(char *template, int oflags); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkstemp64(char *template); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups); + int setgroups(size_t size, const gid_t *list); + int setfsgid(gid_t fsgid); +diff --git a/ports/linux/xattr/wrapfuncs.in b/ports/linux/xattr/wrapfuncs.in +index 09eba23..89b1c68 100644 +--- a/ports/linux/xattr/wrapfuncs.in ++++ b/ports/linux/xattr/wrapfuncs.in +@@ -1,12 +1,12 @@ +-ssize_t getxattr(const char *path, const char *name, void *value, size_t size); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ ++ssize_t getxattr(const char *path, const char *name, void *value, size_t size); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ ++ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ + ssize_t fgetxattr(int filedes, const char *name, void *value, size_t size); /* version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-int setxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-int lsetxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ ++int setxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ ++int lsetxattr(const char *path, const char *name, const void *value, size_t size, int xflags); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ + int fsetxattr(int filedes, const char *name, const void *value, size_t size, int xflags); /* version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-ssize_t listxattr(const char *path, char *list, size_t size); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-ssize_t llistxattr(const char *path, char *list, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ ++ssize_t listxattr(const char *path, char *list, size_t size); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ ++ssize_t llistxattr(const char *path, char *list, size_t size); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ + ssize_t flistxattr(int filedes, char *list, size_t size); /* version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-int removexattr(const char *path, const char *name); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +-int lremovexattr(const char *path, const char *name); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ ++int removexattr(const char *path, const char *name); /* flags=0, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ ++int lremovexattr(const char *path, const char *name); /* flags=AT_SYMLINK_NOFOLLOW, version="GLIBC_2.3", version-aarch64="GLIBC_2.17", path_lock=shared */ + int fremovexattr(int filedes, const char *name); /* version="GLIBC_2.3", version-aarch64="GLIBC_2.17" */ +diff --git a/ports/unix/wrapfuncs.in b/ports/unix/wrapfuncs.in +index a4892fe..b9d0782 100644 +--- a/ports/unix/wrapfuncs.in ++++ b/ports/unix/wrapfuncs.in +@@ -4,7 +4,7 @@ char *getwd(char *buf); + int close(int fd); /* noignore_path=1 */ + int fchmod(int fd, mode_t mode); + int fchown(int fd, uid_t owner, gid_t group); +-int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW */ ++int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=shared */ + int dup2(int oldfd, int newfd); /* noignore_path=1 */ + int dup(int fd); /* noignore_path=1 */ + int chdir(const char *path); /* noignore_path=1 */ +@@ -13,13 +13,13 @@ int access(const char *path, int mode); + int faccessat(int dirfd, const char *path, int mode, int flags); + int faccessat2(int dirfd, const char *path, int mode, int flags); + FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **)); /* inode64=1 */ +-FTSENT *fts_read(FTS *ftsp); /* noignore_path=1, inode64=1 */ +-FTSENT *fts_children(FTS *ftsp, int options); /* noignore_path=1, inode64=1 */ ++FTSENT *fts_read(FTS *ftsp); /* noignore_path=1, inode64=1, path_lock=shared */ ++FTSENT *fts_children(FTS *ftsp, int options); /* noignore_path=1, inode64=1, path_lock=shared */ + int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int nopenfd); + int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int nopenfd, int flag); + int glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob); + int lutimes(const char *path, const struct timeval *tv); /* flags=AT_SYMLINK_NOFOLLOW */ +-char *mkdtemp(char *template); ++char *mkdtemp(char *template); /* path_lock=1 */ + char *mktemp(char *template); + long pathconf(const char *path, int name); + char *realpath(const char *name, char *resolved_name); /* version="GLIBC_2.3" */ +@@ -37,27 +37,27 @@ int fclose(FILE *fp); /* noignore_path=1 */ + FILE *freopen(const char *path, const char *mode, FILE *stream); /* noignore_path=1 */ + int chroot(const char *path); /* noignore_path=1 */ + int acct(const char *path); +-int chmod(const char *path, mode_t mode); +-int chown(const char *path, uid_t owner, gid_t group); +-int fchmodat(int dirfd, const char *path, mode_t mode, int flags); +-int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags); +-int link(const char *oldname, const char *newname); /* flags=AT_SYMLINK_NOFOLLOW */ +-int linkat(int olddirfd, const char *oldname, int newdirfd, const char *newname, int flags); +-int mkdir(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkdirat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkfifo(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkfifoat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkostemp(char *template, int oflags); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkstemps(char *template, int suffixlen); /* flags=AT_SYMLINK_NOFOLLOW */ +-int mkostemps(char *template, int suffixlen, int oflags); /* flags=AT_SYMLINK_NOFOLLOW */ ++int chmod(const char *path, mode_t mode); /* path_lock=shared */ ++int chown(const char *path, uid_t owner, gid_t group); /* path_lock=shared */ ++int fchmodat(int dirfd, const char *path, mode_t mode, int flags); /* path_lock=shared */ ++int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags); /* path_lock=shared */ ++int link(const char *oldname, const char *newname); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int linkat(int olddirfd, const char *oldname, int newdirfd, const char *newname, int flags); /* path_lock=1 */ ++int mkdir(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkdirat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkfifo(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkfifoat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mknod(const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkostemp(char *template, int oflags); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkstemps(char *template, int suffixlen); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int mkostemps(char *template, int suffixlen, int oflags); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int rmdir(const char *path); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ +-int symlink(const char *oldname, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ +-int symlinkat(const char *oldname, int dirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */ ++int symlink(const char *oldname, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ ++int symlinkat(const char *oldname, int dirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int unlink(const char *path); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + int unlinkat(int dirfd, const char *path, int rflags); /* flags=AT_SYMLINK_NOFOLLOW, path_lock=1 */ + # primarily for use with chroot() +@@ -74,4 +74,4 @@ void sync(void); /* async_skip= */ + int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags); /* async_skip=0 */ + int msync(void *addr, size_t length, int flags); /* async_skip=0 */ + mode_t umask(mode_t mask); +-int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); ++int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); /* path_lock=1 */ diff --git a/meta/recipes-devtools/pseudo/files/0007-ports-check-created-files-under-the-path-lock-before.patch b/meta/recipes-devtools/pseudo/files/0007-ports-check-created-files-under-the-path-lock-before.patch new file mode 100644 index 0000000000..0c7716e72a --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0007-ports-check-created-files-under-the-path-lock-before.patch @@ -0,0 +1,248 @@ +From 45bf43b216bfa281bbbf838f18acbf8df0531f67 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:09 -0600 +Subject: [PATCH] ports: check created files under the path lock before + recording them + +From: Mark Hatle + +open() and friends with O_CREAT create a file and then send OP_CREAT +for the path, so another client can rename onto or remove the name in +between, like the other wrappers that create names. They can't hold +the path lock across the real call, as opening a FIFO can block +indefinitely, which could deadlock against a client waiting for the +lock. + +Instead, take the lock after the file has been opened, and only send +OP_CREAT if the path still names the file that was opened, using a new +pseudo_client_path_matches_fd(). With the lock held no other client is +part way through changing the path, so if it now names a different +file, that client has already recorded the change and recording ours +would be wrong. + +This covers openat (and so open, creat and their variants), openat2, +fopen, freopen, fopen64 and freopen64. openat and openat2 now also take +the recorded stat data from the descriptor rather than from an earlier +lookup of the path. + +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +(cherry picked from commit 21fe63e9dbeb50aa21b498b485d0c3d87f632bc3) + +Also include the pseudo_real_fstat and pseudo_real_stat declarations +(pseudo_client.h), definitions (pseudo_util.c) and initialization +(pseudo_wrappers.c) from fcd8a81 ("pseudo_client: resolve +/proc//fd/ to the descriptor"). + +The new pseudo_client_path_matches_fd() needs them, but the rest of +fcd8a81 is an unrelated behavior change that is not being backported. + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + ports/linux/guts/fopen64.c | 5 ++++- + ports/linux/guts/freopen64.c | 5 ++++- + ports/linux/guts/openat.c | 8 +++++++- + ports/linux/openat2/guts/openat2.c | 8 +++++++- + ports/unix/guts/fopen.c | 5 ++++- + ports/unix/guts/freopen.c | 5 ++++- + pseudo_client.c | 25 +++++++++++++++++++++++++ + pseudo_client.h | 3 +++ + pseudo_util.c | 2 ++ + pseudo_wrappers.c | 2 ++ + 10 files changed, 62 insertions(+), 6 deletions(-) + +diff --git a/ports/linux/guts/fopen64.c b/ports/linux/guts/fopen64.c +index e76da69..a6efd18 100644 +--- a/ports/linux/guts/fopen64.c ++++ b/ports/linux/guts/fopen64.c +@@ -22,8 +22,11 @@ + pseudo_debug(PDBGF_FILE, "fopen64 '%s': fd %d \n", path, fd, (void *) rc); + if (real___fxstat64(_STAT_VER, fd, &buf) != -1) { + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); +- pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ if (pseudo_client_path_matches_fd(path, fd, 0)) ++ pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); + } else { +diff --git a/ports/linux/guts/freopen64.c b/ports/linux/guts/freopen64.c +index 5fc9073..6057eda 100644 +--- a/ports/linux/guts/freopen64.c ++++ b/ports/linux/guts/freopen64.c +@@ -21,8 +21,11 @@ + pseudo_debug(PDBGF_FILE, "freopen64 '%s': fd %d\n", path, fd); + if (real___fxstat64(_STAT_VER, fd, &buf) != -1) { + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); +- pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ if (pseudo_client_path_matches_fd(path, fd, 0)) ++ pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); + } else { +diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c +index 656ac2b..13bd395 100644 +--- a/ports/linux/guts/openat.c ++++ b/ports/linux/guts/openat.c +@@ -148,9 +148,15 @@ + if (stat_rc != -1) { + buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode); + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(rc, PSEUDO_FS_MODE(mode, 0)); + // file has no path, but has been created +- pseudo_client_op(OP_CREAT, 0, -1, dirfd, path, &buf); ++ if (pseudo_client_path_matches_fd(path, rc, flags & O_NOFOLLOW) && ++ real___fxstat64(_STAT_VER, rc, &buf) != -1) { ++ buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode); ++ pseudo_client_op(OP_CREAT, 0, -1, dirfd, path, &buf); ++ } ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, PSEUDO_ACCESS(flags), rc, dirfd, path, &buf); + } else { +diff --git a/ports/linux/openat2/guts/openat2.c b/ports/linux/openat2/guts/openat2.c +index a0acbe7..687029a 100644 +--- a/ports/linux/openat2/guts/openat2.c ++++ b/ports/linux/openat2/guts/openat2.c +@@ -183,9 +183,15 @@ + if (stat_rc != -1) { + buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, my_how.mode); + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(rc, PSEUDO_FS_MODE(my_how.mode, 0)); + // file has no path, but has been created +- pseudo_client_op(OP_CREAT, 0, -1, dirfd, pseudo_path, &buf); ++ if (pseudo_client_path_matches_fd(pseudo_path, rc, my_how.flags & O_NOFOLLOW) && ++ real___fxstat64(_STAT_VER, rc, &buf) != -1) { ++ buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, my_how.mode); ++ pseudo_client_op(OP_CREAT, 0, -1, dirfd, pseudo_path, &buf); ++ } ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, PSEUDO_ACCESS(my_how.flags), rc, dirfd, pseudo_path, &buf); + } else { +diff --git a/ports/unix/guts/fopen.c b/ports/unix/guts/fopen.c +index 26a6abc..78388f7 100644 +--- a/ports/unix/guts/fopen.c ++++ b/ports/unix/guts/fopen.c +@@ -21,8 +21,11 @@ + pseudo_debug(PDBGF_OP, "fopen '%s': fd %d \n", path, fd, (void *) rc); + if (base_fstat(fd, &buf) != -1) { + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); +- pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ if (pseudo_client_path_matches_fd(path, fd, 0)) ++ pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); + } else { +diff --git a/ports/unix/guts/freopen.c b/ports/unix/guts/freopen.c +index 703b6aa..5d63c9f 100644 +--- a/ports/unix/guts/freopen.c ++++ b/ports/unix/guts/freopen.c +@@ -21,8 +21,11 @@ + pseudo_debug(PDBGF_OP, "freopen '%s': fd %d\n", path, fd); + if (base_fstat(fd, &buf) != -1) { + if (!existed) { ++ int path_lock_fd = pseudo_client_path_lock(0); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); +- pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ if (pseudo_client_path_matches_fd(path, fd, 0)) ++ pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); ++ pseudo_client_path_unlock(path_lock_fd); + } + pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); + } else { +diff --git a/pseudo_client.c b/pseudo_client.c +index 759afeb..fe99aa6 100644 +--- a/pseudo_client.c ++++ b/pseudo_client.c +@@ -1249,6 +1249,31 @@ pseudo_client_path_unlock(int fd) { + errno = save_errno; + } + ++/* Operations that can block, such as open() on a FIFO, can't hold the path ++ * lock across the real call. Instead they take the lock afterwards and ++ * check that the path still names the file they opened before recording ++ * it. With the lock held, no other client is part way through changing the ++ * path, so if it now names a different file, that client has already ++ * recorded the change, and recording ours would be wrong. ++ */ ++int ++pseudo_client_path_matches_fd(const char *path, int fd, int nofollow) { ++ PSEUDO_STATBUF pbuf, fbuf; ++ int save_errno = errno; ++ int rc; ++ ++ if (!path || fd < 0 || !pseudo_real_fstat || !pseudo_real_lstat || !pseudo_real_stat) ++ return 1; ++ rc = pseudo_real_fstat(fd, &fbuf) == 0 && ++ (nofollow ? pseudo_real_lstat(path, &pbuf) : pseudo_real_stat(path, &pbuf)) == 0 && ++ pbuf.st_dev == fbuf.st_dev && pbuf.st_ino == fbuf.st_ino; ++ if (!rc) ++ pseudo_debug(PDBGF_FILE, "'%s' no longer names fd %d, not recording it.\n", ++ path, fd); ++ errno = save_errno; ++ return rc; ++} ++ + static int + client_connect(void) { + /* we have a server pid, is it responsive? */ +diff --git a/pseudo_client.h b/pseudo_client.h +index 217981d..77fe2ff 100644 +--- a/pseudo_client.h ++++ b/pseudo_client.h +@@ -30,6 +30,7 @@ extern int pseudo_client_shutdown(int); + extern int pseudo_fd(int fd, int how); + extern int pseudo_client_path_lock(int shared); + extern void pseudo_client_path_unlock(int fd); ++extern int pseudo_client_path_matches_fd(const char *path, int fd, int nofollow); + #define MOVE_FD 0 + #define COPY_FD 1 + #define PSEUDO_MIN_FD 20 +@@ -53,6 +54,8 @@ extern FILE *pseudo_grp; + + /* pseudo_wrappers will try to initialize these */ + extern int (*pseudo_real_lstat)(const char *path, PSEUDO_STATBUF *buf); ++extern int (*pseudo_real_fstat)(int fd, PSEUDO_STATBUF *buf); ++extern int (*pseudo_real_stat)(const char *path, PSEUDO_STATBUF *buf); + extern int (*pseudo_real_fork)(void); + extern int (*pseudo_real_execv)(const char *, char * const *); + +diff --git a/pseudo_util.c b/pseudo_util.c +index b8afe34..0267585 100644 +--- a/pseudo_util.c ++++ b/pseudo_util.c +@@ -97,6 +97,8 @@ static int pseudo_util_initted = -1; /* Not yet run */ + + /* bypass wrapper logic on path computations */ + int (*pseudo_real_lstat)(const char *path, PSEUDO_STATBUF *buf) = NULL; ++int (*pseudo_real_fstat)(int fd, PSEUDO_STATBUF *buf) = NULL; ++int (*pseudo_real_stat)(const char *path, PSEUDO_STATBUF *buf) = NULL; + /* bash workaround */ + int (*pseudo_real_unsetenv)(const char *) = unsetenv; + char * (*pseudo_real_getenv)(const char *) = getenv; +diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c +index e54dad5..94f4260 100644 +--- a/pseudo_wrappers.c ++++ b/pseudo_wrappers.c +@@ -177,6 +177,8 @@ pseudo_init_wrappers(void) { + pseudo_real_fsetxattr = real_fsetxattr; + #endif + pseudo_real_lstat = base_lstat; ++ pseudo_real_fstat = base_fstat; ++ pseudo_real_stat = base_stat; + /* and these are used so the client's server spawn can bypass + * wrappers. + */ diff --git a/meta/recipes-devtools/pseudo/files/0008-test-parallel-ops-Add-a-parallel-create-rename-link-.patch b/meta/recipes-devtools/pseudo/files/0008-test-parallel-ops-Add-a-parallel-create-rename-link-.patch new file mode 100644 index 0000000000..752a2283d4 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0008-test-parallel-ops-Add-a-parallel-create-rename-link-.patch @@ -0,0 +1,87 @@ +From ad74f92191757254172af8ae39549b256b880321 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:10 -0600 +Subject: [PATCH] test-parallel-ops: Add a parallel create/rename/link/chmod + test + +From: Mark Hatle + +Four workers repeatedly create, rename onto, chmod, chown, symlink, +hard link and remove the same names in one directory. The test fails +if any of the operations fail, or if the server logged an inode or path +mismatch while it ran. + +Without the path lock in the create, metadata and open wrappers, the +server reports mismatches and occasionally aborts a client. + +(cherry picked from commit 7f582310cb7eb67da9b20ceb3082331518f6d4fb) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +AI-Generated: Uses GitHub Copilot +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + test/test-parallel-ops.sh | 53 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 53 insertions(+) + create mode 100755 test/test-parallel-ops.sh + +diff --git a/test/test-parallel-ops.sh b/test/test-parallel-ops.sh +new file mode 100755 +index 0000000..2fccd30 +--- /dev/null ++++ b/test/test-parallel-ops.sh +@@ -0,0 +1,53 @@ ++#!/bin/bash ++# ++# SPDX-License-Identifier: LGPL-2.1-only ++# ++# Several clients create, rename, link, chmod and remove the same names in ++# one directory at once. pseudo must not let one client's operation land in ++# the middle of another client's change to the same name, or the server ++# finds the database out of step with the filesystem. It then logs an ++# "inode mismatch" or "path mismatch" error, and may abort a client. ++# ++# The temporary tree has to live below $PWD so that pseudo tracks it. ++ ++tmpdir="$(mktemp -d -p "$PWD" parallel_ops_XXXXXX)" ++trap "rm -rf '$tmpdir'" EXIT TERM INT ++ ++log="${PSEUDO_LOCALSTATEDIR:-$PWD/var/pseudo}/pseudo.log" ++mismatches() { ++ grep -c "mismatch" "$log" 2>/dev/null || true ++} ++before=$(mismatches) ++ ++cd "$tmpdir" || exit 1 ++: > target ++ ++worker() { ++ for i in $(seq 50); do ++ echo "$1 $i" > "tmp.$1" || echo "FAILED: create tmp.$1" >> failed ++ mv -f "tmp.$1" target || echo "FAILED: mv tmp.$1 target" >> failed ++ chmod 640 target 2>/dev/null ++ chown 0:0 target 2>/dev/null ++ ln -sf target lnk || echo "FAILED: ln -sf target lnk" >> failed ++ mkdir dir 2>/dev/null; rmdir dir 2>/dev/null ++ mkfifo "f.$1" && mv -f "f.$1" fifo || echo "FAILED: mkfifo/mv f.$1" >> failed ++ ln -f target "hard.$1" 2>/dev/null && rm -f "hard.$1" ++ done ++} ++ ++for w in 1 2 3 4; do ++ worker $w & ++done ++wait ++ ++rc=0 ++if [ -e failed ]; then ++ sort failed | uniq -c ++ rc=1 ++fi ++after=$(mismatches) ++if [ "${after:-0}" -ne "${before:-0}" ]; then ++ echo "FAILED: $((after - before)) mismatch error(s) in $log" ++ rc=1 ++fi ++exit $rc diff --git a/meta/recipes-devtools/pseudo/files/0009-README.security-Add-information-specific-to-file-pro.patch b/meta/recipes-devtools/pseudo/files/0009-README.security-Add-information-specific-to-file-pro.patch new file mode 100644 index 0000000000..9ec387f631 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0009-README.security-Add-information-specific-to-file-pro.patch @@ -0,0 +1,216 @@ +From 3863f5d291743306efa6acc62dd43a26ba2ff2f5 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:11 -0600 +Subject: [PATCH] README.security: Add information specific to file/process + security + +From: Mark Hatle + +As noted in the README.security file, pseudo is not intended for +secure computing, but to assist in build system workflows. + +During review the recent rewrite_proc_fd_ref it was noted that +the way pseudo is working may be counter to the way selinux and +similar tools are expecting the system to behave. This behavior +change is acceptable for the build environment workflow, but +is not acceptable to a running/server workflow. + +See the README.security file for more details. + +AI-Generated: Used GitHub Copilot to assist in writing the file +Signed-off-by: Mark Hatle +(cherry picked from commit 019e93e03f7bb4fe2bacf3658f7dd6bf0d23fb65) + +Changes from the cherry-picked version, to match this branch: + +Section 1: mention DYLD_INSERT_LIBRARIES, as this branch still has the +Darwin port, and note that the port is known not to work and is +unlikely to be useful (see b550fd3, which removes it on master). + +Section 3: drop the /proc/self/fd/ and /dev/fd/ item, as +rewrite_proc_fd_ref() (fcd8a81) is not on this branch. fchmodat calls +the real fchmodat(), not chmod, and mknodat is implemented by +ports/linux/guts/__xmknodat.c, as the Linux guts override ports/unix; +both corrections were made upstream in 81d4150 and dd69ed1. + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + README | 3 + + README.security | 152 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 155 insertions(+) + create mode 100644 README.security + +diff --git a/README b/README +index 039f960..e4fb5ec 100644 +--- a/README ++++ b/README +@@ -11,6 +11,9 @@ environment, allowing ordinary users to run commands which give the illusion + of creating device nodes, changing file ownership, and otherwise doing + things necessary for creating distribution packages or filesystems. + ++pseudo is not a security boundary and must not be used in security ++sensitive applications. See README.security for details. ++ + Building pseudo requires GCC 5 or later (or clang), which the configure + script checks for. + +diff --git a/README.security b/README.security +new file mode 100644 +index 0000000..2cb124f +--- /dev/null ++++ b/README.security +@@ -0,0 +1,152 @@ ++pseudo -- security considerations ++ ++SUMMARY: ++ ++pseudo is a build tool. It exists so that ordinary users can produce ++packages and filesystem images containing files that appear to be owned ++by root, device nodes, special permissions and extended attributes. ++ ++pseudo is NOT a security boundary and must not be used in security ++sensitive applications. In particular, do not use pseudo: ++ ++* to contain, confine or sandbox untrusted programs; ++* as a substitute for real privileges, a real chroot, a container or a ++ virtual machine; ++* to process filesystem trees that untrusted or concurrent processes can ++ modify while pseudo is running; ++* as the only guarantee that the ownership, permissions, SELinux labels ++ or file capabilities in a security critical image are correct. ++ ++ ++1. INTERCEPTION IS COOPERATIVE ++ ++pseudo works by loading libpseudo with LD_PRELOAD (DYLD_INSERT_LIBRARIES ++on Darwin) and wrapping libc functions. Anything that does not go ++through those wrappers reaches the real filesystem directly, with the ++real privileges of the user who started pseudo. This includes: ++ ++* statically linked programs; ++* programs that make system calls directly, including language runtimes ++ that do not use libc for file operations, and interfaces such as ++ io_uring; ++* setuid/setgid programs, for which the dynamic linker ignores ++ LD_PRELOAD; ++* any program that clears LD_PRELOAD, or that sets PSEUDO_UNLOAD or ++ PSEUDO_DISABLED (see pseudo_client.c), both of which are deliberately ++ supported ways to turn pseudo off. ++ ++A program running under pseudo can therefore always step outside of it. ++pseudo cannot be used to restrict what a program does. ++ ++The Darwin port is described as implemented, but it has not worked for ++a long time: System Integrity Protection and the hardened runtime block ++DYLD_INSERT_LIBRARIES, so it is unlikely to be useful. ++ ++ ++2. "ROOT" EXISTS ONLY IN THE DATABASE ++ ++pseudo grants no privileges. Files on disk remain owned by the real ++user, and the ownership and modes that programs see under pseudo are ++read back from pseudo's database. The kernel does not enforce any of ++the emulated ownership or permissions. ++ ++The real on-disk modes are also deliberately different from the ++emulated ones. PSEUDO_FS_MODE (pseudo_client.h) always adds owner read ++and write permission (and owner execute for directories) so that the ++emulated root can access everything, and removes group/other write, ++setuid and setgid bits from the real file. A file that is meant to be ++mode 0600 or 0000 and owned by root, for example /etc/shadow or a ++private key, is readable and writable on disk by the build user and by ++any process running as that user, whether or not it is under pseudo. ++ ++Treat everything pseudo writes as accessible to the build user. ++ ++ ++3. FILE DESCRIPTORS BECOME PATHS (TOCTOU) ++ ++Many security sensitive programs rely on the kernel resolving a file ++descriptor, or a path relative to a directory descriptor, to a specific ++inode. This is how they avoid races where a path component is replaced ++with a symlink between checking a file and using it. pseudo removes ++that protection in several ways: ++ ++* Paths are canonicalized in user space. pseudo_fix_path() ++ (pseudo_util.c) walks each path component with lstat() and readlink() ++ and builds an absolute path, and the real function is then called ++ with that absolute path (see doc/chroot). A call such as ++ openat(dirfd, "file", ...) is no longer anchored to dirfd; it becomes ++ an operation on "/file". Kernel guarantees ++ such as O_NOFOLLOW on intermediate components or RESOLVE_BENEATH are ++ not reproduced by this resolution, except in the few wrappers marked ++ preserve_paths in wrapfuncs.in, which handle paths themselves. ++ ++* The path pseudo recorded for a descriptor (fd_path() in ++ pseudo_client.c) is used to resolve paths relative to it. That ++ record can be stale: the file or directory may have been renamed, or ++ the descriptor may have been inherited, received over a socket, or ++ opened by a call pseudo did not see. ++ ++* Several wrappers check a path and then act on it by path in a second ++ step. For example, fchmodat (ports/unix/guts/fchmodat.c) stats the ++ path and later calls the real fchmodat() on the same path, and mknodat ++ (ports/linux/guts/__xmknodat.c) removes the path again by name if the ++ database update fails. ++ ++If anything else can change the tree while pseudo is working on it, an ++operation may be applied to a different file than the one that was ++checked, both in pseudo's database and on the real filesystem. Only ++run pseudo on trees that are fully under the control of the build. ++ ++ ++4. THE CHROOT IS EMULATED ++ ++pseudo's chroot() support only prepends a stored prefix to absolute ++paths and strips it from some results (see doc/chroot). No real ++chroot() is performed, and the README notes the support is incomplete. ++Any of the bypasses in section 1, or any path pseudo resolves ++differently from the kernel, reaches the host filesystem. pseudo's ++chroot must not be relied on to keep a program inside a directory. ++ ++ ++5. METADATA LIVES IN A DATABASE THAT CAN DRIFT ++ ++Emulated ownership, modes, device nodes and extended attributes, ++including security.selinux and security.capability, exist only in ++pseudo's database until a packaging or image step copies them out. ++Entries are keyed by path and inode number. When files are changed ++outside of pseudo, for example deleted or recreated without pseudo ++loaded, an inode number can be reused and the database can attach the ++old file's ownership, mode or attributes to a new file. The server ++reports such cases as "inode mismatch" or "path mismatch" (pseudo.c), ++but cannot always know which side is correct. ++ ++Accesses to paths listed in PSEUDO_IGNORE_PATHS are deliberately not ++tracked at all. ++ ++Generated images should be verified independently if their ownership, ++permissions, labels or capabilities matter for security. Do not ++ignore mismatch errors in pseudo's log. ++ ++ ++6. THE SERVER TRUSTS ITS CLIENTS ++ ++The pseudo server listens on a Unix socket in its local state directory ++and does not authenticate clients beyond the filesystem permissions of ++that socket. Any process running as the build user can connect and ++change the database, and the database files themselves are writable by ++that user. The resulting metadata can only be trusted as much as every ++process running as the build user. ++ ++ ++RECOMMENDATIONS: ++ ++* Run pseudo only on build output that is private to the build and is ++ not modified concurrently by anything outside of it. ++* Run untrusted build steps under a real isolation mechanism (a ++ container, a virtual machine, or a dedicated user), with pseudo inside ++ it if needed, never pseudo alone. ++* Do not store secrets in a pseudo-managed tree on a shared system; ++ they are readable by the build user regardless of their emulated ++ ownership and mode. ++* Verify the ownership, permissions, labels and capabilities of ++ security relevant files in the final image. diff --git a/meta/recipes-devtools/pseudo/files/0010-AGENTS.md-Add-to-assist-future-developers.patch b/meta/recipes-devtools/pseudo/files/0010-AGENTS.md-Add-to-assist-future-developers.patch new file mode 100644 index 0000000000..62bbab1464 --- /dev/null +++ b/meta/recipes-devtools/pseudo/files/0010-AGENTS.md-Add-to-assist-future-developers.patch @@ -0,0 +1,113 @@ +From 56e1fc69be92cefc58d6d9829069776b53f86470 Mon Sep 17 00:00:00 2001 +From: Yoann Congal +Date: Wed, 11 Nov 2026 10:15:12 -0600 +Subject: [PATCH] AGENTS.md: Add to assist future developers + +From: Mark Hatle + +Based partially off of the Yocto Project standards, this is my attempt +at documenting the configuration I use with agents during maintainer +and development activities. + +(cherry picked from commit fe4e4f0d920d587f0ded3c044255ee27269d2646) + +Upstream-Status: Pending [patches under test, https://lore.kernel.org/all/1794413712-18072-2-git-send-email-mark.hatle@kernel.crashing.org/] +Signed-off-by: Mark Hatle +Signed-off-by: Mark Hatle +Signed-off-by: Yoann Congal +--- + AGENTS.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 85 insertions(+) + create mode 100644 AGENTS.md + +diff --git a/AGENTS.md b/AGENTS.md +new file mode 100644 +index 0000000..c0d041a +--- /dev/null ++++ b/AGENTS.md +@@ -0,0 +1,85 @@ ++# AGENTS.md — pseudo ++ ++Guidance for AI agents working in the `pseudo` repository. ++ ++## Making changes ++ ++- No web PR workflow. The project uses **patches on mailing lists** ++ (yocto-patches@lists.yoctoproject.org). Don't assume GitHub PR ++ conventions apply. Subject on the mailing list must include ++ '[pseudo]'. ++- One Git commit per logical change (e.g., one commit per fix, refactor or new test). ++- Split unrelated changes, even small ones found along the way: a bug ++ noticed during a refactor gets its own commit. ++- Keep every commit building cleanly, with tests passing, so the series ++ bisects. Put a new test after the fix it checks. ++- Commit message format: ++ - Summary line prefixed with the component or short file path, ++ e.g. `pseudo_util: Remove stale with_libpseudo() comment`. ++ Check `git log --oneline ` for the prefix convention already in use. ++ - Body explains what/why/how, and how it was tested. ++ - Prefer explaining *why* a change was made over restating what's ++ already visible in the diff, unless the diff is long/hard to follow ++ or the reason for the change isn't known — in those cases, summarize ++ what changed instead. ++ - Be succinct: use as few sentences and lines as possible while still ++ covering what/why/how. Cut restatements, filler, and any detail a ++ reviewer wouldn't need (e.g. exact test-run counts, step-by-step ++ narration). One short paragraph is usually enough; only add a second ++ if a distinct point (e.g. testing) needs it. ++ - The most relevant information about the change should be presented first. ++ - Reference bugs as `[YOCTO #1234]` when applicable. ++ - Use `Reported-by`, `Suggested-by`, `Tested-by`, `Reviewed-by`, `Cc` tags ++ where relevant. ++ ++### AI-generated code ++ ++- **Mandatory**: any AI-generated code/commit must add an `AI-Generated:` ++ tag line in the commit message, placed *before* `Signed-off-by` (if present), ++ naming the tool used, e.g.: ++ ++ ``` ++ component: Add the ability to ... ++ ++ AI-Generated: Uses GitHub Copilot ++ ``` ++ ++- **Mandatory** Do not automatically add a `Signed-off-by`. This tag must ++ always be written by the human contributor, never by the AI tool — the ++ DCO/Developer's Statement of Origin still applies in full. ++- Contributor is responsible for confirming the AI tool's terms don't ++ conflict with the project's open source license/IP policy, and that ++ any third-party copyrighted material in the AI output is properly ++ licensed before contributing it. See the Linux Foundation generative AI ++ guidance: https://www.linuxfoundation.org/legal/generative-ai. ++- `Co-authored-by` should be omitted in favor of the `AI-Generated` tag. ++ Don't add other tool-specific trailers either (e.g. `Copilot-Session`). ++ ++## Building and testing ++ ++- Configure and build: `./configure --prefix=$(pwd)/test && make` ++- Full test suite: `make test-verbose` (or `make test`). Single tests: ++ `./run_tests.sh -v test-name`. ++- Tests are `test/test-*.sh`, with optional `test/test-*.c` programs that ++ the Makefile builds automatically. A script exits 0 to pass and 255 to ++ report a skip; C helpers conventionally exit 77 for "not supported" ++ (for example ENOSYS), which the script maps to 255. Create temporary ++ trees below $PWD so pseudo tracks them. ++- Changes to the server, locking or path handling: also run the ++ test-parallel-* tests several times, as they are timing dependent. ++ ++## Code layout ++ ++- Wrappers are generated by `makewrappers` from `ports/*/wrapfuncs.in`, ++ `templates/` and the guts in `ports/*/guts/`. Don't edit the generated ++ files (pseudo_wrapfuncs.*, pseudo_wrapper_table.c, pseudo_ports.h, ++ port_wrappers.c). ++- Linux is the only port. Put port-specific definitions in ++ `ports//portdefs.h`. Where shared code needs something only one ++ port provides, fail with `#error` for other ports rather than silently ++ falling back. ++- Keep pseudo.1 and README.security in step with behaviour changes: ++ options, environment variables, diagnostics, security model. ++ ++When in doubt about a convention, grep `git log --oneline ` in the ++target repo for precedent before inventing a new style. diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index 764f81b683..82f1f946b8 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -3,6 +3,16 @@ require pseudo.inc SRC_URI = "git://git.yoctoproject.org/pseudo;branch=pseudo-1.9;protocol=https \ file://fallback-passwd \ file://fallback-group \ + file://0001-test-Skip-open_tree-tests-when-the-function-or-sysca.patch \ + file://0002-makewrappers-Don-t-generate-unused-_int-paths-with-n.patch \ + file://0003-ports-linux-Don-t-require-linux-mount.h.patch \ + file://0004-configure-Require-GCC-5-or-later.patch \ + file://0005-pseudo_client-serialize-path-changes-across-clients.patch \ + file://0006-ports-hold-the-path-lock-in-create-and-metadata-wrap.patch \ + file://0007-ports-check-created-files-under-the-path-lock-before.patch \ + file://0008-test-parallel-ops-Add-a-parallel-create-rename-link-.patch \ + file://0009-README.security-Add-information-specific-to-file-pro.patch \ + file://0010-AGENTS.md-Add-to-assist-future-developers.patch \ " SRC_URI:append:class-native = " \ http://downloads.yoctoproject.org/mirror/sources/pseudo-prebuilt-2.33.tar.xz;subdir=git/prebuilt;name=prebuilt \ From patchwork Thu Nov 19 15:22:34 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104896 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.96.1795101866086687166 for ; Thu, 19 Nov 2026 07:24:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=jaKUF/CD; spf=pass (domain: smile.fr, ip: 209.85.128.42, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4a1fbd52ab6so18394555e9.0 for ; Thu, 19 Nov 2026 07:24:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101864; x=1795706664; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=zAjBvmWi/e57XFPKovvqQpO8GW1wh3/5IWwNEB/fZ3w=; b=jaKUF/CDlNvV7f0rdqKlv/ost7XzwKlUoj0XVERBvRWP05iwdyGUvqfBQGMypjpb0H eFOG0hHAECwF7pDpeKEwX46D7sh6tCXx/swbtwz8wwyRG/38ifkhvW98cE4K2L1KIqeX wN8KKVDB4rhRVP+BfmsMkcOtnGbaBBeLs51J3hFehExIdAyCnf4vzAofwRPcaOWb0Hjx Op9qs42u+5FYmD+bi+UlPiTdz3msIh/mkYZD0cB+oDYN8El1Jtxqm+R/Jv++ShnxyOtH Ma+Le9+zf5VBXwFglQciLG6Okfa4dfGBrMM/oLWl3bZeuH62hsDxAlpXp45xA8OQaBKQ WdUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101864; x=1795706664; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=zAjBvmWi/e57XFPKovvqQpO8GW1wh3/5IWwNEB/fZ3w=; b=CZGB+BsTXzn2+akLBis830C1TDNEMxjMc6TrIly059s7GHo2Dida/QU6kdYH12d0Tp YXqXEoVsrJ2XYT2lVTTGmFcWokryPcDu8h6abHWyGUM52DLVTSh8DWt+ilM8d+3H4GMU GdtVkFZxmDCRYuBCJ8sJscRgQD610kNWVlyNoYLib97QaUiIebnp1EnB4AFZVUi8y3jF 3LvBwidhw+FmBbgwmPqqiaewoVid41Hxqgaxdpyy0BGwNXmB0tOo/Kd2hHC/deYWMQC/ tUuZQ0DlSvYaXbwFS6ROX/os7UalCfhsNMYBTVvanzYk5taf4Gcz3gldZDBmOm5quaUl qnZQ== X-Gm-Message-State: APuU4Z8rpiKenhGGKCtBhgFvT9sbhITN9CMZZiYCI0hQatw4l3OTjWWS 8hvLsK1I4JhdFu+SzLlGOeeC9x5iEuF73MtDq6im4E+ElsLmGj+hYE2V9CY7E7H1s9l8ole9ft+ Xj3TQ+nw= X-Gm-Gg: AYBFou0XYzmyvF78hha60URJmI1abr+ZxyC9A0j1wk6c5Kl0gzmAuzJQkhJfELR/TWI MQizyl0OmdzTxAANFoDxsazeVOkCMaRIQV3h8+rYqli+hKaVlmacL6Y8CY+4vQIr8GsdKIQV9Xf 20h9ndCuTJH9y1iUym43LE4fYpBksQJedLKOHjRjsvUgOXjrGwtiLbUBMEW8WpZa35xCgQGtqgK AAyk6HGr6Z1dKCUeqsvBmcerPQ3kqOzD4WjhvTHTje802HKOF3XFCLjM21x7rt4lNiA0JBAZIa6 67t0jMUri79ewjy5IZdTt1Mp4XjcsYDkdCCL7rNYjTQgZrXTYxj90iyyQGjnuU24OBhQnoY5/D1 ITx9113Y8B0/x76Hf3dgiQAXc2FKAlKJfmn2Q03K8nh0bBR4eCuB44uDYoSAGdM2JK5Zji5hRjP Yyj/BZFo1Xs/x+GQ6E6J8McCFI7kMYslA7WX504zEuorS8YvCBmlJ2SEVWgxcc1Rqf1GTfiutSC K+9YfETW+gopLWpvI0KnNA4B52J6a8Q9WUfXTi3MOryrtWxrEENUY5qDyOjOS6oCHh+h40w7ONT kfxxkAqW2vU7wgJbTGscEFDH0kF0seRd90Q2VMSvlSdzn4I/J24iYIR/LVicgi+EcMo4uBv5ETN yR0wv10N3M9pmhLPJQza1BhrF0nYzoxsEe/0q69yOhqTIZRF4XcEYLTZ5Xf7jgFb1h2fz/DxYzf BV X-Received: by 2002:a05:600c:310e:b0:4b8:d17e:da27 with SMTP id 5b1f17b1804b1-4bb7da4372dmr129483455e9.27.1795101863641; Thu, 19 Nov 2026 07:24:23 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:23 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 08/19] popt: patch CVE-2026-18739 Date: Thu, 19 Nov 2026 16:22:34 +0100 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250690 From: Peter Marko Pick patch referencing this CVE. Convert change in cmake file to autotools/makefile. Install the new test in recipe. Signed-off-by: Peter Marko [fatho: fix CVE metadata] Signed-off-by: Fabien Thomas --- .../popt/popt/CVE-2026-18739.patch | 92 +++++++++++++++++++ meta/recipes-support/popt/popt_1.19.bb | 2 + 2 files changed, 94 insertions(+) create mode 100644 meta/recipes-support/popt/popt/CVE-2026-18739.patch diff --git a/meta/recipes-support/popt/popt/CVE-2026-18739.patch b/meta/recipes-support/popt/popt/CVE-2026-18739.patch new file mode 100644 index 0000000000..94366f6343 --- /dev/null +++ b/meta/recipes-support/popt/popt/CVE-2026-18739.patch @@ -0,0 +1,92 @@ +From 14c42b415ba0c11640f7d4ee80920452d0287058 Mon Sep 17 00:00:00 2001 +From: Yao Zhang <294772273@qq.com> +Date: Wed, 5 Aug 2026 14:52:10 +0800 +Subject: [PATCH] Fix CVE-2026-18739: off-by-one error in poptStuffArgs() + +The poptStuffArgs function only checks whether (con->os - con->optionStack) +is equal to POPT_OPTION_DEPTH (10) before incrementing con->os, and does +not increment the value by 1 to perform boundary pre-checking, as +handleAlias does. + +Add a new test program as a reproducer for this case. + +Co-authored-by: Panu Matilainen + +Fixes: CVE-2026-18739 + +CVE: CVE-2026-18739 +Upstream-Status: Backport [https://github.com/rpm-software-management/popt/commit/14c42b415ba0c11640f7d4ee80920452d0287058] +Signed-off-by: Peter Marko +--- + src/popt.c | 2 +- + tests/Makefile.am | 5 ++++- + tests/testit.sh | 2 ++ + tests/tstuff.c | 17 +++++++++++++++++ + 4 files changed, 24 insertions(+), 2 deletions(-) + create mode 100644 tests/tstuff.c + +diff --git a/src/popt.c b/src/popt.c +index 9ea3dfe..458aadc 100644 +--- a/src/popt.c ++++ b/src/popt.c +@@ -1668,7 +1668,7 @@ int poptStuffArgs(poptContext con, const char ** argv) + int argc; + int rc; + +- if ((con->os - con->optionStack) == POPT_OPTION_DEPTH) ++ if ((con->os - con->optionStack + 1) == POPT_OPTION_DEPTH) + return POPT_ERROR_OPTSTOODEEP; + + for (argc = 0; argv[argc]; argc++) +diff --git a/tests/Makefile.am b/tests/Makefile.am +index c410389..99fbf64 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -11,7 +11,10 @@ EXTRA_DIST = testit.sh \ + + AM_CPPFLAGS = -I. -I$(top_srcdir)/src + +-noinst_PROGRAMS = test1 test2 tdict test3 ++noinst_PROGRAMS = test1 test2 tdict test3 tstuff ++tstuff_SOURCES = tstuff.c ++tstuff_LDFLAGS = ++tstuff_LDADD = $(top_builddir)/src/libpopt.la + test1_SOURCES = test1.c + test1_LDFLAGS = + test1_LDADD = $(top_builddir)/src/libpopt.la +diff --git a/tests/testit.sh b/tests/testit.sh +index 4078f51..d26be3a 100755 +--- a/tests/testit.sh ++++ b/tests/testit.sh +@@ -172,6 +172,8 @@ run test1 "test1 - 61" "" -x=f1 + + run test1 "test1 - 62" "arg1: 0 arg2: (none) aInt: 1" --randint=-1 + ++run tstuff "tstuff - 1" "-13" ++ + if ! [ -e test3-data ]; then + # create symlink for running during 'make distcheck' + ln -s "${srcdir}/test3-data" test3-data +diff --git a/tests/tstuff.c b/tests/tstuff.c +new file mode 100644 +index 0000000..b820c7b +--- /dev/null ++++ b/tests/tstuff.c +@@ -0,0 +1,17 @@ ++#include ++#include ++ ++int main(int argc, char *argv[]) ++{ ++ poptContext ctx = poptGetContext(argv[0], argc, (const char **)argv, NULL, 0); ++ int rc = 0; ++ for (int i = 0; i < 100; ++i) { ++ const char *ea[] = { "a", NULL }; ++ if ((rc = poptStuffArgs(ctx, ea))) ++ break; ++ } ++ printf("%d\n", rc); ++ ++ poptFreeContext(ctx); ++ return rc; ++} diff --git a/meta/recipes-support/popt/popt_1.19.bb b/meta/recipes-support/popt/popt_1.19.bb index c8b4875c1b..18cc4f2867 100644 --- a/meta/recipes-support/popt/popt_1.19.bb +++ b/meta/recipes-support/popt/popt_1.19.bb @@ -11,6 +11,7 @@ DEPENDS = "virtual/libiconv" SRC_URI = "http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz \ file://run-ptest \ file://CVE-2026-18743.patch \ + file://CVE-2026-18739.patch \ " SRC_URI[sha256sum] = "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9" @@ -25,6 +26,7 @@ do_compile_ptest() { do_install_ptest() { install ${B}/tests/.libs/test* ${D}/${PTEST_PATH} install ${B}/tests/.libs/tdict ${D}/${PTEST_PATH} + install ${B}/tests/.libs/tstuff ${D}/${PTEST_PATH} install ${B}/tests/testit.sh ${D}/${PTEST_PATH} install ${B}/tests/test-poptrc ${D}/${PTEST_PATH} } From patchwork Thu Nov 19 15:22:35 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104897 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.85.1795101867309085923 for ; Thu, 19 Nov 2026 07:24:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=i48emOJs; spf=pass (domain: smile.fr, ip: 209.85.128.53, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4a35a60499eso18162675e9.0 for ; Thu, 19 Nov 2026 07:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101865; x=1795706665; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=jFW9ZCLS91hlr/I2RcFRvj+Nn/Vx91/ee63pKbz3teo=; b=i48emOJsf03umx5ZFbo8/ETVnaXYIRDwO2Jm4Giqi+3+N/q+snDvER2B+rL+Mw290u Wpt4bkjhMXbAis58J9GKbPDVn2Ap/ROkbq3ydOrtU9k80u1I1F8NtSxs74BUk+/HJjph 5Hv0cQcFhWYt7N5K4I7lcVDLQk/6+7oT/JEk9+k9+h9OToeSi+rmhRfnYPyuta5/qNNZ 1Bskt6XMnQqBALgbPGpPOWCoD43btRlg05mRj+G6jeXYCLLi2U2hCvhJtnz8Guy289rQ Rt/heocYYQjpJA7p6Ccukh7WjwB/aVNL5SA8wHoqgfaMg4sKE8M6qjOV7QBR6VV19wcY srdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101865; x=1795706665; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=jFW9ZCLS91hlr/I2RcFRvj+Nn/Vx91/ee63pKbz3teo=; b=RFnS7QyTs6XqSDNsZeGbqG7gCdHn6u9nuOEe6KYqn9sgXeWy6vIpCYNbUql8ZMLi/d A8Rcz+FAo8otDRDhyLEfltNNjQbckUdj60qNSa+kXiNb88Wr+v1C9FK6Zs5+MYnpQUTy 1jWka8wVQSKP6AckYcUdVljWZSPRBhni4vyO9xK43uqOPPu3G26UjZzTcyrdQ+zpfcCS dvq7U/tALu2xO/zjzOg78zlW0YhUSzYPfXE4usR3W9+LVjilwiDc18pGuis3GB1tY/e3 xgPq3wYs1ttHhvViLZqBq0Mxb2PqP+iabZGjmI1CFTfgdp6d3D0ScaPNk1MhphdXGVMi EU1g== X-Gm-Message-State: APuU4Z/gz0yvMOZzOzMNQVFT0y8MQT1NgSR8jNa2yeKes8Ychv7HJFZz Rqcy9vZtKW1LTm0rezICiDZUvcXt8GHpfYzldj/nHsNRRWSr6AnX/phN7m2kEJsW9P6RzXG4hxb D4U8HG/c= X-Gm-Gg: AYBFou2NHnyehLbICoWXsQ1TX86HD2f/BSJrs8DaiWxxVeXeCu31FPMN6D/trh5SoOv JQvLsf6V79NvxUKELijHrU49p7HxXEHDODluJ8gGX2IAkHfSMOczM6UDqddYcR09+R+0rysTpO4 gvEBtVaPw68Gyzpcg89fRlMkQyebR5GNzKkDosHqDeVZE9U4LGBDxUgNElZ8Ck9ZWbgg6xUELIP /3THUj/NSN9fTCdY1NIB0+RS6Xz4aSlo+FTlpMBWleJyeQgb7lg7QT00TujHwg4rFrZC1sxWLqe SDvtE6ZmLQmr9MzGuXiOEcZMK+Q2q9tkqFv1nETuNCR+bJoUi9vXtJk6prCg/14iLWKFsedLxQk 60m0yUjG1nBE1Ya+PA7bK43mTTzt1lu2prGUXUsGpqI+bEQLfwzGNHuPtDkDomstHbvze/aKGee JS0v/TqxOQ5Xa6ReN1/0DgmxSmXhFmfJSBWWerKr6djj9QklhzdWySmcJ1p3dT9SXAlWclFefiL rwzfo4L4Z5OWh2EYm5ZrwgaNs/fwVNy+n101M4Vvx/6De+AnHvBTxxE1SJCfC49dYZkxJC1DvFG swgfTj4Bny1/IwSd+duhMjQ5DRnq4iFuRdrBj3k293EW6KrXP62ed+//HfjjvAoB90N2YmlbpO4 sxbuas7O6MHGzt9UKnxGgsOUIQB0UWtnT/w8DZs5c8Ix06u0ujOX7RQE= X-Received: by 2002:a05:600c:4e11:b0:4bb:6c71:b269 with SMTP id 5b1f17b1804b1-4bb7da42cf5mr124157315e9.28.1795101865072; Thu, 19 Nov 2026 07:24:25 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:24 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 09/19] glibc: patch CVE-2026-86805 and CVE-2026-95818 Date: Thu, 19 Nov 2026 16:22:35 +0100 Message-ID: <23fb396367e061f1c803bace04b3140e852abc72.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250692 From: Peter Marko Pick patch [1] which is [2] backported to 2.41 (oldest release still receiving security updates) which is mentioned in [3] and [4]. On request, all testing code was removed from the patch. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=629565b0c91dc326ac622b05982f21a374cd03c4 [2] https://sourceware.org/git/?p=glibc.git;a=commit;h=ed0c137b97eb940b4b64981e84ed806d3276edd9 [3] https://security-tracker.debian.org/tracker/CVE-2026-86805 [4] https://security-tracker.debian.org/tracker/CVE-2026-95818 Signed-off-by: Peter Marko Signed-off-by: Bastien Jauny --- .../0049-CVE-2026-86805-CVE-2026-95818.patch | 267 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.39.bb | 1 + 2 files changed, 268 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0049-CVE-2026-86805-CVE-2026-95818.patch diff --git a/meta/recipes-core/glibc/glibc/0049-CVE-2026-86805-CVE-2026-95818.patch b/meta/recipes-core/glibc/glibc/0049-CVE-2026-86805-CVE-2026-95818.patch new file mode 100644 index 0000000000..dde4f8b901 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0049-CVE-2026-86805-CVE-2026-95818.patch @@ -0,0 +1,267 @@ +From 629565b0c91dc326ac622b05982f21a374cd03c4 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Mon, 17 Aug 2026 15:15:32 -0300 +Subject: [PATCH] elf: Open the normalized $ORIGIN rpath in AT_SECURE programs + (BZ 34360) + +For AT_SECURE programs the loader honors $ORIGIN in DT_RPATH only when the +expansion is rooted in a trusted directory, but it validated the lexically +normalized path while opening the raw expansion. As "a/b/../c" only names +"a/c" when "b" is not a symlink, an attacker who controls a component of +$ORIGIN -- e.g. by hard-linking the setuid binary into an attacker-owned +directory -- can make the opened path escape the trusted directory even +though the check passed, loading an attacker-controlled object. + +Normalize the expansion in place and open that, so the path that is opened +is exactly the path that was validated. _dl_normalize_path rewrites the +string in place without ever advancing its write cursor past its read +cursor or appending, so it stays within the original storage. + +Add elf/tst-origin-secure as a regression test. + +Reviewed-by: Florian Weimer +(cherry picked from commit ed0c137b97eb940b4b64981e84ed806d3276edd9) + +CVE: CVE-2026-86805 +CVE: CVE-2026-95818 +Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=629565b0c91dc326ac622b05982f21a374cd03c4] +Omit the regression tests and their test harness prerequisites from this backport. +Signed-off-by: Peter Marko +--- + elf/dl-load.c | 74 +++++++++---------------- + elf/dl-path-normalize.h | 118 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 143 insertions(+), 49 deletions(-) + create mode 100644 elf/dl-path-normalize.h + +diff --git a/elf/dl-load.c b/elf/dl-load.c +index 7b21f1dffa..0d141a61c1 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + /* Type for the buffer we put the ELF header and hopefully the program + header. This buffer does not really have to be too large. In most +@@ -124,54 +125,24 @@ static const size_t system_dirs_len[] = + }; + #define nsystem_dirs_len array_length (system_dirs_len) + ++/* Return true if the normalized path NPATH of length NLEN is rooted in one of ++ the trusted system directories. The system_dirs entries carry a trailing ++ '/'; NPATH matches an entry when it shares the entry's leading component ++ sequence and then either ends or continues with '/'. For instance, ++ "/lib64" and "/lib64/x" match "/lib64/" but "/lib64x" does not. */ + static bool +-is_trusted_path_normalize (const char *path, size_t len) ++path_is_trusted (const char *npath, size_t nlen) + { +- if (len == 0) +- return false; +- +- char *npath = (char *) alloca (len + 2); +- char *wnp = npath; +- while (*path != '\0') +- { +- if (path[0] == '/') +- { +- if (path[1] == '.') +- { +- if (path[2] == '.' && (path[3] == '/' || path[3] == '\0')) +- { +- while (wnp > npath && *--wnp != '/') +- ; +- path += 3; +- continue; +- } +- else if (path[2] == '/' || path[2] == '\0') +- { +- path += 2; +- continue; +- } +- } +- +- if (wnp > npath && wnp[-1] == '/') +- { +- ++path; +- continue; +- } +- } +- +- *wnp++ = *path++; +- } +- +- if (wnp == npath || wnp[-1] != '/') +- *wnp++ = '/'; +- + const char *trun = system_dirs; + + for (size_t idx = 0; idx < nsystem_dirs_len; ++idx) + { +- if (wnp - npath >= system_dirs_len[idx] +- && memcmp (trun, npath, system_dirs_len[idx]) == 0) +- /* Found it. */ ++ /* Compare against the entry without its trailing '/'. */ ++ size_t dirlen = system_dirs_len[idx] - 1; ++ ++ if (nlen >= dirlen ++ && memcmp (trun, npath, dirlen) == 0 ++ && (npath[dirlen] == '/' || npath[dirlen] == '\0')) + return true; + + trun += system_dirs_len[idx] + 1; +@@ -361,16 +332,21 @@ _dl_dst_substitute (struct link_map *l, const char *input, char *result) + checked for trust, the authors of the binaries themselves are + trusted to have designed this correctly. Only $ORIGIN is tested in + this way because it may be manipulated in some ways with hard +- links. */ +- if (__glibc_unlikely (check_for_trusted) +- && !is_trusted_path_normalize (result, wp - result)) +- { +- *result = '\0'; +- return result; +- } ++ links. ++ ++ _dl_normalize_path replaces the expansion with its normalized form ++ in place, so that the path that is opened is exactly the path that ++ was validated. */ + + *wp = '\0'; + ++ if (__glibc_unlikely (check_for_trusted)) ++ { ++ size_t nlen = _dl_normalize_path (result); ++ if (!path_is_trusted (result, nlen)) ++ *result = '\0'; ++ } ++ + return result; + } + +diff --git a/elf/dl-path-normalize.h b/elf/dl-path-normalize.h +new file mode 100644 +index 0000000000..ca4b14698c +--- /dev/null ++++ b/elf/dl-path-normalize.h +@@ -0,0 +1,118 @@ ++/* In-place lexical path normalization for the dynamic loader. ++ Copyright (C) 2026 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _DL_PATH_NORMALIZE_H ++#define _DL_PATH_NORMALIZE_H ++ ++#include ++#include ++ ++/* Lexically normalize the null-terminated PATH in place and return the ++ length of the result (excluding the terminating NUL byte): ++ ++ - Runs of '/' are collapsed to a single '/'. ++ ++ - "." components are removed. ++ ++ - A ".." component removes the preceding component if there is one and it ++ is not itself a preserved "..". In an absolute path a surplus ".." at ++ the root is dropped ("/../a" normalizes to "/a"), in a relative path ++ leading ".." components are preserved ("../a" stays "../a", "a/../../b" ++ normalizes to "../b"). ++ ++ - The result has no trailing '/' except for the root path "/" itself ++ ("/a/" normalizes to "/a"). ++ ++ - The result is empty if and only if every component cancels or is removed ++ ("", ".", "a/.." all normalize to ""). ++ ++ The PATH is written in place, and the internal write cursor never runs ++ ahead of the read cursor. Only bytes within the strlen (PATH) + 1 storage ++ are accessed. */ ++static inline size_t ++_dl_normalize_path (char *path) ++{ ++ /* The root '/' of an absolute path is not removed. */ ++ char *pstart = path + (path[0] == '/'); ++ const char *rnp = pstart; ++ char *wnp = pstart; ++ /* End of the prefix a ".." may not remove. Either the root '/', or, for ++ relative paths, the original start of the string extended by any ++ preserved leading ".." components. */ ++ char *limit = pstart; ++ ++ while (*rnp != '\0') ++ { ++ /* Collapse consecutive separators. */ ++ if (*rnp == '/') ++ { ++ ++rnp; ++ continue; ++ } ++ ++ /* [RNP, REND) is the next input component. */ ++ const char *rend = rnp; ++ while (*rend != '\0' && *rend != '/') ++ ++rend; ++ size_t clen = rend - rnp; ++ ++ /* Drop '.' component. */ ++ if (clen == 1 && rnp[0] == '.') ++ ; ++ else if (clen == 2 && rnp[0] == '.' && rnp[1] == '.') ++ { ++ if (wnp > limit) ++ { ++ /* Remove the last component along with the '/' separating it ++ from its predecessor (the root '/' of an absolute path is ++ retained). */ ++ while (wnp > limit && wnp[-1] != '/') ++ --wnp; ++ if (wnp > pstart) ++ --wnp; ++ } ++ else if (pstart == path) ++ { ++ /* No component is left and the original path is relative: ++ keep the unresolvable ".." (it becomes part of the ++ preserved prefix). */ ++ if (wnp > pstart) ++ *wnp++ = '/'; ++ *wnp++ = '.'; ++ *wnp++ = '.'; ++ limit = wnp; ++ } ++ /* Otherwise the path is absolute and the surplus ".." at the ++ root is dropped ("/../a" normalizes to "/a"). */ ++ } ++ else ++ { ++ if (wnp > pstart) ++ *wnp++ = '/'; ++ memmove (wnp, rnp, clen); ++ wnp += clen; ++ } ++ ++ rnp = rend; ++ } ++ ++ *wnp = '\0'; ++ return wnp - path; ++} ++ ++#endif /* _DL_PATH_NORMALIZE_H */ diff --git a/meta/recipes-core/glibc/glibc_2.39.bb b/meta/recipes-core/glibc/glibc_2.39.bb index 09ac0fc53f..1598249b7b 100644 --- a/meta/recipes-core/glibc/glibc_2.39.bb +++ b/meta/recipes-core/glibc/glibc_2.39.bb @@ -77,6 +77,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0042-CVE-2026-8674.patch \ file://0047-CVE-2026-89092.patch \ file://0048-CVE-2026-97399.patch \ + file://0049-CVE-2026-86805-CVE-2026-95818.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}" From patchwork Thu Nov 19 15:22:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104903 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.98.1795101867800227723 for ; Thu, 19 Nov 2026 07:24:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=SOiW/c85; spf=pass (domain: smile.fr, ip: 209.85.128.51, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4bb64ef5a00so17879745e9.3 for ; Thu, 19 Nov 2026 07:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101866; x=1795706666; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=dw4VAovE/a92cuzsg2cG05H8Nf5LNb2rGLcZ7KrtMzM=; b=SOiW/c855hqaOvoc3D0H3ps7Xkjbe1Gl+0LontqauF0LVUWEHfA+/ctdkXTeOi4sRn ywF7F5sEMXhAuZh8k+nZdrv6BI/3Ywv70RNLkaokrAK0/Z6RBWr5XA4gExgnw+SM9dKE LgVXIo3/xUExO1aiqCcqRF+VQ3npkHA3IuVMpflxCd0OrEOY72FmUWmfcONnbgdwyTdd GUhoaOyymmnYP4CVfA2BozI+aeIdzF1Dq3atkqbobTqw0FcExTfPfVT4b/rT+WwtUSjs TWyHgLZbBgjFztWaIZZMxPz/UCteQQG28Oya1SU6VP0pYQ7Wlxm1cRZGtw4KOiP3Tirb hEkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101866; x=1795706666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=dw4VAovE/a92cuzsg2cG05H8Nf5LNb2rGLcZ7KrtMzM=; b=Juawj0lbUmZoj739+eLpbutk6w5/oZQH9YFkoROlGhzkf8l11gLsnhU/AfN/CxCH/U 3SrSmxVreBB1qobD8qv4OLaB+ERNcRbxcW03et7dRSH+43SCqr3qaKyDf8PJfU74v5XU HKKkbm6tKU2xv3XDmUqEHbkvhugZXihdLCDIWfhMjmpu5LNOiyvemMESZESwO1RC3sDz Jn49hfXzN+lxz/d2B2t4QamDl/XpIxIJdrklipZbfgScSPdD7gqbGjia1A4PzFdGZkIm lUxvvy7IOJPqF1GwYbjxcCLxxJRCYg67ZUa6fk/Fv8AMOG/k94+aWpTuPNQEJvAIWcb5 oVIQ== X-Gm-Message-State: APuU4Z+R8EXUV3Cq9sslDURxzTPNOC1x0d5prtCumOxUo4Yy2q3JxzQh /UqMjbSPifWvChDuNDHk9jSFB1M3b+ojtZSLLoGz4SC4ZmVI49FnzCuXVkJlwkMP0x8qmZ/3Wd0 geyybwRw= X-Gm-Gg: AYBFou1+TV/xqQ6+j7596uxrTfO0Y2BQvdcbZa9tGe1BqqmTNWap7FWPH763hyoVglz iR7xERNu/2oo6VzkmE1sFAXlo+J5ldRcIsTqBnfoxYHbRFsDSxZIJCURpsZNIFtM3mf1hvO9AAM IlrvURzYdCGmzRgMj7+V9yxhkoLBKhdoEOKUEgu4bUNEE4TN6IbgpZe5L20rm04Amamb/j1JQP9 3TW3kunghZrYfrtjGfeeUczC5Ymj7f5jCg8zZfIdx/m8AJ3nmtdcYoJuzK7AZPNq3BTCOnNd4MG /HgezMGwSY1NpdxXn6KyYvsK+aIBnL17drc+3l0EBCDX/eM/D3l0s4Inae4qbf1w/UtOyIo77aQ omk7PJklodqi8WGQG09SmdDj55z5rbNcGWSdBp2qI3+W/2sOLXcDaAryCtPbLWD0r82gB96vxfB CLjTaPlJLm+Mr09V5Yp+7xPypm4yUK934JZwNQgmGcOVjutqAzlPC9QyPq/q60tVFfESKpChrsp b0uZO3jght51XTnJgTLrFSuuBoOCAsQhffM6ZxDZr1vNV6wD1TdLHHknrY312pQzKUp6PzxY2Lf DSe+nYRxI9ekC6QLiTtHZwPOK6fWwVVFjd9aM0W0AH3y3Z8b+dZbGEKAaWYD588U/UgScnESzKP AUYF+NcHbyWTwQG52ufoO+v4STemz086MSuyfOZ7nhI8OMFbQqZf2SVA= X-Received: by 2002:a05:600c:a54:b0:4bb:6375:aa41 with SMTP id 5b1f17b1804b1-4bb7da48344mr118595985e9.27.1795101865889; Thu, 19 Nov 2026 07:24:25 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:25 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 10/19] curl: fix CVE-2026-92389 Date: Thu, 19 Nov 2026 16:22:36 +0100 Message-ID: <95df3a2155305579bf7bf38cc433e11708466ffb.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250693 From: Adarsh Jagadish Kamini Backport patch to fix CVE-2026-92389. References: https://nvd.nist.gov/vuln/detail/CVE-2026-92389 Upstream fix: https://github.com/curl/curl/commit/63dd390fab905a239a97e270 Tested with ptest: Before: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 After: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 Signed-off-by: Adarsh Jagadish Kamini [bajau: fixed recipe files list] Signed-off-by: Bastien Jauny --- .../curl/curl/CVE-2026-92389.patch | 60 +++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 61 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-92389.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-92389.patch b/meta/recipes-support/curl/curl/CVE-2026-92389.patch new file mode 100644 index 0000000000..387cca9ee1 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-92389.patch @@ -0,0 +1,60 @@ +From a1705881527f7ee59606a61c4ba52e0737655571 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Wed, 16 Sep 2026 23:46:44 +0200 +Subject: [PATCH] tftp: verify direction in a few places + +Closes #22974 + +Conflicts Resolved: + +Adaptation notes: +- Upstream moved tftp_tx() above tftp_connect_for_tx(); kept 8.7.1 layout and added the upload check in tftp_tx(). + +Assisted-by: kiro:claude-opus-5.5 + +CVE: CVE-2026-92389 +Upstream-Status: Backport [https://github.com/curl/curl/commit/63dd390fab905a239a97e270] + +Signed-off-by: Adarsh Jagadish Kamini +--- + lib/tftp.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/lib/tftp.c b/lib/tftp.c +index ff2b7b7457..371902c0d8 100644 +--- a/lib/tftp.c ++++ b/lib/tftp.c +@@ -545,10 +545,14 @@ static CURLcode tftp_send_first(struct tftp_state_data *state, + break; + + case TFTP_EVENT_ACK: /* Connected for transmit */ ++ if(!data->state.upload) ++ return CURLE_TFTP_ILLEGAL; + result = tftp_connect_for_tx(state, event); + break; + + case TFTP_EVENT_DATA: /* Connected for receive */ ++ if(data->state.upload) ++ return CURLE_TFTP_ILLEGAL; + result = tftp_connect_for_rx(state, event); + break; + +@@ -709,6 +713,9 @@ static CURLcode tftp_tx(struct tftp_state_data *state, tftp_event_t event) + char *bufptr; + bool eos; + ++ if(!data->state.upload) ++ return CURLE_TFTP_ILLEGAL; ++ + switch(event) { + + case TFTP_EVENT_ACK: +@@ -1131,6 +1138,8 @@ static CURLcode tftp_receive_packet(struct Curl_easy *data) + + switch(state->event) { + case TFTP_EVENT_DATA: ++ if(data->state.upload) ++ return CURLE_TFTP_ILLEGAL; + /* Don't pass to the client empty or retransmitted packets */ + if(state->rbytes > 4 && + (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) { diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index ab33d4aa77..e08ca2f930 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -43,6 +43,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-13608.patch \ file://CVE-2026-8286.patch \ file://CVE-2026-80230.patch \ + file://CVE-2026-92389.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Thu Nov 19 15:22:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104904 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.86.1795101868364048402 for ; Thu, 19 Nov 2026 07:24:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=S6Mu6jMx; spf=pass (domain: smile.fr, ip: 209.85.128.50, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4bb69f5b161so15165955e9.0 for ; Thu, 19 Nov 2026 07:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101867; x=1795706667; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=QPuJz6j5M5GbLbR59aho6u9zslJOiRl2gqJMLOJugiY=; b=S6Mu6jMx3rd0lsqqZ0dw1WZahqStlH6Zsgu54xItEl5DcT/0Ue1VFRQJPo+pe23sqL 744K9Oz0sZpzECU55ilyJYCIEoFXt/p5r8oOJ/jyM1dhpE2p3Cfc9a/PRmKI3g0beKJy xEjDkX+ptmLqnXvoMB/+sVbKkxH0Kgyj8/Ictd0V5siOcTGVhD72YDLwqwWP2x9KpfXl 2opxJrQ+JbpuNTGZPzhDxmqW2jsEWaMaOfk8mSGgvaCWL91pynpXDTRgd6hIYUZhyuPl fhFzZbm2Z9fg8fmFGO2N6GX6TJ6gKitvVHkzebSVhPd6DijY2jNGs/MkLxR4z2hG1tmi RKYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101867; x=1795706667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=QPuJz6j5M5GbLbR59aho6u9zslJOiRl2gqJMLOJugiY=; b=AYR/9pSi9NHVL2ysVPRIC1HMT8IrYEsctv18WbBqrUHH2+ama2TirsXl1k+rRgf4di XSSE1B/VjZLPTasO8eaLracSJMkOhxMfagIRggAhxbtE9cw51FodMk89iy362fcaOglw Pt8leZuylprvdjoB66q8Bv++OzXQOu61wv9vbKOz08VQYE+bANXvekGXWJQA5Rdsa0c8 YDu1x0+7MzLmOE6tqOvP3MFDiUrjvr9h01NDRI5ZfdCFr+D+Zq+1c5c8hfALSeOmHTJX NfTcEqyOOWB1UIGTsaqsXRRVLy0nztq7nhW7ZUh0rRlVZFmgi/bMPfBG92V+YQPiGvc6 IEkg== X-Gm-Message-State: APuU4Z90Mwxb6R5FtscTLkKmLLSTyeOEDM0BEuuMWfouppamVzSL5Yhn 81gTriBTopKjl0dKnpsBgekLzHp6teRf2GkUYN+YoST1BE8xzw2v3Ku5P3uys/fUri+LQEysOX2 47+EFilc= X-Gm-Gg: AYBFou1dfE9SC/pd3AsSZ9HKa+aEClpQeFcMrAqeKkXDGBQzhoFwcEdLYDfMoL7eQf6 4iVywKb1w1SVqPIKXUZcxelt445Fn2t9gfddMi3fJeCoX0VUgiOfuhgQO4NPL/RYwpOOo64NoiB ET/soks9sZGF+KTr3odWogvRmRbbozJJLIREAnq7CznBsPiRwY/J7E1+uZHDWCzVnAk+O2eKc+C KsqPF9qCpY/5NIsC9eu1PBFGM2tx4QFqzwwRB4kAM1yNmKTjSRFPRLdXjzw15I2SsOx3FL7+fJ2 vVAOOCnOoW32wmSDOUyKLa01S8ksBqvCBc3XuFbER8wSn0KFxCnjqIT7nLlQDst5+Ze/OwpJ7W7 dziDNpTeSOISMXWZT9EzJBSn/BvCQGLpZMrdgBabkuI+0l4WYRqh3cHm3bF6F3ZN0m2ycq4UyTn mSnrrKm5AGeZ43nubMMFh9gZrpLuTDOCriciQRtecLLe6CE22TH6TGHBQMLioB7VMLfTKXShxeb t+jd9RifxIf+4ZIBxqFF6BxwW7TPujS3KLCdhui5WAb9Gi83i53TOwoWem6mYVg5u/gjyBPvLPO jSDNeFmphZPJ6vZMGlzuc7jgyFmKJB4uU52TIavmyPdNX1qEM7EsNJfQFu8W2ZxFyxcrUcdus5k S8HOx5DcYGt5qdSWgCv1QnzRP9Jbd0Q5i/YMi3p/s3GACC4jwk2WAGBI= X-Received: by 2002:a05:600c:6092:b0:4bb:5f95:c014 with SMTP id 5b1f17b1804b1-4bb7da1efc6mr116648025e9.19.1795101866452; Thu, 19 Nov 2026 07:24:26 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:26 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 11/19] curl: set CVE_STATUS for CVE-2026-19931 Date: Thu, 19 Nov 2026 16:22:37 +0100 Message-ID: <03b991a8cf6fbbdf58b29675c71cfa4d3d291ae8.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250694 From: Darsh Kelaiya Analysis: - The advisory [1] names [2] as its fixed-in commit. It moves connection maintenance to admin handles, preserving the identity used by authentication reuse checks. - Earlier, [4] added Negotiate/NTLM connection reuse checks, including an SSPI ambient-user check using recent_conn_id. Later, [5] removed that SSPI check; the other checks remain. - Curl 8.7.1 predates [4]. Applying [2] alone would not reproduce the later upstream behavior; a source fix needs backport analysis. - The advisory describes Negotiate reuse with empty credentials and lists curl 8.7.1 within the affected range [1]. - On Linux, this requires krb5 and negotiate-auth. Scarthgap enables negotiate-auth but leaves krb5 disabled by default. - Follow the merged GSS-API configuration check in [3]. Set not-applicable-config if either option is absent; otherwise keep unpatched while the source backport is deferred. - Record the CVE as not-applicable-config unless both required PACKAGECONFIG options are enabled; otherwise retain unpatched status. The CVE_STATUS decision is conditional, not hardcoded. Reference: [1] https://curl.se/docs/CVE-2026-19931.html [2] https://github.com/curl/curl/commit/7103a93b05bc69ea98ed9d05d02fa9eeba533f2f [3] https://github.com/openembedded/openembedded-core/commit/93c410c455b92a2b1fe3b77347e57d02f344056b [4] https://github.com/curl/curl/commit/1a17959fc7a80864c9c9b37097856bdb4a465cf8 [5] https://github.com/curl/curl/commit/1c58877705b172da892cb9c18c5edb572f2d1d73 Signed-off-by: Darsh Kelaiya Signed-off-by: Bastien Jauny --- meta/recipes-support/curl/curl_8.7.1.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index e08ca2f930..4be96a6f7f 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -65,6 +65,7 @@ CVE_STATUS[CVE-2026-8458] = "${@bb.utils.contains('PACKAGECONFIG', 'krb5 negotia CVE_STATUS[CVE-2026-9547] = "not-applicable-config: vulnerable libssh backend is not enabled by the recipe" CVE_STATUS[CVE-2026-82209] = "not-applicable-config: public suffix list support is disabled by the recipe with --without-libpsl" CVE_STATUS[CVE-2026-12064] = "${@bb.utils.contains('PACKAGECONFIG', 'libssh2', 'unpatched', 'not-applicable-config: SCP/SFTP support is not enabled in PACKAGECONFIG', d)}" +CVE_STATUS[CVE-2026-19931] = "${@bb.utils.contains('PACKAGECONFIG', 'krb5 negotiate-auth', 'unpatched', 'not-applicable-config: GSS-API Negotiate is disabled', d)}" inherit autotools pkgconfig binconfig multilib_header ptest From patchwork Thu Nov 19 15:22:38 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104905 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.100.1795101868904027052 for ; Thu, 19 Nov 2026 07:24:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=U2VVeaox; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4b79502c27aso24267405e9.1 for ; Thu, 19 Nov 2026 07:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101867; x=1795706667; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=/bb6krPYmLingPUl09JNXUGAhBNj6D+YFIPi7dCoEuY=; b=U2VVeaoxc3LKSgfzk8gzDCitQHnr37e2bXe0jEicQxiIuOob+Ja8QWCz1rQGP4wA+V TAnBQbMVSiT8L4XvdEHNh5t9TKp+G+90TboQC9AMypbz6R5dOhoqpsasBeonYcBNqmFW CHXzYZ5PPrT3J2xhdgfqA6otmkVgG2Nr0uwOO2mRRIeSJXspieBAznmnpoMejLyDHUL2 6PQ7DRMnkVmTiiaedGHUGON8wzLK0jV7f7/32/kHerIssKbmPf0dtWYBPDkR9x7UqI5T WF5be/5ul/5ZBIMn0emC25y7P4Y5hQC70Q1kt0bPdw+CyGXtJUVViddYGk/0DVRWbYu/ lIvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101867; x=1795706667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=/bb6krPYmLingPUl09JNXUGAhBNj6D+YFIPi7dCoEuY=; b=zAYO0xbX1XKzB6PhKvBIZTEJuynHCamFN0JzoIPxvXNN5iJGSysVPybs4nQ/cwtgDE yU/Ni42T852jS7ir25/y9hri1Bg53meQPtauKvlLWvqnnK55sc1O9CihUkMoBWZnH0vJ 6iSLI8F+i68BX1/atwEvnHnLHTY48N/2BT9Vou+Mb00r4VbgR/Co0Yuynd88mz3Gm366 NvbjJ00vtVh9Wl2MQeiQ8PlGXQhHLOLLpaNQoCaA5AD24jWfpYkGMGAWM3ONNEUMEnVK ZnP1czmec8VNNuBvwYhJcdwr2WhnFQpWnOMZHjVlSOONJc6Ju8/AleD9ZMV9+H/fqVVS L9PQ== X-Gm-Message-State: APuU4Z/dxJ39AVpO4CBkIfYgf9rxu3iXm7Xw1VuzqqeaSjMn67m0D/7s 0MVeRCI1sprW7+7xXwRAeprI7J6pUWLYlOK/kuN8dbbDK3xXnX7CwsE3MVhdu3RXJSsNh6i6Egx 9I17NY2A= X-Gm-Gg: AYBFou0sy9VFi8t6xqu0LmHSCyg46ZsRGJME9EiUo+FjNPEjZjjQ2Rj1pwObq3qRPAN hDKgZElxn/s7LodjYPAI7Pz/YTz8A7zKRt/3FkRoLJ1WSYm86yj/E88XNtcb3FlRPdUJt4Ig0dQ lVr6+3XVX/sD71dMqQekuiPYdqiu1dLNrpLOCIW1x2FMcwIuY1Vpd+DpzC70H3O8avB/wwTzJmr idreP9XB/jhfFaT0IngjqcsAAKQXvek6Wu00KaU2WXAFfMT5ctaBDRYBG5GG96vJUU41xQr9kk+ M7XQYUl9zA41veqBsNpJt8Pqf8tBU8J8lmHkKDhkWsI2ZYCSz0VR/cLWtAnIXZSkUaMQNvEANsu NrHqSCyj+FIzZolPMK35HtG/QcOaD2KIXCbIcMB31SzqsC/abo/GaSQJCKLMs+pWBPBp+yVZm9/ r5ATKOuGMfyclo+upN3/tM9ulRW/P9Mctejoupio0l4qKte0Dd2XOB4/gGr5CMeulra8ZvCzjnd bALdX3VvAOXR9CU4REUdGvQIYpuYhSc4fZm68hgpKFRP4I18/5Lqk1BvZOTH16vLJq3wJXSWVn1 W5O2YsclxgmpGrkHFnFZEBDtb0AH4rbi79+DETCqgLE2pZJ8pSZ7KgezaoMIqWYlbYu/N8TivaD r3uU49C+mxm7sRLZsLSwBmRHtlcJF6m6otjd6kdiOb5L4BZzZ8mAf7z1yJKVbZdFrEyTffnVWfD 3Y7A== X-Received: by 2002:a05:600c:4e0d:b0:4a2:47:b79c with SMTP id 5b1f17b1804b1-4bb7da48c41mr127479735e9.32.1795101867072; Thu, 19 Nov 2026 07:24:27 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:26 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 12/19] curl: fix CVE-2026-18924 Date: Thu, 19 Nov 2026 16:22:38 +0100 Message-ID: <1713ce755fd5ce54bd2fa02275b08c34c65dcd69.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250695 From: Darsh Kelaiya This patch applies the upstream fix as referenced in [2], using the commit shown in [1]. Make accepted HTTP/2 push handles inherit their parent's share object. Use the curl 8.7.1 share setter to retain its locking, reference counting and shared-cache handling during cleanup. Retain curl_easy_duphandle() instead of the later creation change in [3]. In 8.7.1, duplication leaves the share and connection-cache pointers NULL. The share setter increments its use count before the push callback and multi addition; cleanup releases it. Share cleanup is blocked while this reference remains. Keep the documented inheritance of parent options. [1] https://github.com/curl/curl/commit/90325ff0444cbdff368bda5d26d6405a0bb6ee43 [2] https://curl.se/docs/CVE-2026-18924.html [3] https://github.com/curl/curl/commit/fad90b666df98c93ee165341b0c8101c7b10ad7b Signed-off-by: Darsh Kelaiya Signed-off-by: Bastien Jauny --- .../curl/curl/CVE-2026-18924.patch | 56 +++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 57 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-18924.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-18924.patch b/meta/recipes-support/curl/curl/CVE-2026-18924.patch new file mode 100644 index 0000000000..cf8a3a6290 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-18924.patch @@ -0,0 +1,56 @@ +From 90325ff0444cbdff368bda5d26d6405a0bb6ee43 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Wed, 5 Aug 2026 10:02:53 +0200 +Subject: [PATCH] http2: make server push transfers inherit share from + parent + +Reported-by: Stephan Zeisberg +Closes #22488 + +CVE: CVE-2026-18924 +Upstream-Status: Backport [https://github.com/curl/curl/commit/90325ff0444cbdff368bda5d26d6405a0bb6ee43] + +Backport Changes: +- Use share.h because curl 8.7.1 does not have curl_share.h. +- Use curl_easy_setopt(second, CURLOPT_SHARE, data->share) + instead of Curl_share_easy_link(), which is absent from curl 8.7.1. + The setter locks the share, updates its dirty counter and links + shared caches. +- Retain curl_easy_duphandle() instead of the later curl_easy_init() + change in [1], preserving curl 8.7.1's documented push-option + inheritance. In 8.7.1, duplication leaves share and state.conn_cache + NULL. The share setter increments share->dirty before the push + callback and Curl_multi_add_perform(). Curl_close() drops the use + count on rejection or cleanup; curl_share_cleanup() refuses to free + a share still in use. The share lifetime fix therefore does not + require the later handle-creation change. + +[1] https://github.com/curl/curl/commit/fad90b666df98c93ee165341b0c8101c7b10ad7b + +(cherry picked from commit 90325ff0444cbdff368bda5d26d6405a0bb6ee43) +Signed-off-by: Darsh Kelaiya +--- + lib/http2.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/lib/http2.c b/lib/http2.c +index 99d7f3b0e2..694900fd8c 100644 +--- a/lib/http2.c ++++ b/lib/http2.c +@@ -47,6 +47,7 @@ + #include "transfer.h" + #include "dynbuf.h" + #include "headers.h" ++#include "share.h" + /* The last 3 #include files should be in this order */ + #include "curl_printf.h" + #include "curl_memory.h" +@@ -776,6 +777,8 @@ static struct Curl_easy *h2_duphandle(struct Curl_cfilter *cf, + second->req.p.http = http; + http2_data_setup(cf, second, &second_stream); + second->state.priority.weight = data->state.priority.weight; ++ if(data->share) ++ (void)curl_easy_setopt(second, CURLOPT_SHARE, data->share); + } + } + return second; diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index 4be96a6f7f..ab784b4d73 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -44,6 +44,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-8286.patch \ file://CVE-2026-80230.patch \ file://CVE-2026-92389.patch \ + file://CVE-2026-18924.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Thu Nov 19 15:22:39 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104906 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.101.1795101870481421266 for ; Thu, 19 Nov 2026 07:24:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=BHcDJ+5F; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4a3517554f7so26105625e9.2 for ; Thu, 19 Nov 2026 07:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101869; x=1795706669; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=XmgzPb0x/41ZzIeyDm3r3dNiF1fbaoRypFKsTRINjHc=; b=BHcDJ+5Fv2CwLUWBD7TAKeaEJyAv/F9IhH7XXSQKk5BbezrVRJJni/shQSLkeG6/fK c2BxMkuOITXbnBiwbEBTch54E6W58eyljopsTZ1dbbGvS9zUYMwO2SWBqAOhJMyXMuJn /G9oW11T7V8sea1cRROqK5v2+6ujNxZT4lJ6YsR1gkgFyQqzYRkGGJsyLFPB8AUG7yit QrJxsPNN7XhFPFYvzxaTUHqiB6vBoqRQw3SqPZSD5nMfqZbpTsmxCKX02izNjmCqA3F/ 6S86VQMcyKxLIB/mvRLASae6H/YMCDa4XtxxnRzKEguRgftpdMafzXzToHYaxp/E7az4 ANsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101869; x=1795706669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=XmgzPb0x/41ZzIeyDm3r3dNiF1fbaoRypFKsTRINjHc=; b=nrkkVltwopsa8WVGGdUGbRo1drQGgPJn7XYZhefA8S12NrpVdIvfCu6XA1BnA7FOoh gsQRnT5nfV5vua1qBYmdrJXp1koStuv40J46v8wODebMMqjzGyP5gquE7LlAocsAxOxg gLZl7ZhhOdR/d0t0a0iteWdHU3MYa+WfMovJyFrmMt3xau1QwpyxjZ6kro/DE7EgGhup f7CLEB03VBs8OoO+3/WEd0ItnW1jGEeBuq7pE0RiG9eyd8znXpqHhfA5gnPrHrN+rt9G 1veRjZPJzCAS58QU4G0WN0ZWN1MeoNO7lSZy3v0xqHA9gIEAJHyr4wTVmREOEvM4gt41 Sl9Q== X-Gm-Message-State: APuU4Z8uOJ9E9/w5rCLy8IAlme44biZ6mYWLAcGQfqpwc1rTs4QiScOi kmH3/ZlofcDihZizAa/YaowJwpIQXtoOBEAc6pTygtxZeZLCK+M+AxlJIfqePR70tofBzRs7/zB 2v7tc5aw= X-Gm-Gg: AYBFou17B2dxABKcsDSxRIPhtQT1PY1EosXRNsGVthdy7mgAAW9JuPQxzj4n3q4Ukf7 5X2JHSOEvq64vYzRsUvo+/MckZ/ipR/dOs+hm7RDyijJfjQiGIk8/hZtY0T6WbaqNQdn3Cfybze JUKy8OwBRDwOGfr7U4jCek2pBbpDzxyQ7row8Z93UVTJVNkK5w/Wy7iBT3tIekczv4XRnERcnf6 V8jd3+A9JdhHy3HAPdpID8hJ/5uN5BypotGO9cyKDGKVibuN6g9HU3Ai1RpSzzCOVAh/pe12wX9 dzuDaEbKK7Wo+wXK6bH9I5Awq0Fq2qmthmeoVbzTjdUqx3uygOUIQnF79vvM/kmIbrW9DvKWw3P 64TFplufNDElfUXrFD9F2DbgN4gTTZlZZIMIULZ5Cq0ec2RzJsqm5s3kTubpnMWkHipJGEh9WXx 4zygFRBgVLAQMNupSIv08DA3l5VzPTyFs8pFudn7Q5TmJVfTRoNeh/c1J6hGqKCHzU2oeJijHli IeiBCdqhQHhrLrqPv13wvaWykKBT65SH7nOx63xD6zAldHsXKLmR5Oz9XYydSg3j8Ts/uf5OSd9 psa2c2gmdTh/yvEGYLtJ+xINGmCNS7A2kEoVKdqXJSRFSNKYoPiNQa2u3xRhVf4Kpi2L+l7m/Yu 1nrLXvEeu19c+fZSg2NmrJ1p2zfv0JnnnFrxgNpgeJX0akxqN+RkkhHY= X-Received: by 2002:a05:600c:1c0f:b0:4bb:60bd:5398 with SMTP id 5b1f17b1804b1-4bb7da229f4mr145763205e9.10.1795101868210; Thu, 19 Nov 2026 07:24:28 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:27 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 13/19] python3-urllib3: Fix CVE-2026-97687 Date: Thu, 19 Nov 2026 16:22:39 +0100 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:39 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250696 From: Yogita Urade This patch applies the upstream fix as referenced in [3], using the commit shown in [1] and [2]. [1] https://github.com/urllib3/urllib3/commit/b6447295fff7b38fdffc67e0df9712d60cef3cc3 [2] https://github.com/urllib3/urllib3/commit/07408cec79d1856d81bb42c74a904a24fdb9e465 [3] https://nvd.nist.gov/vuln/detail/CVE-2026-97687 Signed-off-by: Yogita Urade [bajau: fixed SRC_URI indentation in the recipe file] Signed-off-by: Bastien Jauny --- .../python3-urllib3/CVE-2026-97687_p1.patch | 285 +++++++++++ .../python3-urllib3/CVE-2026-97687_p2.patch | 482 ++++++++++++++++++ .../python/python3-urllib3_2.2.2.bb | 2 + 3 files changed, 769 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p1.patch create mode 100644 meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p2.patch diff --git a/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p1.patch b/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p1.patch new file mode 100644 index 0000000000..241be4adaa --- /dev/null +++ b/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p1.patch @@ -0,0 +1,285 @@ +From b6447295fff7b38fdffc67e0df9712d60cef3cc3 Mon Sep 17 00:00:00 2001 +From: Dustin Hoeppner +Date: Fri, 12 Jun 2026 08:27:08 -0500 +Subject: [PATCH] Fix `proxy_ssl_context` ignored for HTTPS forwarding proxies + (#3786) + +Co-authored-by: Illia Volochii + +CVE: CVE-2026-97687 +Upstream-Status: Backport [https://github.com/urllib3/urllib3/commit/b6447295fff7b38fdffc67e0df9712d60cef3cc3] + +Backport Changes: +- Shifted the upstream policy-selection block to the target method's + indentation so this intermediate patch applies and compiles. + +Signed-off-by: Yogita Urade +--- + changelog/2577.bugfix.rst | 2 + + src/urllib3/connection.py | 16 +- + src/urllib3/poolmanager.py | 15 ++ + .../test_proxy_poolmanager.py | 149 ++++++++++++++++-- + 4 files changed, 165 insertions(+), 17 deletions(-) + create mode 100644 changelog/2577.bugfix.rst + +diff --git a/changelog/2577.bugfix.rst b/changelog/2577.bugfix.rst +new file mode 100644 +index 0000000..57d7f1f +--- /dev/null ++++ b/changelog/2577.bugfix.rst +@@ -0,0 +1,2 @@ ++Fixed usage of ``proxy_ssl_context`` with ``ProxyManager`` when ``use_forwarding_for_https=True``. ++Passing ``ssl_context`` instead of ``proxy_ssl_context`` for HTTPS proxies in this configuration now emits a ``FutureWarning`` and will raise an error in v3.0. +diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py +index 1b16279..b9760c6 100644 +--- a/src/urllib3/connection.py ++++ b/src/urllib3/connection.py +@@ -649,6 +649,20 @@ class HTTPSConnection(HTTPConnection): + # Remove trailing '.' from fqdn hostnames to allow certificate validation + server_hostname_rm_dot = server_hostname.rstrip(".") + ++ # Forwarding proxies should use proxy SSL context for ++ # wrapping since that's the connection being established, ++ # whereas tunneling proxies should use the connection's SSL ++ # context. ++ # However, for backwards compatibility reasons, if the proxy ++ # is forwarding but no proxy SSL context is provided, we ++ # fall back to using the connection's SSL context until ++ # urllib3 v3.0. Appropriate warning is emitted in ++ # ``ProxyManager.__init__``. ++ if self.proxy_is_forwarding and self.proxy_config is not None: ++ ssl_context = self.proxy_config.ssl_context ++ else: ++ ssl_context = self.ssl_context ++ + sock_and_verified = _ssl_wrap_socket_and_match_hostname( + sock=sock, + cert_reqs=self.cert_reqs, +@@ -662,7 +676,7 @@ class HTTPSConnection(HTTPConnection): + key_file=self.key_file, + key_password=self.key_password, + server_hostname=server_hostname_rm_dot, +- ssl_context=self.ssl_context, ++ ssl_context=ssl_context, + tls_in_tls=tls_in_tls, + assert_hostname=self.assert_hostname, + assert_fingerprint=self.assert_fingerprint, +diff --git a/src/urllib3/poolmanager.py b/src/urllib3/poolmanager.py +index 5763fea..290cfe1 100644 +--- a/src/urllib3/poolmanager.py ++++ b/src/urllib3/poolmanager.py +@@ -581,6 +581,21 @@ class ProxyManager(PoolManager): + if proxy.scheme not in ("http", "https"): + raise ProxySchemeUnknown(proxy.scheme) + ++ if ( ++ use_forwarding_for_https ++ and proxy.scheme == "https" ++ and connection_pool_kw.get("ssl_context") is not None ++ ): ++ warnings.warn( ++ "Passing ssl_context when use_forwarding_for_https=True is deprecated " ++ "and will raise an error in urllib3 v3.0. " ++ "Use proxy_ssl_context to configure the TLS connection to the proxy.", ++ FutureWarning, ++ stacklevel=2, ++ ) ++ if proxy_ssl_context is None: ++ proxy_ssl_context = connection_pool_kw.get("ssl_context") ++ + if not proxy.port: + port = port_by_scheme.get(proxy.scheme, 80) + proxy = proxy._replace(port=port) +diff --git a/test/with_dummyserver/test_proxy_poolmanager.py b/test/with_dummyserver/test_proxy_poolmanager.py +index a0b1172..f116b41 100644 +--- a/test/with_dummyserver/test_proxy_poolmanager.py ++++ b/test/with_dummyserver/test_proxy_poolmanager.py +@@ -10,6 +10,7 @@ import shutil + import socket + import ssl + import tempfile ++import typing + from test import LONG_TIMEOUT, SHORT_TIMEOUT, resolvesLocalhostFQDN, withPyOpenSSL + from test.conftest import ServerConfig + +@@ -24,7 +25,7 @@ from dummyserver.testcase import ( + ) + from urllib3 import HTTPResponse + from urllib3._collections import HTTPHeaderDict +-from urllib3.connection import VerifiedHTTPSConnection ++from urllib3.connection import HTTPSConnection, VerifiedHTTPSConnection + from urllib3.connectionpool import connection_from_url + from urllib3.exceptions import ( + ConnectTimeoutError, +@@ -165,6 +166,43 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + r = https.request("GET", f"{self.https_url}/") + assert r.status == 200 + ++ @requires_network() ++ @pytest.mark.parametrize( ++ "proxy_ssl_context_kw", ++ [ ++ ("ssl_context",), ++ ("proxy_ssl_context",), ++ ("ssl_context", "proxy_ssl_context"), ++ ], ++ ) ++ def test_https_proxy_forwarding_for_https_with_custom_context( ++ self, proxy_ssl_context_kw: tuple[str, ...] ++ ) -> None: ++ """ ++ Test that an HTTP request succeeds when using a forwarding HTTPS ++ proxy with an SSL context provided via either ++ ``proxy_ssl_context``, ``ssl_context`` (fallback), or both. ++ """ ++ ++ proxy_ctx = ssl.create_default_context() ++ proxy_ctx.load_verify_locations(DEFAULT_CA) ++ ++ warning_checker: contextlib.AbstractContextManager[typing.Any] ++ if "ssl_context" in proxy_ssl_context_kw: ++ warning_checker = pytest.warns(FutureWarning, match="ssl_context") ++ else: ++ warning_checker = contextlib.nullcontext() ++ with warning_checker: ++ proxy = proxy_from_url( ++ self.https_proxy_url, ++ **{kw: proxy_ctx for kw in proxy_ssl_context_kw}, ++ use_forwarding_for_https=True, ++ ) ++ ++ with proxy: ++ resp = proxy.request("GET", self.https_url) ++ assert resp.status == 200 ++ + def test_nagle_proxy(self) -> None: + """Test that proxy connections do not have TCP_NODELAY turned on""" + with ProxyManager(self.proxy_url) as http: +@@ -708,20 +746,8 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + # see https://github.com/python/cpython/issues/103472 + @pytest.mark.filterwarnings("default::ResourceWarning") + @requires_network() +- @pytest.mark.parametrize( +- ["proxy_scheme", "use_forwarding_for_https"], +- [ +- ("http", False), +- ("https", False), +- ("https", True), +- ], +- ) +- def test_proxy_https_target_tls_error( +- self, proxy_scheme: str, use_forwarding_for_https: str +- ) -> None: +- if proxy_scheme == "https" and use_forwarding_for_https: +- pytest.skip("Test is expected to fail due to urllib3/urllib3#2577") +- ++ @pytest.mark.parametrize("proxy_scheme", ["http", "https"]) ++ def test_proxy_https_target_tls_error(self, proxy_scheme: str) -> None: + proxy_url = self.https_proxy_url if proxy_scheme == "https" else self.proxy_url + proxy_ctx = ssl.create_default_context() + proxy_ctx.load_verify_locations(DEFAULT_CA) +@@ -731,12 +757,103 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + proxy_url, + proxy_ssl_context=proxy_ctx, + ssl_context=ctx, +- use_forwarding_for_https=use_forwarding_for_https, + ) as proxy: + with pytest.raises(MaxRetryError) as e: + proxy.request("GET", self.https_url) + assert isinstance(e.value.reason, SSLError) + ++ @requires_network() ++ def test_forwarding_proxy_tls_error_with_fallback(self) -> None: ++ """ ++ Test that when only ``ssl_context`` is passed to a forwarding ++ HTTPS proxy, a ``FutureWarning`` is emitted and if the TLS ++ handshake with the proxy fails using that context, the error is ++ a ``ProxyError`` wrapping the original TLS error. ++ """ ++ ctx = ssl.create_default_context() ++ ++ with pytest.warns(FutureWarning, match="ssl_context"): ++ proxy = proxy_from_url( ++ self.https_proxy_url, ++ ssl_context=ctx, ++ use_forwarding_for_https=True, ++ ) ++ ++ with proxy: ++ with pytest.raises(MaxRetryError) as e: ++ proxy.request("GET", self.https_url) ++ assert isinstance(e.value.reason, ProxyError) ++ assert isinstance(e.value.reason.original_error, SSLError) ++ ++ @requires_network() ++ def test_forwarding_proxy_ssl_context_precedence(self) -> None: ++ """ ++ Test that when both ``ssl_context`` and ``proxy_ssl_context`` ++ are passed to a forwarding HTTPS proxy, ``proxy_ssl_context`` is ++ used for the proxy connection and ``ssl_context`` is ignored ++ (with a warning). ++ """ ++ ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ proxy_ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ ++ with pytest.warns(FutureWarning, match="ssl_context"): ++ proxy = proxy_from_url( ++ self.https_proxy_url, ++ proxy_ssl_context=proxy_ssl_context, ++ ssl_context=ssl_context, ++ use_forwarding_for_https=True, ++ ) ++ ++ with proxy: ++ pool = proxy.connection_from_url(self.https_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is proxy_ssl_context ++ ++ @requires_network() ++ def test_forwarding_proxy_ssl_context_fallback(self) -> None: ++ """ ++ Test that when only ``ssl_context`` is passed to a forwarding ++ HTTPS proxy, a ``FutureWarning`` is emitted and ``ssl_context`` ++ is used as the proxy TLS context (fallback). ++ """ ++ ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ ++ with pytest.warns(FutureWarning, match="ssl_context"): ++ proxy = proxy_from_url( ++ self.https_proxy_url, ++ ssl_context=ssl_context, ++ use_forwarding_for_https=True, ++ ) ++ ++ with proxy: ++ pool = proxy.connection_from_url(self.https_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is ssl_context ++ ++ @requires_network() ++ def test_forwarding_non_https_proxy_ssl_context_fallback(self) -> None: ++ """ ++ Test that when only ``ssl_context`` is passed to a forwarding ++ non-HTTPS proxy, no warning or error is emitted. ++ """ ++ ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ # No warning/error should be emitted even when ``ssl_context`` ++ # is provided to a non-HTTPS proxy for some reason. ++ proxy = proxy_from_url( ++ self.proxy_url, ++ ssl_context=ssl_context, ++ use_forwarding_for_https=True, ++ ) ++ with proxy: ++ resp = proxy.request("GET", self.https_url) ++ assert resp.status == 200 ++ + # stdlib http.client.HTTPConnection._tunnel() causes a ResourceWarning + # see https://github.com/python/cpython/issues/103472 + @pytest.mark.filterwarnings("default::ResourceWarning") diff --git a/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p2.patch b/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p2.patch new file mode 100644 index 0000000000..5824a5664b --- /dev/null +++ b/meta/recipes-devtools/python/python3-urllib3/CVE-2026-97687_p2.patch @@ -0,0 +1,482 @@ +From 07408cec79d1856d81bb42c74a904a24fdb9e465 Mon Sep 17 00:00:00 2001 +From: Andrey Petrov +Date: Wed, 29 Jul 2026 18:20:36 -0400 +Subject: [PATCH] Isolate HTTPS proxy TLS settings from target TLS (#5093) + +CVE: CVE-2026-97687 +Upstream-Status: Backport [https://github.com/urllib3/urllib3/commit/07408cec79d1856d81bb42c74a904a24fdb9e465] + +Backport Changes: +- The upstream connection.py hunk conflicted because Scarthgap's + urllib3 2.2.2 lacks the newer HTTP/2 connection-probe structure. + Ported the proxy-only TLS policy through the existing + HTTPSConnection.connect() and _connect_tls_proxy() paths. +- Adapted proxy-context tests for Scarthgap's API: create_urllib3_context() + has no verify_flags keyword, so tests set verify_flags on the returned + SSLContext. Tests distinguish target CERT_REQUIRED and proxy CERT_NONE, + assert that the proxy context is unchanged, and check the fallback policy + with pool cert_reqs/ca_certs. + +Signed-off-by: Yogita Urade +--- + changelog/5093.bugfix.rst | 7 + + src/urllib3/connection.py | 102 +++++++----- + src/urllib3/poolmanager.py | 8 +- + .../test_proxy_poolmanager.py | 159 +++++++++++++++++- + 4 files changed, 222 insertions(+), 54 deletions(-) + create mode 100644 changelog/5093.bugfix.rst + +diff --git a/changelog/5093.bugfix.rst b/changelog/5093.bugfix.rst +new file mode 100644 +index 0000000..f64ad4a +--- /dev/null ++++ b/changelog/5093.bugfix.rst +@@ -0,0 +1,7 @@ ++Fixed ``HTTPSConnection.connect()`` overriding ++``ProxyConfig.ssl_context``'s certificate policy and proxy identity checks with ++the target connection's TLS settings when forwarding through an HTTPS proxy. ++ ++``HTTPSConnection`` no longer applies target SNI, assertions, or client ++credentials to forwarding proxy handshakes and continues to use its ++``ssl_context`` as a fallback when an HTTPS proxy forwards an HTTP target. +diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py +index b9760c6..e69bfb1 100644 +--- a/src/urllib3/connection.py ++++ b/src/urllib3/connection.py +@@ -649,39 +649,34 @@ class HTTPSConnection(HTTPConnection): + # Remove trailing '.' from fqdn hostnames to allow certificate validation + server_hostname_rm_dot = server_hostname.rstrip(".") + +- # Forwarding proxies should use proxy SSL context for +- # wrapping since that's the connection being established, +- # whereas tunneling proxies should use the connection's SSL +- # context. +- # However, for backwards compatibility reasons, if the proxy +- # is forwarding but no proxy SSL context is provided, we +- # fall back to using the connection's SSL context until +- # urllib3 v3.0. Appropriate warning is emitted in +- # ``ProxyManager.__init__``. ++ # Forwarding proxies should establish TLS using proxy-specific policy. ++ # For tunneling proxies, the target connection uses its own TLS policy. ++ wrapped_socket: ssl.SSLSocket | SSLTransport + if self.proxy_is_forwarding and self.proxy_config is not None: +- ssl_context = self.proxy_config.ssl_context ++ wrapped_socket = self._connect_tls_proxy(self.host, sock) ++ is_verified = self.proxy_is_verified is True + else: +- ssl_context = self.ssl_context +- +- sock_and_verified = _ssl_wrap_socket_and_match_hostname( +- sock=sock, +- cert_reqs=self.cert_reqs, +- ssl_version=self.ssl_version, +- ssl_minimum_version=self.ssl_minimum_version, +- ssl_maximum_version=self.ssl_maximum_version, +- ca_certs=self.ca_certs, +- ca_cert_dir=self.ca_cert_dir, +- ca_cert_data=self.ca_cert_data, +- cert_file=self.cert_file, +- key_file=self.key_file, +- key_password=self.key_password, +- server_hostname=server_hostname_rm_dot, +- ssl_context=ssl_context, +- tls_in_tls=tls_in_tls, +- assert_hostname=self.assert_hostname, +- assert_fingerprint=self.assert_fingerprint, +- ) +- self.sock = sock_and_verified.socket ++ sock_and_verified = _ssl_wrap_socket_and_match_hostname( ++ sock=sock, ++ cert_reqs=self.cert_reqs, ++ ssl_version=self.ssl_version, ++ ssl_minimum_version=self.ssl_minimum_version, ++ ssl_maximum_version=self.ssl_maximum_version, ++ ca_certs=self.ca_certs, ++ ca_cert_dir=self.ca_cert_dir, ++ ca_cert_data=self.ca_cert_data, ++ cert_file=self.cert_file, ++ key_file=self.key_file, ++ key_password=self.key_password, ++ server_hostname=server_hostname_rm_dot, ++ ssl_context=self.ssl_context, ++ tls_in_tls=tls_in_tls, ++ assert_hostname=self.assert_hostname, ++ assert_fingerprint=self.assert_fingerprint, ++ ) ++ wrapped_socket = sock_and_verified.socket ++ is_verified = sock_and_verified.is_verified ++ self.sock = wrapped_socket + + # Forwarding proxies can never have a verified target since + # the proxy is the one doing the verification. Should instead +@@ -690,7 +685,7 @@ class HTTPSConnection(HTTPConnection): + if self.proxy_is_forwarding: + self.is_verified = False + else: +- self.is_verified = sock_and_verified.is_verified ++ self.is_verified = is_verified + + # If there's a proxy to be connected to we are fully connected. + # This is set twice (once above and here) due to forwarding proxies +@@ -700,24 +695,47 @@ class HTTPSConnection(HTTPConnection): + # Set `self.proxy_is_verified` unless it's already set while + # establishing a tunnel. + if self._has_connected_to_proxy and self.proxy_is_verified is None: +- self.proxy_is_verified = sock_and_verified.is_verified ++ self.proxy_is_verified = is_verified + + def _connect_tls_proxy(self, hostname: str, sock: socket.socket) -> ssl.SSLSocket: + """ + Establish a TLS connection to the proxy using the provided SSL context. + """ +- # `_connect_tls_proxy` is called when self._tunnel_host is truthy. + proxy_config = typing.cast(ProxyConfig, self.proxy_config) +- ssl_context = proxy_config.ssl_context ++ proxy_ssl_context = proxy_config.ssl_context ++ ++ ssl_context: ssl.SSLContext | None ++ cert_reqs: int | str | None ++ if proxy_ssl_context is not None: ++ # Prefer the proxy's cert policy for the proxy connection ++ ssl_context = proxy_ssl_context ++ cert_reqs = proxy_ssl_context.verify_mode ++ ca_certs = None ++ ca_cert_dir = None ++ ca_cert_data = None ++ ssl_version = None ++ ssl_minimum_version = None ++ ssl_maximum_version = None ++ else: ++ # Otherwise we inherit the pool's cert policies ++ ssl_context = self.ssl_context if self.proxy_is_forwarding else None ++ cert_reqs = self.cert_reqs ++ ca_certs = self.ca_certs ++ ca_cert_dir = self.ca_cert_dir ++ ca_cert_data = self.ca_cert_data ++ ssl_version = self.ssl_version ++ ssl_minimum_version = self.ssl_minimum_version ++ ssl_maximum_version = self.ssl_maximum_version ++ + sock_and_verified = _ssl_wrap_socket_and_match_hostname( + sock, +- cert_reqs=self.cert_reqs, +- ssl_version=self.ssl_version, +- ssl_minimum_version=self.ssl_minimum_version, +- ssl_maximum_version=self.ssl_maximum_version, +- ca_certs=self.ca_certs, +- ca_cert_dir=self.ca_cert_dir, +- ca_cert_data=self.ca_cert_data, ++ cert_reqs=cert_reqs, ++ ssl_version=ssl_version, ++ ssl_minimum_version=ssl_minimum_version, ++ ssl_maximum_version=ssl_maximum_version, ++ ca_certs=ca_certs, ++ ca_cert_dir=ca_cert_dir, ++ ca_cert_data=ca_cert_data, + server_hostname=hostname, + ssl_context=ssl_context, + assert_hostname=proxy_config.assert_hostname, +diff --git a/src/urllib3/poolmanager.py b/src/urllib3/poolmanager.py +index 290cfe1..1cf0167 100644 +--- a/src/urllib3/poolmanager.py ++++ b/src/urllib3/poolmanager.py +@@ -581,6 +581,9 @@ class ProxyManager(PoolManager): + if proxy.scheme not in ("http", "https"): + raise ProxySchemeUnknown(proxy.scheme) + ++ # Keep the deprecated ssl_context fallback on the manager for ++ # compatibility, while passing only explicit proxy policy to connections. ++ self.proxy_ssl_context = proxy_ssl_context + if ( + use_forwarding_for_https + and proxy.scheme == "https" +@@ -593,8 +596,8 @@ class ProxyManager(PoolManager): + FutureWarning, + stacklevel=2, + ) +- if proxy_ssl_context is None: +- proxy_ssl_context = connection_pool_kw.get("ssl_context") ++ if self.proxy_ssl_context is None: ++ self.proxy_ssl_context = connection_pool_kw.get("ssl_context") + + if not proxy.port: + port = port_by_scheme.get(proxy.scheme, 80) +@@ -602,7 +605,6 @@ class ProxyManager(PoolManager): + + self.proxy = proxy + self.proxy_headers = proxy_headers or {} +- self.proxy_ssl_context = proxy_ssl_context + self.proxy_config = ProxyConfig( + proxy_ssl_context, + use_forwarding_for_https, +diff --git a/test/with_dummyserver/test_proxy_poolmanager.py b/test/with_dummyserver/test_proxy_poolmanager.py +index f116b41..6dbae5f 100644 +--- a/test/with_dummyserver/test_proxy_poolmanager.py ++++ b/test/with_dummyserver/test_proxy_poolmanager.py +@@ -113,6 +113,13 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + assert r.status == 200 + assert_is_verified(https, proxy=True, target=False) + ++ def test_is_verified_https_proxy_to_http_target_without_proxy_config(self) -> None: ++ with proxy_from_url(self.https_proxy_url, ca_certs=DEFAULT_CA) as https: ++ https.connection_pool_kw["_proxy_config"] = None ++ r = https.request("GET", f"{self.http_url}/") ++ assert r.status == 200 ++ assert_is_verified(https, proxy=True, target=False) ++ + def test_is_verified_https_proxy_to_https_target(self) -> None: + with proxy_from_url(self.https_proxy_url, ca_certs=DEFAULT_CA) as https: + r = https.request("GET", f"{self.https_url}/") +@@ -143,6 +150,18 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + r = https.request("GET", f"{self.http_url}/") + assert r.status == 200 + ++ @withPyOpenSSL ++ def test_https_proxy_with_proxy_ssl_context_pyopenssl(self) -> None: ++ proxy_ssl_context = create_urllib3_context() ++ proxy_ssl_context.load_verify_locations(DEFAULT_CA) ++ ++ with proxy_from_url( ++ self.https_proxy_url, ++ proxy_ssl_context=proxy_ssl_context, ++ ) as https: ++ response = https.request("GET", f"{self.http_url}/") ++ assert response.status == 200 ++ + @withPyOpenSSL + def test_https_proxy_pyopenssl_not_supported(self) -> None: + with proxy_from_url(self.https_proxy_url, ca_certs=DEFAULT_CA) as https: +@@ -793,8 +812,8 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + used for the proxy connection and ``ssl_context`` is ignored + (with a warning). + """ +- ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) +- proxy_ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ ssl_context = create_urllib3_context(cert_reqs=ssl.CERT_REQUIRED) ++ proxy_ssl_context = create_urllib3_context(cert_reqs=ssl.CERT_NONE) + + with pytest.warns(FutureWarning, match="ssl_context"): + proxy = proxy_from_url( +@@ -811,6 +830,7 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + conn.connect() + assert isinstance(conn.sock, ssl.SSLSocket) + assert conn.sock.context is proxy_ssl_context ++ assert proxy_ssl_context.verify_mode == ssl.CERT_NONE + + @requires_network() + def test_forwarding_proxy_ssl_context_fallback(self) -> None: +@@ -819,15 +839,21 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + HTTPS proxy, a ``FutureWarning`` is emitted and ``ssl_context`` + is used as the proxy TLS context (fallback). + """ +- ssl_context = ssl.create_default_context(cafile=DEFAULT_CA) ++ ssl_context = create_urllib3_context(cert_reqs=ssl.CERT_NONE) + + with pytest.warns(FutureWarning, match="ssl_context"): + proxy = proxy_from_url( + self.https_proxy_url, + ssl_context=ssl_context, ++ cert_reqs=ssl.CERT_REQUIRED, ++ ca_certs=DEFAULT_CA, + use_forwarding_for_https=True, + ) + ++ assert proxy.proxy_ssl_context is ssl_context ++ assert proxy.proxy_config is not None ++ assert proxy.proxy_config.ssl_context is None ++ + with proxy: + pool = proxy.connection_from_url(self.https_url) + with contextlib.closing(pool._new_conn()) as conn: +@@ -835,6 +861,23 @@ class TestHTTPProxyManager(HypercornDummyProxyTestCase): + conn.connect() + assert isinstance(conn.sock, ssl.SSLSocket) + assert conn.sock.context is ssl_context ++ assert ssl_context.verify_mode == ssl.CERT_REQUIRED ++ ++ @requires_network() ++ def test_https_proxy_to_http_target_ssl_context_fallback(self) -> None: ++ ssl_context = create_urllib3_context() ++ ssl_context.load_verify_locations(DEFAULT_CA) ++ ++ with proxy_from_url( ++ self.https_proxy_url, ++ ssl_context=ssl_context, ++ ) as proxy: ++ pool = proxy.connection_from_url(self.http_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is ssl_context + + @requires_network() + def test_forwarding_non_https_proxy_ssl_context_fallback(self) -> None: +@@ -946,10 +989,14 @@ class TestHTTPSProxyVerification: + proxy_url = f"https://{proxy.host}:{proxy.port}" + destination_url = f"https://{server.host}:{server.port}" + ++ proxy_ctx = urllib3.util.ssl_.create_urllib3_context() ++ proxy_ctx.verify_flags = 0 ++ proxy_ctx.load_verify_locations(proxy.ca_certs) + proxy_fingerprint = self._get_proxy_fingerprint_md5(proxy.ca_certs) + with proxy_from_url( + proxy_url, +- ca_certs=proxy.ca_certs, ++ ca_certs=server.ca_certs, ++ proxy_ssl_context=proxy_ctx, + proxy_assert_fingerprint=proxy_fingerprint, + ) as https: + https.request("GET", destination_url) +@@ -957,21 +1004,29 @@ class TestHTTPSProxyVerification: + # stdlib http.client.HTTPConnection._tunnel() causes a ResourceWarning + # see https://github.com/python/cpython/issues/103472 + @pytest.mark.filterwarnings("default::ResourceWarning") ++ @pytest.mark.parametrize("use_forwarding_for_https", [False, True]) + def test_https_proxy_assert_fingerprint_md5_non_matching( +- self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ++ self, ++ no_san_proxy_with_server: tuple[ServerConfig, ServerConfig], ++ use_forwarding_for_https: bool, + ) -> None: + proxy, server = no_san_proxy_with_server + proxy_url = f"https://{proxy.host}:{proxy.port}" + destination_url = f"https://{server.host}:{server.port}" + ++ proxy_ctx = urllib3.util.ssl_.create_urllib3_context() ++ proxy_ctx.verify_flags = 0 ++ proxy_ctx.load_verify_locations(proxy.ca_certs) + proxy_fingerprint = self._get_proxy_fingerprint_md5(proxy.ca_certs) + new_char = "b" if proxy_fingerprint[5] == "a" else "a" + proxy_fingerprint = proxy_fingerprint[:5] + new_char + proxy_fingerprint[6:] + + with proxy_from_url( + proxy_url, +- ca_certs=proxy.ca_certs, ++ ca_certs=server.ca_certs, ++ proxy_ssl_context=proxy_ctx, + proxy_assert_fingerprint=proxy_fingerprint, ++ use_forwarding_for_https=use_forwarding_for_https, + ) as https: + with pytest.raises(MaxRetryError) as e: + https.request("GET", destination_url) +@@ -995,8 +1050,11 @@ class TestHTTPSProxyVerification: + # stdlib http.client.HTTPConnection._tunnel() causes a ResourceWarning + # see https://github.com/python/cpython/issues/103472 + @pytest.mark.filterwarnings("default::ResourceWarning") ++ @pytest.mark.parametrize("use_forwarding_for_https", [False, True]) + def test_https_proxy_assert_hostname_non_matching( +- self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ++ self, ++ san_proxy_with_server: tuple[ServerConfig, ServerConfig], ++ use_forwarding_for_https: bool, + ) -> None: + proxy, server = san_proxy_with_server + destination_url = f"https://{server.host}:{server.port}" +@@ -1006,6 +1065,7 @@ class TestHTTPSProxyVerification: + proxy.base_url, + ca_certs=proxy.ca_certs, + proxy_assert_hostname=proxy_hostname, ++ use_forwarding_for_https=use_forwarding_for_https, + ) as https: + with pytest.raises(MaxRetryError) as e: + https.request("GET", destination_url) +@@ -1099,7 +1159,9 @@ class TestHTTPSProxyVerification: + proxy_url = f"https://{proxy.host}:{proxy.port}" + destination_url = f"https://{server.host}:{server.port}" + +- proxy_ctx = urllib3.util.ssl_.create_urllib3_context() ++ proxy_ctx = urllib3.util.ssl_.create_urllib3_context() ++ proxy_ctx.verify_flags = 0 ++ proxy_ctx.load_verify_locations(proxy.ca_certs) + try: + proxy_ctx.hostname_checks_common_name = True + # PyPy doesn't like us setting 'hostname_checks_common_name' +@@ -1110,6 +1172,86 @@ class TestHTTPSProxyVerification: + pytest.skip("Test requires 'SSLContext.hostname_checks_common_name=True'") + + with proxy_from_url( +- proxy_url, ca_certs=proxy.ca_certs, proxy_ssl_context=proxy_ctx ++ proxy_url, ca_certs=server.ca_certs, proxy_ssl_context=proxy_ctx + ) as https: + https.request("GET", destination_url) ++ ++ @pytest.mark.parametrize( ++ "target_tls_kwargs", ++ [ ++ pytest.param({"server_hostname": "example.com"}, id="server-hostname"), ++ pytest.param({"assert_hostname": "example.com"}, id="assert-hostname"), ++ pytest.param({"assert_fingerprint": "00" * 32}, id="assert-fingerprint"), ++ ], ++ ) ++ def test_https_proxy_forwarding_ignores_target_identity_settings( ++ self, ++ san_proxy_with_server: tuple[ServerConfig, ServerConfig], ++ target_tls_kwargs: dict[str, typing.Any], ++ ) -> None: ++ proxy, server = san_proxy_with_server ++ proxy_ctx = create_urllib3_context() ++ proxy_ctx.load_verify_locations(proxy.ca_certs) ++ ++ with proxy_from_url( ++ proxy.base_url, ++ proxy_ssl_context=proxy_ctx, ++ proxy_assert_hostname=proxy.host, ++ use_forwarding_for_https=True, ++ **target_tls_kwargs, ++ ) as https: ++ pool = https.connection_from_url(server.base_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is proxy_ctx ++ ++ def test_https_proxy_forwarding_ignores_target_client_certificate( ++ self, ++ san_proxy_with_server: tuple[ServerConfig, ServerConfig], ++ ) -> None: ++ proxy, server = san_proxy_with_server ++ proxy_ctx = create_urllib3_context() ++ proxy_ctx.load_verify_locations(proxy.ca_certs) ++ missing_cert = str(pathlib.Path(proxy.ca_certs).with_name("missing-cert.pem")) ++ ++ with proxy_from_url( ++ proxy.base_url, ++ proxy_ssl_context=proxy_ctx, ++ cert_file=missing_cert, ++ use_forwarding_for_https=True, ++ ) as https: ++ pool = https.connection_from_url(server.base_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is proxy_ctx ++ ++ def test_https_proxy_forwarding_ignores_target_tls_policy( ++ self, ++ san_proxy_with_server: tuple[ServerConfig, ServerConfig], ++ ) -> None: ++ proxy, server = san_proxy_with_server ++ proxy_ctx = create_urllib3_context(cert_reqs=ssl.CERT_REQUIRED) ++ proxy_ctx.load_verify_locations(proxy.ca_certs) ++ proxy_cert_store_stats = proxy_ctx.cert_store_stats() ++ ++ with proxy_from_url( ++ proxy.base_url, ++ proxy_ssl_context=proxy_ctx, ++ cert_reqs=ssl.CERT_NONE, ++ ca_certs=DEFAULT_CA, ++ use_forwarding_for_https=True, ++ ) as https: ++ for target_url in (server.base_url, "https://example.com/"): ++ pool = https.connection_from_url(target_url) ++ with contextlib.closing(pool._new_conn()) as conn: ++ conn = typing.cast(HTTPSConnection, conn) ++ conn.connect() ++ assert isinstance(conn.sock, ssl.SSLSocket) ++ assert conn.sock.context is proxy_ctx ++ ++ assert proxy_ctx.verify_mode == ssl.CERT_REQUIRED ++ assert proxy_ctx.cert_store_stats() == proxy_cert_store_stats diff --git a/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb b/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb index 7ca210429b..95667d3fd8 100644 --- a/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb +++ b/meta/recipes-devtools/python/python3-urllib3_2.2.2.bb @@ -13,6 +13,8 @@ SRC_URI += "file://CVE-2025-50181.patch \ file://CVE-2026-21441.patch \ file://CVE-2026-44431.patch \ file://CVE-2026-97689.patch \ + file://CVE-2026-97687_p1.patch \ + file://CVE-2026-97687_p2.patch \ " RDEPENDS:${PN} += "\ From patchwork Thu Nov 19 15:22:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104909 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.91.1795101872384658745 for ; Thu, 19 Nov 2026 07:24:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=EHeB7fAR; spf=pass (domain: smile.fr, ip: 209.85.128.53, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4b467581b98so28336225e9.0 for ; Thu, 19 Nov 2026 07:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101871; x=1795706671; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6JMvjPHhUnqr67BA13vscWh/NM6pVebQ3PB+WNL0+1Q=; b=EHeB7fAR1zjjbYk8TgSo9aymfTdsv2xBGcchJ1jdp3RXSebJuYKVGVAUzNgGJcg6lF DB+fNZSWRGWozynctdq5J9Wlzmfq/sohzT9mpIxgYQ3gv/yqhe7HRvCjbxXeyan9QGHH 2jSZ1UWnXCZ1ENVockGFN393tXQBGCI6ql712aO1kY0sToKDPx9UAYfPNdVjt9VOGbHU RwHeb9IE3Nigg4RBAxBKfy0auyjYMSRWvs4/XoJGBfZXAEHY5+slJf1Rwg8UfG35/T57 GeqAQjwbk7ODPc0nJa+CAChNx+ZTpJo80wmaTDdaBUNa6EIgzFIKjyI4XgdhO6MtSIhl N5Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101871; x=1795706671; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6JMvjPHhUnqr67BA13vscWh/NM6pVebQ3PB+WNL0+1Q=; b=pFxSyW1g8UUTqyVBA6s6SljGPxlNEPcxF0Mb0uNUapq4NNXJ3F/gMmWJ0IpfED7kjS exUhCW8Y0sXn6GXSnmwXNck7cd3WMA7lvHsggzKYm5Cxklf/U5W4R1+7bg+cqnwPB5oX DaS7h22StJNfquHXueCioKRbq9FkDv8yJVKFXGAVoZuYUQ1qSXQB2oLTcCj+N96Cv7p1 i2ijmBi+9m3VADm1x4O01VHgSfSRWFgPpPcGXDq4Sy+sKl6EIt50H6f1t7mkU9E9tjAD ldNCT4l77UgD0Xy4GY/b5f6xlE1IYoT808BLUVTm+UELg4AdhsiHh/8Qaf5X3gh1Vwzs EDgg== X-Gm-Message-State: APuU4Z/RK2x4NhlQj4MosSHWrM6WI1OhhlrepOs0x+WextjCukpl5L3d +qTHkbsza7S44mwrTwZ/k/FR/W00TofMQbg9Wh4UVkzFtZRxoB4KiApapqY9rxKlV1sKrK9yncA kIgKNnn0= X-Gm-Gg: AYBFou06/VzP56I7CLVZVnfK+Meh0VQxFGlTlCI4/mTC2oaIsFDYNYDCjyndfYZFDGp W7rKRYg0n0yDyZMQ46DOkcWWuW4mRJaKluY1YgTD9kZ8Gmk0P4otgi/adlrK8++uOrXrVuhVCKd Oc2qK84UWC/7UrU/Q6yBZYyBIJ4QIHm71TFxjYgiabnkaDmMEy0c8VFxpup+oWpESZV/MIBfPjm j1erGzPIs1ZFJJIaW01Mn8FRgNKpmvEve/FlMxJ274pu+G95G4VAgUVrxs3Doz/qK3tiGUXYzKv D7nRaNn2AzaKD6uCEndRwe66EaT3yHZkSqOxopA1E8KFdLtBgCoDywojtZXflF5HYtzgPVpOclT UlV2YEs/ow7TRUk7mcSx3yN4YUAVjBl62LPVpcxKfOpUHlpIs6awJdLtLkWFsappJbCrCT5zdbP err01U5LyErcEE8A8cFAW5Uy2NshiCo9inQgfGFLlyNG8A7zAeNQb6PPFiZTtPkkI/6N7Ljgg9v ua8dUST7ETbJgq/+7zgLR4RsYNgvBfSviLs84mp5J4Yj6FJ3QKkAuPNlGWlvkeo3wefgvOqhUqr /ljqEJUGIXPmZzhoswZkzng/m2g2skAju1BaH7JOUXX8xaKaAXjMezAivlrSkyPQ0RNfbtGmBHJ CHO8vJt4GK8UhRNISBzMGcQjD80ZpEjz1ZoNe+C/b0BxxPV9J9j6opvI= X-Received: by 2002:a05:600c:354b:b0:4ba:4395:56c9 with SMTP id 5b1f17b1804b1-4bb7da47681mr118843505e9.26.1795101869959; Thu, 19 Nov 2026 07:24:29 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:28 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 14/19] curl: fix CVE-2026-86409 Date: Thu, 19 Nov 2026 16:22:40 +0100 Message-ID: <39251fe6b94dc6fa18b44b6dd65eaab6391d740b.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250697 From: João Marcos Costa (Schneider Electric) This vulnerability, marked as High [1], was fixed upstream [2] since v8.22.0. Backport the fix to curl v8.7.1. The only changes not included in the backport are the ones related to test1978, which is not available in v8.7.1. [1] https://nvd.nist.gov/vuln/detail/cve-2026-86409 [2] https://curl.se/docs/CVE-2026-86409.html Signed-off-by: João Marcos Costa (Schneider Electric) [bajau: updated the SRC_URI patch list] Signed-off-by: Bastien Jauny --- .../curl/curl/CVE-2026-86409.patch | 36 +++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-86409.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-86409.patch b/meta/recipes-support/curl/curl/CVE-2026-86409.patch new file mode 100644 index 0000000000..55a4def13b --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-86409.patch @@ -0,0 +1,36 @@ +From 0d375942119d6a8fe6a4c6874a2f1f05d3312ad0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +Date: Thu, 5 Nov 2026 17:55:56 +0100 +Subject: [PATCH] setopt: make NULL CURLOPT_AWS_SIGV4 disable aws-sigv4 auth +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Disable `CURLAUTH_AWS_SIGV4` when `CURLOPT_AWS_SIGV4` is set to NULL. +Syncing behavior with `CURLAUTH_HTTPSIG`. + +Reported-by: Stanislav Fort + +Closes #22681 + +CVE: CVE-2026-86409 +Upstream-Status: Backport [https://github.com/curl/curl/commit/c3c70440e8d9938c0bb732595751e8aebc614f24] + +Signed-off-by: João Marcos Costa +--- + lib/setopt.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/setopt.c b/lib/setopt.c +index 8a5a5d7c33..bcf41807e7 100644 +--- a/lib/setopt.c ++++ b/lib/setopt.c +@@ -693,6 +693,8 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) + */ + if(data->set.str[STRING_AWS_SIGV4]) + data->set.httpauth = CURLAUTH_AWS_SIGV4; ++ else ++ data->set.httpauth &= ~(uint32_t)CURLAUTH_AWS_SIGV4; + break; + #endif + diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index ab784b4d73..eade4f8d31 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -45,6 +45,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-80230.patch \ file://CVE-2026-92389.patch \ file://CVE-2026-18924.patch \ + file://CVE-2026-86409.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Thu Nov 19 15:22:41 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104910 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.104.1795101872778492087 for ; Thu, 19 Nov 2026 07:24:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=O3zDZCB/; spf=pass (domain: smile.fr, ip: 209.85.128.42, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4bb702a7548so20093775e9.1 for ; Thu, 19 Nov 2026 07:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101871; x=1795706671; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=DCRWo5A6tW+p6PwO8El6qk+1ow0BbbsGOQ3BWM06FZ0=; b=O3zDZCB/FSLyxUAwnRV+dLzoSAxWc77Rx+vqAnSRc38NEo7hz8Nnefe+IRS8pOTbtz TD9e57c7+Z74HE4M+ELncQF/BaFgv176kHseEi+1T0N7tmqpjE5rHF68f3XyXIgAU2Zr PJp20TiRK+E42nJyLO4DvRN3JeTU01kBlGSIzkd49ACnWmBUOYYUWFbpv+TII9q7G1UB HyEoQHm/l+fl6BT+SfAwb36jMddtS4YL+/hQp6UlpnXifloqCVhJHbH9Cih8hsI6AdNC hLOdu0qxdUnjaCoewAuI/0ebDER6nGMRsu6c7sbteh6XIkwSgCJ6N0WLkHXnqZ62sQOc Qs3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101871; x=1795706671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=DCRWo5A6tW+p6PwO8El6qk+1ow0BbbsGOQ3BWM06FZ0=; b=yIWqyF8lwGcWQWmIVT8s7p7vkn7m+EhKXQn+C+W7o5nK1MuRJGvMaj4EWSW/azLdlQ ICvuhz+I8xMawWZRbqUl/xmHY80ftDzgLfDWSlldW+6x4De6xB7C/fXlONRvFpIgDGUR vKu8oVlrJmwNIzRKU6uDsgbs6aNzGI54LcEdcXJH3RDx/7204+dYYYEidf4AsLs6LKAK cZv806UGx6EL6RNfIgwmaGMdl6qbGUzYewYlUfz7EuvwazRWmP2tfsaPY0sioQFzxj5W nHno2bCkrJ4ZzABDsA5cO9QXWk3mJFea0N+qRqAc0QQykmhx5waCrxKUx+qUDxGXXfcN 8JdA== X-Gm-Message-State: APuU4Z8TETbTNSXkb6PVO8EGrOdBtrL24EGUaZSEqZwAwvHsSwV5z1uq vYX1zaiGpXbBrZm7MjkHLuGtfvIQVsCKHfKj8AENAkBSCb1Ha0BxBIAljIgcQfxXUKckrcwGyWV HUUVLz9M= X-Gm-Gg: AYBFou18hNyotOd/IYstigLIwIX/U3ylazgvr79rTJyMGi2Q9kRU0cAGP/5XznH3qJ8 NAKEHnR3eavucr/9yzh11wLNVGY1q9Rif31Qy/yw0YLeQyDrNTmnYirpVDdX4X3HY599FziCC7r Upjk4YIyziKDfqJtfluWdj4Ouab/CU+g6XSZktiFpY/XCx57VGE/wewaHpokJCKtuBmv9M61Nm2 ibSHhfOpw0Zopih5svBeulImYTh01k5eanb4NESjejwok4r0NSl7gJWJs6vZZaIazVTvsV6okqm AXCy67rDVplPvoVyT1GwMyLQ+PSO1a7U7m220ckoFwBOYGsAcHFewaWfJju5OmxSVjqN5r8LgSN 0naOcM6+8RlGU0sDTSR/ruebLF7qdwRxtbcdgVoJOoWCTA55RL8z9rZpd9OnUa9dWRlAwxplreo taWLksmO+KWUQxbtS7txNft2BzmC8FXDs4dLao95YjfnKqK7mtq5WMjQ/SOkzOR3VvS+WcJYemq Q8xy++ZOTJPUc4LWhD0jDUVA1kEySU1Lag1rD268vz+GHSnas/YmWPWM4UqZpR97hvGJDTmZEua 8KO3P6GcFZ6UtEfzswd3Bx/pbtVC7ASSE8Y9ghhJVse6lC4VeNQnloR6z2zxnnl7EJh5JsnVa2X 7SRCUBeeDCBeXEZnB74rYCNIuFqX2+D8ZMmjmItPE0LDaNATbXDLCZ8U= X-Received: by 2002:a05:600c:3ba9:b0:4b2:61e5:b2f4 with SMTP id 5b1f17b1804b1-4bb7da0c1ccmr142659265e9.11.1795101870840; Thu, 19 Nov 2026 07:24:30 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:30 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 15/19] curl: fix CVE-2026-92388 Date: Thu, 19 Nov 2026 16:22:41 +0100 Message-ID: <303aadf5b095db2c485f257fe78a44f48326b72f.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250698 From: Adarsh Jagadish Kamini Backport patch to fix CVE-2026-92388. References: https://nvd.nist.gov/vuln/detail/CVE-2026-92388 Upstream fix: https://github.com/curl/curl/commit/ba8f8a7f27a5c5e19e4ef212 https://github.com/curl/curl/commit/b85acacec9b38442741bb019bc9 Tested with ptest: Before: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 After: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 Signed-off-by: Adarsh Jagadish Kamini Signed-off-by: Fabien Thomas --- .../curl/curl/CVE-2026-92388-1.patch | 151 ++++++++++++++++++ .../curl/curl/CVE-2026-92388-2.patch | 30 ++++ meta/recipes-support/curl/curl_8.7.1.bb | 2 + 3 files changed, 183 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-92388-1.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2026-92388-2.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-92388-1.patch b/meta/recipes-support/curl/curl/CVE-2026-92388-1.patch new file mode 100644 index 0000000000..1e91ab68f2 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-92388-1.patch @@ -0,0 +1,151 @@ +From c6624e91bc9e8726b3cc45692ec0834650719a15 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Wed, 16 Sep 2026 15:17:37 +0200 +Subject: [PATCH] ftplistparser: no more overwriting set.write_func + +The entries in the 'set' struct should remain as set by the application. + +Closes #22969 + +Backport notes for curl 8.7.1: +- lib/cw-out.c: no CW_OUT_BODY_0LEN in 8.7.1; listmode handling applied + to CW_OUT_BODY only. Added #include "ftplistparser.h". +- lib/ftplistparser.c: context conflict only; added Curl_ftp_listmode(). +- lib/ftplistparser.h: added Curl_ftp_listmode()/Curl_ftp_parselist + stubs to the existing CURL_DISABLE_FTP #else branch. +- lib/ftp-int.h: does not exist in 8.7.1 (struct ftp_wc is in lib/ftp.h). + The now-unused ftp_wc.backup member is removed from lib/ftp.h instead. + +Assisted-by: kiro:claude-sonnet-5 + +CVE: CVE-2026-92388 +Upstream-Status: Backport [https://github.com/curl/curl/commit/ba8f8a7f27a5c5e19e4ef212] +Signed-off-by: Adarsh Jagadish Kamini +--- + lib/cw-out.c | 11 +++++++++-- + lib/ftp.c | 13 ------------- + lib/ftp.h | 5 ----- + lib/ftplistparser.c | 10 ++++++++++ + lib/ftplistparser.h | 5 +++++ + 5 files changed, 24 insertions(+), 20 deletions(-) + +diff --git a/lib/cw-out.c b/lib/cw-out.c +index c168837817..e1527f475e 100644 +--- a/lib/cw-out.c ++++ b/lib/cw-out.c +@@ -32,6 +32,7 @@ + #include "multiif.h" + #include "sendf.h" + #include "cw-out.h" ++#include "ftplistparser.h" + + /* The last 3 #include files should be in this order */ + #include "curl_printf.h" +@@ -166,8 +167,14 @@ static void cw_get_writefunc(struct Curl_easy *data, cw_out_type otype, + { + switch(otype) { + case CW_OUT_BODY: +- *pwcb = data->set.fwrite_func; +- *pwcb_data = data->set.out; ++ if(Curl_ftp_listmode(data)) { ++ *pwcb = Curl_ftp_parselist; ++ *pwcb_data = data; ++ } ++ else { ++ *pwcb = data->set.fwrite_func; ++ *pwcb_data = data->set.out; ++ } + *pmax_write = CURL_MAX_WRITE_SIZE; + /* if we ever want buffering of BODY output, we can set `min_write` + * the preferred size. The default should always be to pass data +diff --git a/lib/ftp.c b/lib/ftp.c +index 5bbdeb0540..3ab395cee8 100644 +--- a/lib/ftp.c ++++ b/lib/ftp.c +@@ -3949,15 +3949,6 @@ static CURLcode init_wc_data(struct Curl_easy *data) + goto fail; + } + +- /* backup old write_function */ +- ftpwc->backup.write_function = data->set.fwrite_func; +- /* parsing write function */ +- data->set.fwrite_func = Curl_ftp_parselist; +- /* backup old file descriptor */ +- ftpwc->backup.file_descriptor = data->set.out; +- /* let the writefunc callback know the transfer */ +- data->set.out = data; +- + infof(data, "Wildcard - Parsing started"); + return CURLE_OK; + +@@ -3992,10 +3983,6 @@ static CURLcode wc_statemach(struct Curl_easy *data) + /* In this state is LIST response successfully parsed, so lets restore + previous WRITEFUNCTION callback and WRITEDATA pointer */ + struct ftp_wc *ftpwc = wildcard->ftpwc; +- data->set.fwrite_func = ftpwc->backup.write_function; +- data->set.out = ftpwc->backup.file_descriptor; +- ftpwc->backup.write_function = ZERO_NULL; +- ftpwc->backup.file_descriptor = NULL; + wildcard->state = CURLWC_DOWNLOADING; + + if(Curl_ftp_parselist_geterror(ftpwc->parser)) { +diff --git a/lib/ftp.h b/lib/ftp.h +index 977fc883b1..7e6097af8f 100644 +--- a/lib/ftp.h ++++ b/lib/ftp.h +@@ -87,11 +87,6 @@ struct ftp_parselist_data; /* defined later in ftplistparser.c */ + + struct ftp_wc { + struct ftp_parselist_data *parser; +- +- struct { +- curl_write_callback write_function; +- FILE *file_descriptor; +- } backup; + }; + + typedef enum { +diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c +index 82f1ea00d3..eae799ff3b 100644 +--- a/lib/ftplistparser.c ++++ b/lib/ftplistparser.c +@@ -361,6 +361,16 @@ static CURLcode ftp_pl_insert_finfo(struct Curl_easy *data, + + #define MAX_FTPLIST_BUFFER 10000 /* arbitrarily set */ + ++/* returns TRUE if in wildcard listing mode */ ++bool Curl_ftp_listmode(struct Curl_easy *data) ++{ ++ if(data->state.wildcardmatch) { ++ struct WildcardData * const wildcard = data->wildcard; ++ return wildcard && (wildcard->state <= CURLWC_MATCHING); ++ } ++ return FALSE; ++} ++ + size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, + void *connptr) + { +diff --git a/lib/ftplistparser.h b/lib/ftplistparser.h +index 5ba1f6a97d..115f916f60 100644 +--- a/lib/ftplistparser.h ++++ b/lib/ftplistparser.h +@@ -27,6 +27,9 @@ + + #ifndef CURL_DISABLE_FTP + ++/* returns TRUE if in wildcard listing mode */ ++bool Curl_ftp_listmode(struct Curl_easy *data); ++ + /* WRITEFUNCTION callback for parsing LIST responses */ + size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, + void *connptr); +@@ -72,6 +75,8 @@ struct Curl_easy; + + #else + /* FTP is disabled */ ++#define Curl_ftp_listmode(x) FALSE ++#define Curl_ftp_parselist ZERO_NULL + #define Curl_wildcard_dtor(x) + #endif /* CURL_DISABLE_FTP */ + #endif /* HEADER_CURL_FTPLISTPARSER_H */ diff --git a/meta/recipes-support/curl/curl/CVE-2026-92388-2.patch b/meta/recipes-support/curl/curl/CVE-2026-92388-2.patch new file mode 100644 index 0000000000..322461d028 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-92388-2.patch @@ -0,0 +1,30 @@ +From 8d0e0470e1eddf23a2d5c8f613e2a6d662a4b977 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 17 Sep 2026 14:32:52 +0200 +Subject: [PATCH] ftplistparser: only use the list parser in CURLWC_MATCHING + state + +Follow-up to ba8f8a7 + +Closes #22985 + +CVE: CVE-2026-92388 +Upstream-Status: Backport [https://github.com/curl/curl/commit/b85acacec9b38442741bb019bc9] +Signed-off-by: Adarsh Jagadish Kamini +--- + lib/ftplistparser.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c +index eae799ff3b..daf7f06467 100644 +--- a/lib/ftplistparser.c ++++ b/lib/ftplistparser.c +@@ -366,7 +366,7 @@ bool Curl_ftp_listmode(struct Curl_easy *data) + { + if(data->state.wildcardmatch) { + struct WildcardData * const wildcard = data->wildcard; +- return wildcard && (wildcard->state <= CURLWC_MATCHING); ++ return wildcard && (wildcard->state == CURLWC_MATCHING); + } + return FALSE; + } diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index eade4f8d31..d1df661b1a 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -46,6 +46,8 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-92389.patch \ file://CVE-2026-18924.patch \ file://CVE-2026-86409.patch \ + file://CVE-2026-92388-1.patch \ + file://CVE-2026-92388-2.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Thu Nov 19 15:22:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104911 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.92.1795101873672880397 for ; Thu, 19 Nov 2026 07:24:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=FfZ0a1Wv; spf=pass (domain: smile.fr, ip: 209.85.128.42, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4bb69f5b161so15166915e9.0 for ; Thu, 19 Nov 2026 07:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101872; x=1795706672; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=jRsMAggkf/pqVAmUmAb/NZRmwTmj5NI3h159AIJpvfE=; b=FfZ0a1Wv9/JHR1xD14VnXaRqJc1Dcn2jZlXjx8Ng2mBiRVpQXzbrWRqFe7srvVV469 uBvR6FLozeu19AdRirBrFiFMPiQzO2hYmeVRD6gIYkoscKUc8Doc0BRJ/svggIpwrYtL o6eXm2xCxu9tCsITL+Py4I9asfptNQzI3Cd8roPYnOjxzYroGGf5OIUYau4j7PNF4ruw +ezHNzVfXiwvFB8S6z6F5nhkW+aHLDVWXA/F9UzkK77Fu5xSGQpd8nsIAAOl1QUlGU5B kwXd5GCsyOUjY26Ejpz6eyYKVtSq4pRE7KoLjYyrrEqz3mSuC18/uel+zJ/5IvizOLyF aHlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101872; x=1795706672; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=jRsMAggkf/pqVAmUmAb/NZRmwTmj5NI3h159AIJpvfE=; b=OvV67h9iDjQtmOkhzTD1ZkwLrM3blafMiEUAP/QwbYG2h1PaYRDro7lpRr/b5NdKM1 3Oj2SXDo0gCUG7mtaGXmJaA9ffCjkmrkDFFk/cqTnqK4sNuXXsurnpKQGzaRt13CJOyy 276x2TkOLI4tca7gs3rNMBuvLcDxixdM5sz4QrWiDHyVX7ZIp+asQ3bq0Sm+T681/r+K Iu5bT1ms7W2/O3bJq6mxJLKujd/I6dNVE6Hm6aLMPfuwwdqDUUbuLHtAY/mTbupwF7Fy tPgDSCPrnaDKjQXEAUmu3hethHVmJ5KkDvVYK03FUA9H4RBg0vJuV36USdWSrGYa+IDS cwrw== X-Gm-Message-State: APuU4Z9oV7Jqj+3spC+PrRKO/3z9c5WVx1c03CNjV8qTpbTHPMTlEWL5 FUIRXNgW3i9WGoV5j9Lmj3rLA+ThAJ0gQq6K3OI6vIJgJHCKFAixjmKvLEcmO83INcuze7ejNF7 L2mzW7MM= X-Gm-Gg: AYBFou0NSs6/9Ba8UYwRnHQCzj3lQtRV7oVKGVYZDL7VyXbE9e4SNTZnqXNiNieutz1 HSkzb37h2/giK5zCtUpcx5cYNYZQpXMToXd3ep1+d0C4HppNklTDvWpsaaEXHQUfa66ocW++6d8 eEcq52ikepQgLZ6ALZF6cqTuVzcr2BSYeXEFo9dPa2dW8eyX+qYoL8QxyNKcVf3iqCH0CZd2gG7 hg5Ivx0wGZFzRuuRvZYvRt6TrBeBYGziHU4WHXOfq1aUxNrv9A8VN0SCONcaS79lhiv4EqZcv4Z JbD66/AguVU1S3BC7ijVsjb7F2Jmq+2uTpGaDHUZVWoJraWbQH91ZyC2lfSkyXTPAw4h2Im0kaz IQhlFCklTZhUONqKjUpuSEWtArY7nlLteRBfoRYSgHojFNRX8fy3kYKFbOvJWx8d0piJz3R24u8 PRIpFq/Ek1cRYOSbvyonDAtIWlmvqALD3YeEffQGYYDE1tGLoe3CQww3I/RCMpBFYHRzr6r3Ph/ d15qxCjWqh3yLKInFPvGCvr5IgGM7Sd7BSRkFelRtotrIp33xIryT+zfgYC8hkz1kSLDZQ/1KUK KwrJeOITzu0lfcAanT8gBqkBaf+niLJDqmEFEPVjmPJxVBdCLsJ3R3GyWvnJMTs+eVcUNMZkdqY OvkPZyHapx3xFiJWHIj83pOpb1Os3422SrGfFr+zRrGQcPnUfTX8+IrM= X-Received: by 2002:a05:600c:8904:b0:4bb:6f77:1e35 with SMTP id 5b1f17b1804b1-4bb7daa7fe1mr95723195e9.21.1795101871760; Thu, 19 Nov 2026 07:24:31 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:31 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 16/19] curl: fix CVE-2026-87864 Date: Thu, 19 Nov 2026 16:22:42 +0100 Message-ID: X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250699 From: Adarsh Jagadish Kamini Backport patch to fix CVE-2026-87864. References: https://nvd.nist.gov/vuln/detail/CVE-2026-87864 Upstream fix: https://github.com/curl/curl/commit/3b547de301342b347fb3c6ea6ae797 Tested with ptest: Before: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 After: PASSED: 857, FAILED: 0, SKIPPED: 0, ABORTED: 0 Signed-off-by: Adarsh Jagadish Kamini Signed-off-by: Fabien Thomas --- .../curl/curl/CVE-2026-87864.patch | 52 +++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-87864.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-87864.patch b/meta/recipes-support/curl/curl/CVE-2026-87864.patch new file mode 100644 index 0000000000..9ddfb6054c --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-87864.patch @@ -0,0 +1,52 @@ +From 409f23eaf6c3a4573fa68db155010b4c9054601e Mon Sep 17 00:00:00 2001 +From: Stefan Eissing +Date: Thu, 27 Aug 2026 09:47:53 +0200 +Subject: [PATCH] imap: APPEND CRLF fix + +Deny an APPEND operation with CRLF conversion requested as we are unable +to predict the final upload size and APPEND requires us to announce it +before starting the upload. + +The check for unknown sizes had already been there, but the crlf +conversion that renders a known size unknown was not accounted for. + +Closes #22702 + +CVE: CVE-2026-87864 +Upstream-Status: Backport [https://github.com/curl/curl/commit/3b547de301342b347fb3c6ea6ae797] + +Signed-off-by: Adarsh Jagadish Kamini +--- + lib/imap.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/lib/imap.c b/lib/imap.c +index 0e013e740a..6e4194b0cf 100644 +--- a/lib/imap.c ++++ b/lib/imap.c +@@ -790,7 +790,6 @@ static CURLcode imap_perform_append(struct Curl_easy *data) + result = Curl_creader_set_mime(data, &data->set.mimepost); + if(result) + return result; +- data->state.infilesize = Curl_creader_client_length(data); + } + else + #endif +@@ -800,9 +799,15 @@ static CURLcode imap_perform_append(struct Curl_easy *data) + return result; + } + +- /* Check we know the size of the upload */ ++ /* Check we know the size of the upload. This takes all readers ++ * into account. Especially crlf conversions which make the size ++ * unpredictable, e.g. -1. */ ++ data->state.infilesize = Curl_creader_total_length(data); + if(data->state.infilesize < 0) { +- failf(data, "Cannot APPEND with unknown input file size"); ++ if(data->set.crlf) ++ failf(data, "Cannot APPEND with CRLF conversion making size unknown"); ++ else ++ failf(data, "Cannot APPEND with unknown input file size"); + return CURLE_UPLOAD_FAILED; + } + diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index d1df661b1a..076c8756f5 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -48,6 +48,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-86409.patch \ file://CVE-2026-92388-1.patch \ file://CVE-2026-92388-2.patch \ + file://CVE-2026-87864.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Thu Nov 19 15:22:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104908 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.93.1795101874478807504 for ; Thu, 19 Nov 2026 07:24:34 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=g2+WrsLJ; spf=pass (domain: smile.fr, ip: 209.85.128.48, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4bb61185057so18861345e9.1 for ; Thu, 19 Nov 2026 07:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101873; x=1795706673; darn=lists.openembedded.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8EWOti2cMiHNdPJXZCnxuZTnstmDASCw6spN0LL8rGg=; b=g2+WrsLJZG+hVzDXBreORAE+dx3wxlVYG+g1JKsILmq/IuQ6er6+Hz0d1iK8ZZmP/k 8xJcgqSmbYyS687FafSYirQB8l1ywugRnLILdNvaw5CrYPYzwe/zIKpynCaw5RGmJLcZ 4KIDh8uLknZdhHK8e8HGFDyQ5/CDv8LEDDlQHqZgKXf4HTWgsb4IRobgNy/A5sDfmBzM X7GFJMFa+4vZ+Y6DeKlRyZLvaJgsaa6aQBv27YXbrYBf2ieMKOSNXMd0Hf8JpVb6iPzC j38D3tG0h8voqWB6ef7H600FEfsNo2NEB4WhhTh/fREOV6O+psTqxNUXGEOYExqdmRH2 DZBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101873; x=1795706673; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=8EWOti2cMiHNdPJXZCnxuZTnstmDASCw6spN0LL8rGg=; b=aZAKdUX3yWXzJejndO67b7Q7IqSZFNgV7I90mGhEcQFnjUvai58tXn2DaXL9bBIkOw MSUFqfSQD0WcghQ+FLMk3E8fQVEFaI6auHtEc3ORiccfwqCTmXaUienieDaXBX/kVNXq sFsrKVLHaK6SxQgcO6H6lPA1FFIm0IzcwQlNQ5eV6xj6+Nxwy0O/4Bc0+eq6Mg3f4REN lKQCEYlC/oLoT4x2xEl8d1JATmLPkiXy0vzazmBcTGpt35tIKY8Cnu6pMZoNrgPlo7Lt 5TZxXPB/0lCoU95Hqpg/TBbs8spNZNLbKs/tLbMFIMtGNTlyvha63TuhU67YC8W2tg+r FIjg== X-Gm-Message-State: APuU4Z/+SRaS96qgK6Mdiwc/BrBYL5tZaiOr1E3x65hymgHfjkUYSsiO lYntBzv3cc/Uqnea8sa8llmchibQCBImvATREi3giJkpHqTSehqr/8MbFVP54+aLhOf+VXst8+l n2Az6RqE= X-Gm-Gg: AYBFou1T/CD4R+xZm5oiha8HEilUl2Sh7zXwlrwj74cLo4SpCXiVzx2ALi5R2fv1Of7 rDq3QU4GGbOweeekbvzw87PBoesS0wpGGF4b6t84vKyILrkr9S8XiJ23puoDXlHyRfaSNi56PLC TRmQLqhEz1uzoGXLTnSH6cW162aKz55c1QVIQRvsQLecS+7gZmiOGwd3NlJXF/klq6PqAME0/++ uKpWhPF87gmnHvrMynkQVrlJHVK9lE7bh3fHEdvsPcCTcIlM4DnykiMlX1rJKU53Xh2RNm1XNbW Y3DZDfPBRDFKPZRTOTZSlBGBCkb4etNpWqTi3RnQwNLgvBXXU0nUD/0RKx73EJWKqjmCfZaeJ76 tadzG7R1oxsKa9pFcohGPBFaWvb3QtgdzmootCSr45nZjLxwxSHhQd13moIvmlHTfR62LOmTG9F aH8IHVhZ9o/9moUGALBh2IdjP2P3hIsy238JIPxMkMLAXf7a8fJ0djQND82UQdf54P/qOXomd9w BOvs+yCcrVgu7lVjYWktk82w9pjIYwgR2fNUgBTVQVP4IcBOMNLryJYtlrnInlHTvqAm7wXAe5K gEbeH5rcWU9x1U+kAt7uwp5Owonnso2qXAL9KiszFg/gPWbB7Jy6qQnVlBNeFKGZ9svxo80o/gQ lGhSBDJQk9QDJGZmUBEVlmFrIex0xfe8cOSD3KAFIkkG5fNKlWv5OsMQ= X-Received: by 2002:a05:600c:8b83:b0:4a1:df52:3e36 with SMTP id 5b1f17b1804b1-4bb7da55745mr120767585e9.27.1795101872521; Thu, 19 Nov 2026 07:24:32 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:31 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 17/19] gcc: patch CVE-2026-102010 Date: Thu, 19 Nov 2026 16:22:43 +0100 Message-ID: <2da3a6a83d74b323967e0c10151908d6c6f82aa1.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250700 From: Peter Marko Pick patch referencing this CVE. Signed-off-by: Peter Marko Signed-off-by: Fabien Thomas --- meta/recipes-devtools/gcc/gcc-13.5.inc | 1 + .../gcc/gcc/0028-CVE-2026-102010.patch | 68 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc/0028-CVE-2026-102010.patch diff --git a/meta/recipes-devtools/gcc/gcc-13.5.inc b/meta/recipes-devtools/gcc/gcc-13.5.inc index 13fbfa5a98..2de17a4177 100644 --- a/meta/recipes-devtools/gcc/gcc-13.5.inc +++ b/meta/recipes-devtools/gcc/gcc-13.5.inc @@ -66,6 +66,7 @@ SRC_URI = "${BASEURI} \ file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ file://0027-Fix-gcc-vect-module-testcases.patch \ + file://0028-CVE-2026-102010.patch \ " SRC_URI[sha256sum] = "ec3df0015ed01411f91f9a9cd5b4da3070eb1222b02fadf4133c30c090399855" diff --git a/meta/recipes-devtools/gcc/gcc/0028-CVE-2026-102010.patch b/meta/recipes-devtools/gcc/gcc/0028-CVE-2026-102010.patch new file mode 100644 index 0000000000..3bd1afeee3 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0028-CVE-2026-102010.patch @@ -0,0 +1,68 @@ +From aaa8351f4d2e636f9680a1f0a8ebc2f0a60611e6 Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 25 Sep 2026 18:14:34 +0100 +Subject: [PATCH] libstdc++: Fix use-after-free in pbds binary heap + (CVE-2026-102010) [PR127656] +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +After reallocating the storage the m_a_entries pointer is left dangling +and the new storage is leaked. + +libstdc++-v3/ChangeLog: + + PR libstdc++/127656 + * include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp + (erase_if): Update m_a_entries after reallocation. + * testsuite/ext/pb_ds/regression/priority_queues_erase_if.cc: + New test. + +Reviewed-by: Tomasz Kamiński + +CVE: CVE-2026-102010 +Upstream-Status: Backport [https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aaa8351f4d2e636f9680a1f0a8ebc2f0a60611e6] +Signed-off-by: Peter Marko +--- + .../detail/binary_heap_/erase_fn_imps.hpp | 1 + + .../regression/priority_queues_erase_if.cc | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+) + create mode 100644 libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues_erase_if.cc + +diff --git a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +index 2e70ed5c663..80d2cccbbf0 100644 +--- a/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp ++++ b/libstdc++-v3/include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp +@@ -121,6 +121,7 @@ erase_if(Pred pred) + entry_pointer new_entries = s_entry_allocator.allocate(new_size); + std::copy(m_a_entries, m_a_entries + left, new_entries); + s_entry_allocator.deallocate(m_a_entries, m_actual_size); ++ m_a_entries = new_entries; + m_actual_size = new_size; + resize_policy::notify_arbitrary(m_actual_size); + } +diff --git a/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues_erase_if.cc b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues_erase_if.cc +new file mode 100644 +index 00000000000..30b8452eff9 +--- /dev/null ++++ b/libstdc++-v3/testsuite/ext/pb_ds/regression/priority_queues_erase_if.cc +@@ -0,0 +1,19 @@ ++// { dg-do run } ++ ++// CVE-2026-201020 use-after-free in binary heap erase_if ++ ++#include ++ ++bool is_odd(int v) { return v & 1; } ++ ++int main() ++{ ++ using __gnu_pbds::priority_queue; ++ using __gnu_pbds::binary_heap_tag; ++ priority_queue, binary_heap_tag> q; ++ q.push(1); ++ q.push(2); ++ q.push(3); ++ q.erase_if(&is_odd); ++ q.clear(); ++} From patchwork Thu Nov 19 15:22:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104912 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.94.1795101876306215715 for ; Thu, 19 Nov 2026 07:24:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=UvyhrCBZ; spf=pass (domain: smile.fr, ip: 209.85.128.46, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4bb6adaf0f1so21398925e9.0 for ; Thu, 19 Nov 2026 07:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101874; x=1795706674; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=tHqgn2TuqEYs+boZl8Jqww321c0F6s6ObKWvbCyNpIA=; b=UvyhrCBZNqIMSOYs4vAPuUO4b5BiSzrvNbGoPGcO1GYjhQ5GN9vYGRflABlCqpkWiR 95zrUs+OQTwfqpMql256p/6FE/92skO8ng6zGfAcs/pES+SRlBAWBD38kxAOXy9fxLGE 7vzCrvO+DSFArfVok+mSIBRosI0I5AxvKS3O6ebJRL6ZlfXUuu2sWcrsJkIFdxH4q5vb xTADPAFQb0EpTZyx3L1l/VCsv0vovk3I26aryeDqiDfFJ58hius2I5jcAOSKHFgUbExq XyoNGOtQLHnpCmwBVVz7cfwWNfMKF/a3B4102ytm+YRwOTYKmv8eyiOfg6FpcvEF+u2u 8TeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101874; x=1795706674; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=tHqgn2TuqEYs+boZl8Jqww321c0F6s6ObKWvbCyNpIA=; b=Xi9IS2VeT0uFrPjxEeDf582P12gLFYENWrkCyhvoPpd4x54HlwhaQXZDnKMMq4DiL9 u40VGaT4FRIuNxz6cYRQsdss/AXJcOAtm0dmN5AMYJvqGHdDJ2DcMSIM0k49BCuBtFbG g+rHynivfiyb3+Y17ufnA4J/nwy030Om/p7XV6peOtZihKS8jCqGwEh0Degf0yNDM0ks YiaRCk2XNHBQY/7PmlKaudbAfL/usbW2klnm3tPgqJfJEsRVJwwfpnT7hqVZMYzGvIhd 2mUBEtEV36KfSixPf4e8Wr2NA51S+I0HnqsrA0ztK6R4a6phODBAyWe22EZ47OGDLcY1 9aMw== X-Gm-Message-State: APuU4Z/ppZnj9vuINBK/crrjSJ+CNpLuSUikfeqwJB2tKoZWSpLo6GJF SreSywKPDjYVzgBT0QGVNhKpqKPsrydK7323K+MAUPa7pQ6HPAh9dQxSMtYIgzo8Bt9S1KKy9Zu 8pwqyDkM= X-Gm-Gg: AYBFou32hYI4OxVLtCuZV52OLMHyO8xgkbIvpx6Q8qvN2Z28Oibcm27K0a+giXLFiBL 8TOt33zvGrQEazs09B2rmX3E/0gQ9j1nRup/il3ey+ZP5x08jsgnQhYp2cB9AB/6J9ET8d1YMhE +lYnffhYNe24AwKHZ/UD3jpJSGY/5Ru7+Ns0u/67GSOdOWkjqdbDvXs4+WgJDFPtzjzTRFsE4jI TfnmS1/gzYZOyr7AWe0RMG9QKfyRKlCTdTr5POiLXEb1jy9G0y3tUJEhTVELRn88/GlWxKAdnaj P/t/Jiz3wB+KwH/hPMxKbOqiaRNYhZswbEsQ9VLr8VNMyvWrOWEJ1Lixpn1LgtG8ZRbnbs9Igmo hQfGOoIUZtKo0YPknUqjiuPZnfwum0+tbVCEhPIdqNyIZfJUDd5zW3fc3UJQT7N/VJ+PSmisGGL N6V87qtfy21SfAnbIaaN6QMXe2VLOCOGKmjAGqeBq3jUQlfpDVLJNum0axRV/UQE/YfJEIMoWNe Mi8G/qS3xYDSE3dKLT7SXREV62kP0OeLqRfaOYyGzb8EowC/l/bTp/jDEe49Y7P4Vpe1iotuc5u cXoFItRk6Oq0gNJv5FwvZ728eCSRy5oOa3ltPKazO4yrmdE6Krg9Am9qwadnj/GQlNn2z1cVQK9 MZPM0npRp8lEEBOKmLzmIePgk86e1o0zKKMy6KThqfGYMwaQJlW2H2/Q= X-Received: by 2002:a05:600c:154b:b0:4a1:dfaf:f465 with SMTP id 5b1f17b1804b1-4bb7d5d3f46mr125393465e9.4.1795101873886; Thu, 19 Nov 2026 07:24:33 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:32 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 18/19] aspell: Backport a fix to build with gcc-15/clang-19 Date: Thu, 19 Nov 2026 16:22:44 +0100 Message-ID: <993d5766d34bade5b6722452811d1f25977efd41.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250701 From: Khem Raj Signed-off-by: Khem Raj Signed-off-by: Richard Purdie (From OE-Core rev: d6cb53c0773d28f57b5699125ef825936d4725d1) Signed-off-by: Peter Marko Signed-off-by: Fabien Thomas --- ...default-vector_hash-t.hpp-fix-gcc-15.patch | 42 +++++++++++++++++++ .../recipes-support/aspell/aspell_0.60.8.1.bb | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch diff --git a/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch b/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch new file mode 100644 index 0000000000..4045e8e412 --- /dev/null +++ b/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch @@ -0,0 +1,42 @@ +From d45bf96b0a3556acb2c83069a78eaaac973d31b4 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 21 Jul 2024 22:01:50 +0100 +Subject: [PATCH] modules/speller/default/vector_hash-t.hpp: fix gcc-15 build + +Uncoming `gcc-15` added extra checks for template instantiation that is +guaranteed to fail in + https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=313afcfdabeab3e6705ac0bd1273627075be0023 + +As a result `aspell` build now fails as: + + In file included from modules/speller/default/readonly_ws.cpp:51: + modules/speller/default/vector_hash-t.hpp: In member function 'void aspeller::VectorHashTable::recalc_size()': + modules/speller/default/vector_hash-t.hpp:186:43: error: 'class aspeller::VectorHashTable' has no member named 'e' + 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size); + | ^ + modules/speller/default/vector_hash-t.hpp:186:59: error: 'class aspeller::VectorHashTable' has no member named '_size'; did you mean 'size'? + 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size); + | ^~~~~ + | size + +It looks like `_size` is `size_` mis-spelling and `e` was not introduced +here. +Upstream-Status: Backport [https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041] +Signed-off-by: Khem Raj +--- + modules/speller/default/vector_hash-t.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/speller/default/vector_hash-t.hpp b/modules/speller/default/vector_hash-t.hpp +index 969a80c..e4420b4 100644 +--- a/modules/speller/default/vector_hash-t.hpp ++++ b/modules/speller/default/vector_hash-t.hpp +@@ -183,7 +183,7 @@ namespace aspeller { + template + void VectorHashTable::recalc_size() { + size_ = 0; +- for (iterator i = begin(); i != this->e; ++i, ++this->_size); ++ for (iterator i = begin(), e = end(); i != e; ++i, ++size_); + } + + } diff --git a/meta/recipes-support/aspell/aspell_0.60.8.1.bb b/meta/recipes-support/aspell/aspell_0.60.8.1.bb index 0ea9b063e0..43940b1e1b 100644 --- a/meta/recipes-support/aspell/aspell_0.60.8.1.bb +++ b/meta/recipes-support/aspell/aspell_0.60.8.1.bb @@ -13,7 +13,8 @@ HOMEPAGE = "http://aspell.net/" LICENSE = "LGPL-2.0-only | LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" -SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" +SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \ + file://0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch" SRC_URI[sha256sum] = "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b" PACKAGECONFIG ??= "" From patchwork Thu Nov 19 15:22:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Thomas X-Patchwork-Id: 104907 X-Patchwork-Delegate: fabien.thomas@smile.fr Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.105.1795101876828499187 for ; Thu, 19 Nov 2026 07:24:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=kSlAX3C9; spf=pass (domain: smile.fr, ip: 209.85.128.46, mailfrom: fabien.thomas@smile.fr) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-49d05d51553so17005405e9.2 for ; Thu, 19 Nov 2026 07:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1795101875; x=1795706675; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=LxEvz6Rgf7K9sNc0CkOuM3/ZDpiMSLHq3SmHYPArxYM=; b=kSlAX3C927TLlZI2pFryPaYat3n15wWyMjWe56GJsObho3y8kdat/h1kO2Gr1agkNT CIOpJR3xhafX+12AKAYNuSZZNHyzxfdSqM2c2bF0KANGnHZTAyR355mkf+P54xR+Juu7 +2w+DxfOSbyEwKpYdXQK7N0pR6eJF1Dc4bnDrqDyR/KOwr40qSqAyodFRThNPyE1rA7/ 3D2qtW8R714gMbc+asELJJO8jDxD81sai9jvo7GA7PxaaKNj55r5l9/pGcLm/KLfgRlT R97SnoQn6HIm+u08COR9m+o4CL29FaN6/d4NksGblzhc9hctc52fMH8ZOsxMfnA0+EfQ rzhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795101875; x=1795706675; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=LxEvz6Rgf7K9sNc0CkOuM3/ZDpiMSLHq3SmHYPArxYM=; b=YEgSLXhPh6GPmC0DzBTA9ffNb26xS0criYLu8iU6QkZsWqs2+PgB/rkO4mMMquefcf gtl7l04gz4lK7BJI5IcbFypRxEnrJnY8Wf2JZjnD9hUb7Ktb5Y0HM3GfmcZsiKRRDLaB dyqafUXUXTxe+r1akni7gFVrIt76kO/blXPuoFYS+WENW+Sj8rELaTbwKBX+C52/Bfpt twry/OSUnzlbdQ4Ug9ZuUckF5AVtbM+a5Pwu10Dlo4tOnv6SX/d4rqaRHLN+QQdnV8zV KMhnza2IT9iHjnWFa6JTVm6FwWWOpPQG42gfkXq+GjPY4a+S7WEmVOLyqd2ZMICpkF5V 9ssg== X-Gm-Message-State: APuU4Z8GVLg+U+CGTDNqTQI9NwOTo6GAZcH2s9b2Hm+3C15MKURhLb1f Xr48BhjB5ulfsPQPEvI7+CAnippc848FmoaRkTbF12X8fCKKc6yiQANGyD6dPIIsuzBMurTDMS0 YGe+/cgI= X-Gm-Gg: AYBFou3Twiha2IF9BZTruj6Zs1FfmHP3WKo+IOmNppyib3/ZwPm1fvxb1+fvzivu73E ALJHodCGEhX+Gd8B9osenFjcEZdDfzNo+4ua4gfVhp9+yagKPOmCwZ9/yyecPCZXmwxOyacD37E cefwaDgEmeBnaqx+p5BMHhI+bMEumPkngws4hhSnkwx06K9l4qAsnzLf7P7JMwC/Wao/XnHClYZ OaRtPTZRzeS1jtfN3WFAMgQt8V9EUyCDCLVOvXyQVxFidMtiraCPOrRLuRFdw8aH6VoKFn6Qskm mQwvySHL0orKIG/7PqQa+RFr8mAzySKGEYhotG26JGPnbJSD1zk08t2rMFBuazE4hpGIq0E6kMi hRuopxc+rZEv72AnYmnOtO3OEKKIE06hW6kWF9aaivWX52Fm8NnOrEukB2CckLZaqpZgaJdwZHn zfEVWsop8s9/wrhFheGS17JgL7hqAatnNTvmNKci+3jxx6yCgcWBumiSirTdTXTe3CPJdxkhUjt 45jdtlbw+/P1UEcZhQyxtjeYY31eLMZePWSyvcxU7fbTqr7my0ag84m9Ut/80Ur1cAMaqTdGDd1 OOqVDSIJ87dkCUEi0iiyJjGzQ2ISywcHf/EsmsCa9I+715gQyWQsSZrx0rmpC3oEadr40MHRfT4 9KFfBPyZY2TCyUgXFvuo9eo7SmObYr89Cj4rEbUo1VDJfA0IyfHLg5Ui6 X-Received: by 2002:a05:600d:a:b0:4bb:7e4e:de53 with SMTP id 5b1f17b1804b1-4bb7e4edf38mr99777905e9.12.1795101874944; Thu, 19 Nov 2026 07:24:34 -0800 (PST) Return-Path: Received: from FRSMI25-GIGUE ([2a01:e0a:8cc:5b00:2270:efa7:7aaf:bcdc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884865b1sm4222275e9.5.2026.11.19.07.24.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Nov 2026 07:24:34 -0800 (PST) From: Fabien Thomas To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 19/19] aspell: upgrade 0.60.8.1 -> 0.60.8.2 Date: Thu, 19 Nov 2026 16:22:45 +0100 Message-ID: <4dec16113d0fdd009bc78d75bcab843454367c40.1795101267.git.fabien.thomas@smile.fr> X-Mailer: git-send-email 2.56.1 In-Reply-To: References: MIME-Version: 1.0 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, 19 Nov 2026 15:24:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250702 From: Wang Mingyu 0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch removed since it's included in 0.60.8.2 Signed-off-by: Wang Mingyu Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Ross Burton Signed-off-by: Richard Purdie (From OE-Core rev: 1218499d028b5d5ee269cc4919a98fd1a9fa3f3f) Changelog: https://github.com/GNUAspell/aspell/releases/tag/rel-0.60.8.2 Signed-off-by: Peter Marko Signed-off-by: Fabien Thomas --- ...default-vector_hash-t.hpp-fix-gcc-15.patch | 42 ------------------- ...{aspell_0.60.8.1.bb => aspell_0.60.8.2.bb} | 5 +-- 2 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch rename meta/recipes-support/aspell/{aspell_0.60.8.1.bb => aspell_0.60.8.2.bb} (84%) diff --git a/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch b/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch deleted file mode 100644 index 4045e8e412..0000000000 --- a/meta/recipes-support/aspell/aspell/0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch +++ /dev/null @@ -1,42 +0,0 @@ -From d45bf96b0a3556acb2c83069a78eaaac973d31b4 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Sun, 21 Jul 2024 22:01:50 +0100 -Subject: [PATCH] modules/speller/default/vector_hash-t.hpp: fix gcc-15 build - -Uncoming `gcc-15` added extra checks for template instantiation that is -guaranteed to fail in - https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=313afcfdabeab3e6705ac0bd1273627075be0023 - -As a result `aspell` build now fails as: - - In file included from modules/speller/default/readonly_ws.cpp:51: - modules/speller/default/vector_hash-t.hpp: In member function 'void aspeller::VectorHashTable::recalc_size()': - modules/speller/default/vector_hash-t.hpp:186:43: error: 'class aspeller::VectorHashTable' has no member named 'e' - 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size); - | ^ - modules/speller/default/vector_hash-t.hpp:186:59: error: 'class aspeller::VectorHashTable' has no member named '_size'; did you mean 'size'? - 186 | for (iterator i = begin(); i != this->e; ++i, ++this->_size); - | ^~~~~ - | size - -It looks like `_size` is `size_` mis-spelling and `e` was not introduced -here. -Upstream-Status: Backport [https://github.com/GNUAspell/aspell/commit/ee6cbb12ff36a1e6618d7388a78dd4e0a2b44041] -Signed-off-by: Khem Raj ---- - modules/speller/default/vector_hash-t.hpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/modules/speller/default/vector_hash-t.hpp b/modules/speller/default/vector_hash-t.hpp -index 969a80c..e4420b4 100644 ---- a/modules/speller/default/vector_hash-t.hpp -+++ b/modules/speller/default/vector_hash-t.hpp -@@ -183,7 +183,7 @@ namespace aspeller { - template - void VectorHashTable::recalc_size() { - size_ = 0; -- for (iterator i = begin(); i != this->e; ++i, ++this->_size); -+ for (iterator i = begin(), e = end(); i != e; ++i, ++size_); - } - - } diff --git a/meta/recipes-support/aspell/aspell_0.60.8.1.bb b/meta/recipes-support/aspell/aspell_0.60.8.2.bb similarity index 84% rename from meta/recipes-support/aspell/aspell_0.60.8.1.bb rename to meta/recipes-support/aspell/aspell_0.60.8.2.bb index 43940b1e1b..5b4fab7c35 100644 --- a/meta/recipes-support/aspell/aspell_0.60.8.1.bb +++ b/meta/recipes-support/aspell/aspell_0.60.8.2.bb @@ -13,9 +13,8 @@ HOMEPAGE = "http://aspell.net/" LICENSE = "LGPL-2.0-only | LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" -SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \ - file://0001-modules-speller-default-vector_hash-t.hpp-fix-gcc-15.patch" -SRC_URI[sha256sum] = "d6da12b34d42d457fa604e435ad484a74b2effcd120ff40acd6bb3fb2887d21b" +SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz" +SRC_URI[sha256sum] = "57fe4863eae6048f72245a8575b44b718fb85ca14b9f8c0afc41b254dfd76919" PACKAGECONFIG ??= "" PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"