Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.12805.1793370198372570216 for ; Fri, 30 Oct 2026 07:23:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google2 header.b=C5QHh4Ul; spf=pass (domain: smile.fr, ip: 209.85.128.52, mailfrom: yoann.congal@smile.fr) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4a208d93758so7822095e9.3 for ; Fri, 30 Oct 2026 07:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google2; t=1793370196; x=1793974996; darn=lists.openembedded.org; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1J79NYYv95hZKvyvbCGzbNBrr9H3aqq/WPIu4hNxcHM=; b=C5QHh4UlcxQUPmqqORrkYf9yJ+uFkmh1Bn+lvQqxlt4M/Jx+9j/PRhL0/1vzD5mqzi Et5hJk8XrkbijdX8Bb6LAm2ZudmSkQnw4ZZTCcXzrKvsdEPTt+Mi1Hn++iz0oJAK9/jM /unLD1QjfhgFgmUcr9SDbqkYL9sECeYRZoTes/BneUKRaP6IglcoYuQQHjaYc7PePDdo V+Y3ROinX3/WhZVVbq0hrjxN/CO6T+I5pP6hUR7Yc+x4q7FVgqEQh+ihlxGwdC8K7ldb Wko35bbMmd7srEfZ9ZYMfj21Jv+ZZ0sCyDYznZJoNIuI6da+h++oPPhjaHe+C9NUMwbU 3NgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793370196; x=1793974996; h=in-reply-to:references:to:from:subject:message-id:date:content-type :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=1J79NYYv95hZKvyvbCGzbNBrr9H3aqq/WPIu4hNxcHM=; b=Z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TIN5eR7lPzpOwyAbmCZT8ph7p9zfDGYlX+NqbUmgsHn7v9I3fjJ/n2dAR+2JpABzxZZi4a71496 HYIOrz2QH4YV0pRt+26iJvNZEm6wDKMapJfNZqbGt5OnKtPFLIsOO7s/ORGicvIqQ1MBTdKIXHc EJxT834OVkTGIVtdbcR3GXmNCqMlIH9zN9TOAtWPi9Wgliv2BamBMnP7Xedz5q+HRYXhlr/8p5R rYhsZW9PcI84N+97z X-Received: by 2002:a05:600c:8b5c:b0:4a1:fe55:88ef with SMTP id 5b1f17b1804b1-4ac1889c4b9mr58014765e9.20.1793370196507; Fri, 30 Oct 2026 07:23:16 -0700 (PDT) Return-Path: Received: from localhost (2a01cb001331aa00a2e4fb7b0d887544.ipv6.abo.wanadoo.fr. [2a01:cb00:1331:aa00:a2e4:fb7b:d88:7544]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4abeb77c132sm45542385e9.1.2026.10.30.07.23.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Oct 2026 07:23:15 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 30 Oct 2026 15:23:14 +0100 Message-Id: Subject: Re: [OE-core] [scarthgap][PATCH v2 2/5] libsoup-2.4: fix CVE-2026-1801 From: "Yoann Congal" To: , X-Mailer: aerc 0.20.0 References: <20260929205055.2403390-2-jason.stasiak@gmail.com> <20261014161209.2227316-1-jason.stasiak@garmin.com> <20261014161209.2227316-2-jason.stasiak@garmin.com> In-Reply-To: <20261014161209.2227316-2-jason.stasiak@garmin.com> List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 30 Oct 2026 14:23:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/249044 On Wed Oct 14, 2026 at 6:12 PM CEST, Jason Stasiak via lists.openembedded.o= rg wrote: > Backport fix for CVE-2026-1801 from meta-oe to OE-core. Update CVE > patch to restore the chunked server validation unit test from the > upstream libsoup3 patch (b9a1c0663ff8ab6e79715db4b35b54f560416ddd). > > (From meta-oe rev: 07d67228162018f5f619dce7183f85e79293378d) > > Signed-off-by: Jason Stasiak > --- > Changes since v1: > - Resolved malformed patch lines > > .../libsoup/libsoup-2.4/CVE-2026-1801.patch | 217 ++++++++++++++++++ > .../libsoup/libsoup-2.4_2.74.3.bb | 1 + > 2 files changed, 218 insertions(+) > create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2026-180= 1.patch > > diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2026-1801.patch= b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2026-1801.patch > new file mode 100644 > index 0000000000..f7579a9834 > --- /dev/null > +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2026-1801.patch > @@ -0,0 +1,217 @@ > +From f9c933e258e9ef2f221cca6395f8092a1c4b93dd Mon Sep 17 00:00:00 2001 > +From: Changqing Li > +Date: Thu, 19 Mar 2026 17:10:36 +0800 > +Subject: [PATCH 2/4] Fix CVE-2026-1801 > + > +This patch merges 3 upstream patches Please do not merge patches like this. Instead, backport the 3 patches into CVE-2026-1801-{01,02,03}.patch. (Again, I know this is in the upstream meta-oe commit, but we simply have different review expectation) > + > +Chery-pick the first two patches to make the context is the same as the > +third patch that fix CVE-2026-1801 > + > +Upstream-Status: Backport > +[https://gitlab.gnome.org/GNOME/libsoup/-/commit/1e32b5e123aa1689505472b= dbfcbd897eac41977, > +https://gitlab.gnome.org/GNOME/libsoup/-/commit/8a2e15c88512ae4517d2c2c8= 87d39299725b22da, > +https://gitlab.gnome.org/GNOME/libsoup/-/commit/b9a1c0663ff8ab6e79715db4= b35b54f560416ddd] > +CVE: CVE-2026-1801 > + > +Signed-off-by: Changqing Li > + > +Backport the chunked server validation unit test from the upstream > +libsoup3 patch (b9a1c0663ff8ab6e79715db4b35b54f560416ddd). > + > +Signed-off-by: Jason Stasiak > +--- > + libsoup/soup-body-input-stream.c | 66 +++++++++++++++++++------------ > + tests/server-test.c | 67 ++++++++++++++++++++++++++++++++ > + 2 files changed, 108 insertions(+), 25 deletions(-) > + > +diff --git a/libsoup/soup-body-input-stream.c b/libsoup/soup-body-input-= stream.c > +index 6b95884..25d9312 100644 > +--- a/libsoup/soup-body-input-stream.c > ++++ b/libsoup/soup-body-input-stream.c > +@@ -159,15 +159,18 @@ soup_body_input_stream_read_chunked (SoupBodyInput= Stream *bistream, > + again: > + switch (bistream->priv->chunked_state) { > + case SOUP_BODY_INPUT_STREAM_STATE_CHUNK_SIZE: > +- nread =3D soup_filter_input_stream_read_line ( > +- fstream, metabuf, sizeof (metabuf), blocking, > +- &got_line, cancellable, error); > +- if (nread <=3D 0) > ++ nread =3D soup_filter_input_stream_read_until ( > ++ fstream, metabuf, sizeof (metabuf), > ++ "\r\n", 2, blocking, TRUE, > ++ &got_line, cancellable, error); > ++ if (nread < 0) > + return nread; > +- if (!got_line) { > +- g_set_error_literal (error, G_IO_ERROR, > +- G_IO_ERROR_PARTIAL_INPUT, > +- _("Connection terminated unexpectedly")); ^ This indentation is different from upstream. Please avoid changing upstream patch if not needed. > ++ if (nread =3D=3D 0 || !got_line) { > ++ if (error && *error =3D=3D NULL) { > ++ g_set_error_literal (error, G_IO_ERROR, > ++ G_IO_ERROR_PARTIAL_INPUT, > ++ ("Connection terminated unexpectedly")); > ++ } > + return -1; > + } > +=20 > +@@ -180,9 +183,9 @@ again: > +=20 > + case SOUP_BODY_INPUT_STREAM_STATE_CHUNK: > + nread =3D soup_body_input_stream_read_raw ( > +- bistream, buffer, > +- MIN (count, bistream->priv->read_length), > +- blocking, cancellable, error); > ++ bistream, buffer, > ++ MIN (count, bistream->priv->read_length), > ++ blocking, cancellable, error); > + if (nread > 0) { > + bistream->priv->read_length -=3D nread; > + if (bistream->priv->read_length =3D=3D 0) > +@@ -191,16 +194,19 @@ again: > + return nread; > +=20 > + case SOUP_BODY_INPUT_STREAM_STATE_CHUNK_END: > +- nread =3D soup_filter_input_stream_read_line ( > +- SOUP_FILTER_INPUT_STREAM (bistream->priv->base_stream), > +- metabuf, sizeof (metabuf), blocking, > +- &got_line, cancellable, error); > +- if (nread <=3D 0) > ++ nread =3D soup_filter_input_stream_read_until ( > ++ SOUP_FILTER_INPUT_STREAM (bistream->priv->base_stream), > ++ metabuf, sizeof (metabuf), > ++ "\r\n", 2, blocking, TRUE, > ++ &got_line, cancellable, error); > ++ if (nread < 0) > + return nread; > +- if (!got_line) { > +- g_set_error_literal (error, G_IO_ERROR, > +- G_IO_ERROR_PARTIAL_INPUT, > +- _("Connection terminated unexpectedly")); > ++ if (nread =3D=3D 0 || !got_line) { > ++ if (error && *error =3D=3D NULL) { > ++ g_set_error_literal (error, G_IO_ERROR, > ++ G_IO_ERROR_PARTIAL_INPUT, > ++ _("Connection terminated unexpectedly")); > ++ } > + return -1; > + } > +=20 > +@@ -208,13 +214,23 @@ again: > + break; > +=20 > + case SOUP_BODY_INPUT_STREAM_STATE_TRAILERS: > +- nread =3D soup_filter_input_stream_read_line ( > +- fstream, buffer, count, blocking, > +- &got_line, cancellable, error); > +- if (nread <=3D 0) > ++ nread =3D soup_filter_input_stream_read_until ( > ++ fstream, metabuf, sizeof (metabuf), > ++ "\r\n", 2, blocking, TRUE, > ++ &got_line, cancellable, error); > ++ if (nread < 0) > + return nread; > +=20 > +- if (strncmp (buffer, "\r\n", nread) || strncmp (buffer, "\n", nread))= { > ++ if (nread =3D=3D 0) { > ++ if (error && *error =3D=3D NULL) { > ++ g_set_error_literal (error, G_IO_ERROR, > ++ G_IO_ERROR_PARTIAL_INPUT, > ++ _("Connection terminated unexpectedly")); > ++ } > ++ return -1; > ++ } > ++ > ++ if (nread =3D=3D 2 && strncmp (metabuf, "\r\n", nread) =3D=3D 0) { > + bistream->priv->chunked_state =3D SOUP_BODY_INPUT_STREAM_STATE_DONE; > + bistream->priv->eof =3D TRUE; > + } > +diff --git a/tests/server-test.c b/tests/server-test.c > +index 8976103e..fbe8bdcc 100644 > +--- a/tests/server-test.c > ++++ b/tests/server-test.c Same remarks as patch 1/5 about test code. If we don't exercise it we don't have to backport/review it. Thanks! --=20 Yoann Congal Smile ECS