Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at
	Cisco)" <dkelaiya@cisco.com>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][wrynose][PATCH v2 1/5] curl: fix CVE-2026-8926
Date: Mon, 16 Nov 2026 15:36:13 +0100	[thread overview]
Message-ID: <DMWPLL6BJVI3.1WWR7CLO0LHRF@smile.fr> (raw)
In-Reply-To: <20261023093331.1886272-2-dkelaiya@cisco.com>

Hello,

On Fri Oct 23, 2026 at 11:33 AM CEST, Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) wrote:
> From: Darsh Kelaiya <dkelaiya@cisco.com>
>
> Backport the upstream fix [1] for [2] to curl 8.19.0.
>
> Include entry-selection changes and extended test 685 from [4].
> Keep password-only entries valid for a user supplied in the URL,
> while rejecting passwords tied to a different login. Reset login
> matching state when changing entries.
>
> Include upstream follow-up [3] to cover URL users absent from the
> netrc file, with regression test 1646.
>
> Select the final login and password at the end of each machine entry.
> Extend tests/data/test1304 and tests/unit/unit1304.c for both
> credential orders, replaced logins, account values and macros.
> Document the retained parser API and test harness separately from
> upstream's lexer/scanner rewrite. Preserve generic password-only
> entries and the old blank-password API.
>
> [1] https://github.com/curl/curl/commit/4ae1d7cc2643e4773a136395f12bc02fc6867854
> [2] https://curl.se/docs/CVE-2026-8926.html
> [3] https://github.com/curl/curl/commit/7ca5f939c8403db7ede21e2ccb805a65d3329ef8
> [4] https://github.com/curl/curl/commit/a327a5bdedfad6b486bca4e0a1a4fdac9ab298ca
>
> Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
> ---
> Changes in v2:
> - Select the final login/password at entry boundaries to handle both
>   credential orderings and reject a mismatched final login.
> - Extend tests/data/test1304 and tests/unit/unit1304.c for both orders,
>   replaced logins, account values and macro bodies.
> - Document the retained parser API, test harness, password-only
>   entries and blank-password behavior.
> ---
>  .../curl/curl/CVE-2026-8926-dependent.patch   | 140 ++++++++++
>  .../curl/curl/CVE-2026-8926_p1.patch          | 258 ++++++++++++++++++
>  .../curl/curl/CVE-2026-8926_p2.patch          |  84 ++++++
>  meta/recipes-support/curl/curl_8.19.0.bb      |   3 +
>  4 files changed, 485 insertions(+)
>  create mode 100644 meta/recipes-support/curl/curl/CVE-2026-8926-dependent.patch
>  create mode 100644 meta/recipes-support/curl/curl/CVE-2026-8926_p1.patch
>  create mode 100644 meta/recipes-support/curl/curl/CVE-2026-8926_p2.patch
>
> diff --git a/meta/recipes-support/curl/curl/CVE-2026-8926_p1.patch b/meta/recipes-support/curl/curl/CVE-2026-8926_p1.patch
> new file mode 100644
> index 0000000000..71d44a2bd5
> --- /dev/null
> +++ b/meta/recipes-support/curl/curl/CVE-2026-8926_p1.patch
> @@ -0,0 +1,258 @@
> +From 4ae1d7cc2643e4773a136395f12bc02fc6867854 Mon Sep 17 00:00:00 2001
> +From: Stefan Eissing <stefan@eissing.org>
> +Date: Fri, 15 May 2026 11:45:49 +0200
> +Subject: [PATCH] netrc: scanner refactor
> +
> +Refactor the netrc scanner. Add test case for checking that the last
> +matched machine with unmatched login does not return the password as
> +success (unit1304).
> +
> +Closes #21624
> +
> +CVE: CVE-2026-8926
> +Upstream-Status: Backport [https://github.com/curl/curl/commit/4ae1d7cc2643e4773a136395f12bc02fc6867854]
> +
> +Backport Changes:
> +- Kept curl 8.19.0's parsenetrc() state machine and tokenizer;
> +  applied the selection rules from upstream netrc_scan_end_entry()
> +  without importing the lexer/scanner replacement.
> +- Kept Curl_parsenetrc() and its char **loginp / char **passwordp
> +  interface. Omitted the netrc.h and url.c API/credential plumbing
> +  changes for Curl_netrc_scan() and Curl_creds.
> +- Kept the existing file-loading helpers; omitted upstream's grammar
> +  documentation, debug tracing and helper reordering.
> +- In the old parser, replaced the early login/password return with
> +  selection at machine, default, macdef and EOF boundaries. Reject
> +  an explicitly mismatched final login; keep password-only entries.
> +- Retained the old API's blank-password result for a matching login
> +  without a password, rather than importing Curl_creds handling.
> +- Consume account values and skip macro-body lines in the retained
> +  tokenizer instead of using upstream's literal-token/macro helpers.
> +- Adapted tests/unit/unit1304.c to the old API. Kept
> +  UNITTEST_BEGIN_SIMPLE and string cleanup instead of upstream's
> +  easy-handle setup. Retained the old assertion style and substring/
> +  superstring inputs. Updated the three unmatched-login results and
> +  ported the final host/unmatched-login regression.
> +- Extended the existing tests/data/test1304 fixture, which upstream
> +  does not modify, and added unit1304 assertions for both credential
> +  orders, replaced logins, account values and macro bodies.
> +
> +(cherry picked from commit 4ae1d7cc2643e4773a136395f12bc02fc6867854)
> +Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
> +---
> + lib/netrc.c           | 53 +++++++++++++++++++++++++--------------------------
> + tests/data/test1304   |  8 ++++++++
> + tests/unit/unit1304.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++---
> + 3 files changed, 83 insertions(+), 30 deletions(-)

Thanks for the v2.

I think there is a problem with the tests: curl-ptest never runs
unit1304, so the added unit1304 code is not tested on the
autobuilder. 

This patch was in this autobuilder build:
  https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/5130

The curl ptest logs of qemux86-64-ptest and qemuarm64-ptest both have:
   1304: IGNORED: The tool set in the test case for this: 'units' does not exist
  TESTDONE: 1008 tests out of 1008 reported OK: 100%
  https://valkyrie.yocto.io/pub/non-release/20261116-6/testresults/qemux86-64-ptest/curl.log
  https://valkyrie.yocto.io/pub/non-release/20261116-6/testresults/qemuarm64-ptest/curl.log

Since this is mostly new code, I'd like to get the test right (meaning
running on the AB).

How did you run this unit1304 test?

Regards,
-- 
Yoann Congal
Smile ECS


  reply	other threads:[~2026-11-16 14:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23  9:33 [OE-core][wrynose][PATCH v2 0/5] curl: backport security fixes Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-10-23  9:33 ` [OE-core][wrynose][PATCH v2 1/5] curl: fix CVE-2026-8926 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-16 14:36   ` Yoann Congal [this message]
2026-10-23  9:33 ` [OE-core][wrynose][PATCH v2 2/5] curl: fix CVE-2026-11564 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-16 15:51   ` Yoann Congal
2026-11-17  9:50     ` Paul Barker
2026-10-23  9:33 ` [OE-core][wrynose][PATCH v2 3/5] curl: fix CVE-2026-80255 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-17  9:54   ` Yoann Congal
2026-10-23  9:33 ` [OE-core][wrynose][PATCH v2 4/5] curl: fix CVE-2026-82208 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-10-23  9:33 ` [OE-core][wrynose][PATCH v2 5/5] curl: fix CVE-2026-80231 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-17 10:31   ` 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=DMWPLL6BJVI3.1WWR7CLO0LHRF@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=dkelaiya@cisco.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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