From: "Yoann Congal" <yoann.congal@smile.fr>
To: "Jeroen Hofstee" <oe@myspectrum.nl>,
<openembedded-core@lists.openembedded.org>
Cc: <peter.marko@siemens.com>
Subject: Re: [OE-core][scarthgap 13/55] popt: patch CVE-2026-18739
Date: Mon, 02 Nov 2026 23:30:23 +0100 [thread overview]
Message-ID: <DML2X05WT3OY.RAVTPE8JH68S@smile.fr> (raw)
In-Reply-To: <29941044-0317-4fa9-9b36-e891ab5b1d83@myspectrum.nl>
On Sat Oct 31, 2026 at 2:24 PM CET, Jeroen Hofstee wrote:
> Hi Yoann,
Hello,
> This is a low prio CVE, but that CVE: CVE-2026-18743 is incorrect in Fix
> CVE-2026-18739 and the fix is incomplete.
>
> But that is already the case in master. I will send a patch for it as soon
> as things finish building here. It can't hurt if you include it anyway.
Thanks for your attention. I missed that (commented below for
awareness).
When you say "fix is incomplete.", do you mean the "CVE:" tag is wrong
or something is also missing in the patch?
Regards,
> With kind regards,
>
> Jeroen
>
> On 10/31/26 01:14, Yoann Congal via openembedded-core wrote:
>> From: Peter Marko<peter.marko@siemens.com>
>>
>> Pick patch referencing this CVE.
>> Convert change in cmake file to autotools/makefile.
>> Install the new test in recipe.
>>
>> Signed-off-by: Peter Marko<peter.marko@siemens.com>
>> Signed-off-by: Mathieu Dubois-Briand<mathieu.dubois-briand@bootlin.com>
>> Signed-off-by: Richard Purdie<richard.purdie@linuxfoundation.org>
>> (cherry picked from commit c211972ad21e1801abc7dd15951093316c5528f4)
>> Signed-off-by: Yoann Congal<yoann.congal@smile.fr>
>> [YC: backport translated cmake to automake
>> (the project migrated in between) ]
>> ---
>> .../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 00000000000..0a1e8f35907
>> --- /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<pmatilai@redhat.com>
>> +
>> +Fixes: CVE-2026-18739
>> +
>> +CVE: CVE-2026-18743
^ this CVE tag does not match patch filename nor the upstream
"Fixes" tag.
>> +Upstream-Status: Backport [https://github.com/rpm-software-management/popt/commit/14c42b415ba0c11640f7d4ee80920452d0287058]
>> +Signed-off-by: Peter Marko<peter.marko@siemens.com>
>> +---
>> + 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 <stdio.h>
>> ++#include <popt.h>
>> ++
>> ++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 c8b4875c1b7..18cc4f2867d 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}
>> }
--
Yoann Congal
Smile ECS
next prev parent reply other threads:[~2026-11-02 22:30 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 0:14 [OE-core][scarthgap 00/55] Patch review Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 01/55] scripts/install-buildtools: Update to 5.0.21 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 02/55] util-linux: patch CVE-2026-53614 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 03/55] util-linux: patch CVE-2026-53613 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 04/55] util-linux: patch CVE-2026-53612 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 05/55] util-linux: patch CVE-2024-28085 regression Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 06/55] util-linux: patch CVE-2026-78408 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 07/55] util-linux: patch CVE-2026-78410 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 08/55] util-linux: patch CVE-2026-76642 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 09/55] tzdata/tzcode-native: upgrade 2026d -> 2026e Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 10/55] expat: patch CVE-2026-102633 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 11/55] expat: patch CVE-2026-77214 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 12/55] popt: patch CVE-2026-18743 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 13/55] popt: patch CVE-2026-18739 Yoann Congal
2026-10-31 13:24 ` Jeroen Hofstee
2026-11-02 22:30 ` Yoann Congal [this message]
2026-11-03 7:24 ` Marko, Peter
2026-11-03 8:08 ` Yoann Congal
2026-11-04 17:06 ` Marko, Peter
2026-11-04 16:10 ` Jeroen Hofstee
[not found] ` <18E4E37A751FEE22.323135@lists.openembedded.org>
2026-11-04 16:25 ` Jeroen Hofstee
2026-10-31 0:14 ` [OE-core][scarthgap 14/55] glib-2.0: patch CVE-2026-15588 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 15/55] glib-2.0: patch CVE-2026-16118 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 16/55] libpng: patch CVE-2026-46675 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 17/55] go: fix CVE-2026-56862 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 18/55] libpcre2: update to latest release branch hash 50b3c0d7ce Yoann Congal
2026-11-02 11:00 ` Paul Barker
2026-11-03 7:49 ` Marko, Peter
2026-10-31 0:14 ` [OE-core][scarthgap 19/55] python3-urllib3: Fix CVE-2026-97689 Yoann Congal
2026-11-02 11:02 ` Paul Barker
2026-11-02 12:44 ` Yoann Congal
2026-11-02 21:21 ` Paul Barker
2026-10-31 0:14 ` [OE-core][scarthgap 20/55] python3-pyelftools: add python3-logging to RDEPENDS Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 21/55] glibc: patch CVE-2026-5928 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 22/55] glibc: patch CVE-2026-5450 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 23/55] glibc: patch CVE-2026-6791 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 24/55] glibc: patch CVE-2026-6368 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 25/55] glibc: patch CVE-2026-19542 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 26/55] glibc: patch CVE-2026-19499 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 27/55] glibc: patch CVE-2026-77117 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 28/55] glibc: patch CVE-2026-80489 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 29/55] glibc: add tests for CVE-2026-77117 and CVE-2026-80489 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 30/55] glibc: patch CVE-2026-18374 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 31/55] glibc: patch CVE-2026-8674 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 32/55] glibc: patch CVE-2026-89092 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 33/55] glibc: patch CVE-2026-97399 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 34/55] glibc: stable 2.39 branch updates to b7a0de2c8f Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 35/55] b4-config: Add configuration for scarthgap Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 36/55] dhcpcd: patch CVE-2025-70102 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 37/55] python3: upgrade 3.12.15 -> 3.12.16 Yoann Congal
2026-10-31 0:14 ` [OE-core][scarthgap 38/55] shadow-native: Disable syslog usage Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 39/55] gstreamer1.0: disable an intermittently failing test Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 40/55] gstreamer: skip test_queue:test_leaky_downstream test as it's flakey Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 41/55] linux-yocto/6.6: update to v6.6.156 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 42/55] linux-yocto/6.6: update to v6.6.157 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 43/55] linux-yocto/6.6: update to v6.6.159 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 44/55] linux-yocto/6.6: update to v6.6.160 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 45/55] linux-yocto/6.6: aufs: refresh to upstream aufs6.6.84 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 46/55] linux-yocto/6.6: update CVE exclusions (6.6.160) Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 47/55] curl: fix CVE-2026-80230 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 48/55] libarchive: fix CVE-2026-15028 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 49/55] systemd: try AT_EMPTY_PATH for access_fd() first Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 50/55] apr-util: Fix CVE-2025-49506 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 51/55] apr-util: Fix CVE-2026-32327 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 52/55] apr-util: Mark CVE-2026-34191 not applicable Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 53/55] apr-util: Fix CVE-2026-34501 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 54/55] apr-util: Fix CVE-2026-34502 Yoann Congal
2026-10-31 0:15 ` [OE-core][scarthgap 55/55] util-linux: patch CVE-2026-53615 Yoann Congal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DML2X05WT3OY.RAVTPE8JH68S@smile.fr \
--to=yoann.congal@smile.fr \
--cc=oe@myspectrum.nl \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.marko@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox