From patchwork Tue Jun 17 21:19:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3CC6C71136 for ; Tue, 17 Jun 2025 21:20:34 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web10.31258.1750195234524889677 for ; Tue, 17 Jun 2025 14:20:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=hZ1J9pXV; spf=softfail (domain: sakoman.com, ip: 209.85.210.174, mailfrom: steve@sakoman.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7481600130eso6828353b3a.3 for ; Tue, 17 Jun 2025 14:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195234; x=1750800034; 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; bh=EGC75AFgi5BV8cQX/zJf18G7oVJsa3O+ashwNkOP7RA=; b=hZ1J9pXVQ2wlzMjku3jA6fjjvA/AE+7TwHueIMWEkjFdDpjf1FyXEyB123EOY0G0vH cF7BsuoT82eX4essiq/4wo/5N8jEMQ+0pnhZmPnlyfEhsNXRQ9GF9oNRnMbtJPaNR6I+ 9DiVG/dHhh9nfbfresloo02rHQs5hZyVZcjR7D67WRjzCht/KdikEdv27ZJX5mppwpdG SlOScgkfOrggXrQC/eL30Q3IYrlRDvJQ07si5DsJdzg8ibpKsJaay8dY/DNlPCty1tWp 5EJehjGEmKeFVWORgk8+vaIiphuMYAamYXIea/CImh08V2pD5A1kGiEr00QkKx3/wWN3 aSlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195234; x=1750800034; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EGC75AFgi5BV8cQX/zJf18G7oVJsa3O+ashwNkOP7RA=; b=ViIVt1JKPBrflJK67wKMT2cjn4r0scwPE7mdjdR870zIbmjPYLExSbTYPEqQQ9sYaB sPraDq9QAAz+5ej/p73Xg9nzlxZEi+mGMI2IG8egOvWghzGIoS0gqW+h4hKyFq8lOFtE ROFqmN3uZanNGNliBSfa3d0Mjnoy0rgka4MvZrm5f3MiDyvEZKV1jvUW0VC/1va35lVZ QlnUNBx78MzyAdjG1+rvkeBdU1jptg9rQddSNTTCkoAVEy5RKYcJKWWFXSfPsTOz2vKy aiGDTLqShcX2pwKV0M2EU+y4CROWeA47e80l08FuW32znZJJarQBzIwNkapB1N0/hIkm TziA== X-Gm-Message-State: AOJu0YxSMWXs0n+syQmjX6d6Ny3asZuki1CINDK56hRIAgADS6YDPmo3 8oFEAVEPh0LBmGrf2BMd6O4mxLg+tcTayEGh2NvzQRGFc1OZpadcd7YyKIE9hpSDdxoMcDqUJu8 O1tik X-Gm-Gg: ASbGncukBg8Ejki7+JDy+MtrXt85Ws8yUcLywgXEkML7z8xBt8HmBCHXxUAJ9oJ3iDZ p3D3tsQNeGuGjarb4axGyKwIEMTiz9NRqkDI+LNyQkl6IlQ/Zn6l0a0bI2HW0bqdVxzMR5g6oYJ B5fYA3/OnmRydyEV3GJ2mkt3IOqAge1Pc+WAmqrmmCmUbrgbztXfjOMK/rUhB52AvluKRh/gb95 z0GV6vAmD4XjwqJoy7jHKsgTkN7NbZ/lC9rCu3Pkw+x5uA88EC+a0VU9SnrRoGNM/fGwilHkpXi nXUsikWcHOxDKtBWo9/Qmc9io3PjJGUGlQT67Mf63QBkNgf+AV62nw== X-Google-Smtp-Source: AGHT+IEwrHj5LQS/4HbIQds2ufidoKJ0aTmq5SOe9km5MqeCW2cR46XPn7saGHJQh3dApCjeMTItLQ== X-Received: by 2002:a05:6a00:21cb:b0:73e:235a:1fca with SMTP id d2e1a72fcca58-7489d17526bmr21810264b3a.20.1750195233466; Tue, 17 Jun 2025 14:20:33 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:33 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 01/27] Glibc: Fix for CVE-2025-4802 Date: Tue, 17 Jun 2025 14:19:58 -0700 Message-ID: <2d0c574852ed934f339547220364f1d236aad987.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:34 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218918 From: Sunil Dora elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for static [https://sourceware.org/bugzilla/show_bug.cgi?id=32976] Upstream-Status: Backport [ https://sourceware.org/cgit/glibc/commit/?id=5451fa962cd0a90a0e2ec1d8910a559ace02bba0 && https://sourceware.org/cgit/glibc/commit/?id=d8f7a79335b0d861c12c42aec94c04cd5bb181e2 ] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0025-CVE-2025-4802.patch | 249 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 250 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0025-CVE-2025-4802.patch diff --git a/meta/recipes-core/glibc/glibc/0025-CVE-2025-4802.patch b/meta/recipes-core/glibc/glibc/0025-CVE-2025-4802.patch new file mode 100644 index 0000000000..0298f5a865 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0025-CVE-2025-4802.patch @@ -0,0 +1,249 @@ +From 32917e7ee972e7a01127a04454f12ef31dc312ed Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Wed, 11 Jun 2025 03:19:10 -0700 +Subject: [PATCH] elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for + static + +It mimics the ld.so behavior. +Checked on x86_64-linux-gnu. + +[New Test Case] +elf: Test case for bug 32976 +[https://sourceware.org/bugzilla/show_bug.cgi?id=32976] + +Check that LD_LIBRARY_PATH is ignored for AT_SECURE statically +linked binaries, using support_capture_subprogram_self_sgid. + +Upstream-Status: Backport [https://sourceware.org/cgit/glibc/commit/?id=5451fa962cd0a90a0e2ec1d8910a559ace02bba0 && + https://sourceware.org/cgit/glibc/commit/?id=d8f7a79335b0d861c12c42aec94c04cd5bb181e2] + +CVE: CVE-2025-4802 + +Co-authored-by: Florian Weimer +Signed-off-by: Sunil Dora +--- + elf/Makefile | 4 ++ + elf/dl-support.c | 46 ++++++++--------- + elf/tst-dlopen-sgid-mod.c | 1 + + elf/tst-dlopen-sgid.c | 104 ++++++++++++++++++++++++++++++++++++++ + 4 files changed, 132 insertions(+), 23 deletions(-) + create mode 100644 elf/tst-dlopen-sgid-mod.c + create mode 100644 elf/tst-dlopen-sgid.c + +diff --git a/elf/Makefile b/elf/Makefile +index 61c41ea6..3ad66ab6 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -274,6 +274,7 @@ tests-static-normal := \ + tst-array1-static \ + tst-array5-static \ + tst-dl-iter-static \ ++ tst-dlopen-sgid \ + tst-dst-static \ + tst-env-setuid \ + tst-env-setuid-tunables \ +@@ -807,6 +808,7 @@ modules-names = \ + tst-dlmopen-gethostbyname-mod \ + tst-dlmopen-twice-mod1 \ + tst-dlmopen-twice-mod2 \ ++ tst-dlopen-sgid-mod \ + tst-dlopenfaillinkmod \ + tst-dlopenfailmod1 \ + tst-dlopenfailmod2 \ +@@ -2913,3 +2915,5 @@ $(objpfx)tst-recursive-tls.out: \ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) + $(objpfx)tst-recursive-tlsmod%.os: tst-recursive-tlsmodN.c + $(compile-command.c) -DVAR=thread_$* -DFUNC=get_threadvar_$* ++ ++$(objpfx)tst-dlopen-sgid.out: $(objpfx)tst-dlopen-sgid-mod.so +diff --git a/elf/dl-support.c b/elf/dl-support.c +index 09079c12..c2baed69 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -272,8 +272,6 @@ _dl_non_dynamic_init (void) + _dl_main_map.l_phdr = GL(dl_phdr); + _dl_main_map.l_phnum = GL(dl_phnum); + +- _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; +- + /* Set up the data structures for the system-supplied DSO early, + so they can influence _dl_init_paths. */ + setup_vdso (NULL, NULL); +@@ -281,27 +279,6 @@ _dl_non_dynamic_init (void) + /* With vDSO setup we can initialize the function pointers. */ + setup_vdso_pointers (); + +- /* Initialize the data structures for the search paths for shared +- objects. */ +- _dl_init_paths (getenv ("LD_LIBRARY_PATH"), "LD_LIBRARY_PATH", +- /* No glibc-hwcaps selection support in statically +- linked binaries. */ +- NULL, NULL); +- +- /* Remember the last search directory added at startup. */ +- _dl_init_all_dirs = GL(dl_all_dirs); +- +- _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; +- +- _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; +- +- _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; +- +- _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); +- if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') +- _dl_profile_output +- = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; +- + if (__libc_enable_secure) + { + static const char unsecure_envvars[] = +@@ -324,6 +301,29 @@ _dl_non_dynamic_init (void) + #endif + } + ++ _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; ++ ++ /* Initialize the data structures for the search paths for shared ++ objects. */ ++ _dl_init_paths (getenv ("LD_LIBRARY_PATH"), "LD_LIBRARY_PATH", ++ /* No glibc-hwcaps selection support in statically ++ linked binaries. */ ++ NULL, NULL); ++ ++ /* Remember the last search directory added at startup. */ ++ _dl_init_all_dirs = GL(dl_all_dirs); ++ ++ _dl_lazy = *(getenv ("LD_BIND_NOW") ?: "") == '\0'; ++ ++ _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; ++ ++ _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; ++ ++ _dl_profile_output = getenv ("LD_PROFILE_OUTPUT"); ++ if (_dl_profile_output == NULL || _dl_profile_output[0] == '\0') ++ _dl_profile_output ++ = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0]; ++ + #ifdef DL_PLATFORM_INIT + DL_PLATFORM_INIT; + #endif +diff --git a/elf/tst-dlopen-sgid-mod.c b/elf/tst-dlopen-sgid-mod.c +new file mode 100644 +index 00000000..5eb79eef +--- /dev/null ++++ b/elf/tst-dlopen-sgid-mod.c +@@ -0,0 +1 @@ ++/* Opening this object should not succeed. */ +diff --git a/elf/tst-dlopen-sgid.c b/elf/tst-dlopen-sgid.c +new file mode 100644 +index 00000000..47829a40 +--- /dev/null ++++ b/elf/tst-dlopen-sgid.c +@@ -0,0 +1,104 @@ ++/* Test case for ignored LD_LIBRARY_PATH in static startug (bug 32976). ++ Copyright (C) 2025 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 ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* This is the name of our test object. Use a custom module for ++ testing, so that this object does not get picked up from the system ++ path. */ ++static const char dso_name[] = "tst-dlopen-sgid-mod.so"; ++ ++/* Used to mark the recursive invocation. */ ++static const char magic_argument[] = "run-actual-test"; ++ ++static int ++do_test (void) ++{ ++/* Pathname of the directory that receives the shared objects this ++ test attempts to load. */ ++ char *libdir = support_create_temp_directory ("tst-dlopen-sgid-"); ++ ++ /* This is supposed to be ignored and stripped. */ ++ TEST_COMPARE (setenv ("LD_LIBRARY_PATH", libdir, 1), 0); ++ ++ /* Copy of libc.so.6. */ ++ { ++ char *from = xasprintf ("%s/%s", support_objdir_root, LIBC_SO); ++ char *to = xasprintf ("%s/%s", libdir, LIBC_SO); ++ add_temp_file (to); ++ support_copy_file (from, to); ++ free (to); ++ free (from); ++ } ++ ++ /* Copy of the test object. */ ++ { ++ char *from = xasprintf ("%s/elf/%s", support_objdir_root, dso_name); ++ char *to = xasprintf ("%s/%s", libdir, dso_name); ++ add_temp_file (to); ++ support_copy_file (from, to); ++ free (to); ++ free (from); ++ } ++ ++ TEST_COMPARE (support_capture_subprogram_self_sgid (magic_argument), 0); ++ ++ free (libdir); ++ ++ return 0; ++} ++ ++static void ++alternative_main (int argc, char **argv) ++{ ++ if (argc == 2 && strcmp (argv[1], magic_argument) == 0) ++ { ++ if (getgid () == getegid ()) ++ /* This can happen if the file system is mounted nosuid. */ ++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", ++ (intmax_t) getgid ()); ++ ++ /* Should be removed due to SGID. */ ++ TEST_COMPARE_STRING (getenv ("LD_LIBRARY_PATH"), NULL); ++ ++ TEST_VERIFY (dlopen (dso_name, RTLD_NOW) == NULL); ++ { ++ const char *message = dlerror (); ++ TEST_COMPARE_STRING (message, ++ "tst-dlopen-sgid-mod.so:" ++ " cannot open shared object file:" ++ " No such file or directory"); ++ } ++ ++ support_record_failure_barrier (); ++ exit (EXIT_SUCCESS); ++ } ++} ++ ++#define PREPARE alternative_main ++#include +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 9073e04537..1ea4d5a252 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -61,6 +61,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ + file://0025-CVE-2025-4802.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:19:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD4B2C7115A for ; Tue, 17 Jun 2025 21:20:44 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web11.31409.1750195236369747885 for ; Tue, 17 Jun 2025 14:20:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=PMzQDseZ; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-74801bc6dc5so90637b3a.1 for ; Tue, 17 Jun 2025 14:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195236; x=1750800036; 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; bh=e/qoC4Nnc1gnJ0GpKfqcbqD1FByAWjCvIxaPAP/AITo=; b=PMzQDseZHrlKIKCxftLV4xMM4f+Py3Wi1QPL3KXt5JVdA/azqPopAlVH0gbQBnnncz BxapkxHieDvO8AstPlD/gUuR22wE7CzCjwZFr9tpdiy2w46SKpZs4SXtQYsU26yj59Zt aWbTzm1fKpeW9+IfX7rmKp5Oqzy1huQBs62bYNBltOq8n5xMXGrbv47L9jDurvwf1H5U /WI6Rul6jK+A71d/VgcHLB4u+UDM8N5KBgjoWfvE6tjJrze5wZTUdTXcCDf5/2sRrn32 8mIeGi0Iu02srZd6v8buk3Q6y84xjeTPvMX246yG65J2yrXf8piZ8qp4Ndmw4D+HH+l7 N4sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195236; x=1750800036; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e/qoC4Nnc1gnJ0GpKfqcbqD1FByAWjCvIxaPAP/AITo=; b=LKkkC6vbRiOJgtoXzqZNCqC8YRJp5ImuJuveWjWCWIbG0CCzhP70tpqlxh4nvHCXVc narlORFWUx8WuXyeHdy2+oAO1uwF0r8eTBjclMBmM5UZ6nDDuMnLOIJjsR0SIOOidl7I JpVPn5Whu3h+irfAgHfX+i6CugWnEUhHu99vw9OHlrhH192Nr2arY92FIP0wuJLQ4dB5 BT+RKzJ0YaryNgbhpyXxX8yxyLU8jZdbjiQKiZYwR9i/XxYFloss/qlOhtgV6+lcfYbs eOpiTFDn+RAXjcoFrcDBsgyFVNf1Ykjfn+kCqP6+QcrkZ4wde/Dzg95fguGcMRjPGCXY nrQg== X-Gm-Message-State: AOJu0YwTAIFA42NfgV03/XvML/gfXHXepPG4SxA/yZS5OUCKY/7r5adY d2tqGLAgZm0HZ8U5UEub/biMhR/DPw8zi02sIoMxYyaY8BOB/zXOCfQ7+Np7wAnJrIryVNL4/Lo J4vzW X-Gm-Gg: ASbGncu8m1JVDYDWzpQHOM5oJPQ9+Hert9UKHL0a+k9OhlbS6Moq00ZdHUOMIof+67D M6fYTyLgpOZyhSqD80otXTeSXi6D/4MsCRiQiTx241YvLCr/0rKLl9QgU8/xd9MIA0XljFm6+iB EtxwY+N3ohsHVg06YecbkzuUeRrmKOeosOwFpJAT8o2bbRY5NjVt+V+oYdQcNE0FXPHldBE3K8y ADw1rQALVdfnS/47KenJpwsWM679SrQHpkgQFtel7yDSqngMCbjehb3BLPZ4COKQrHrckVe4diD XFCLxIAhKva/daxjDO7bSglyYCq6dLVYP2ktmnU5rwNLzwX24T6U1g== X-Google-Smtp-Source: AGHT+IGnnPZV2FIUWLjlKZQylmEVpfF/CSHdhYoNawmnXv7uoUOubQCcXB0T5y79WddmCjRuOjI94g== X-Received: by 2002:a05:6a00:4646:b0:742:b9d2:dc8f with SMTP id d2e1a72fcca58-748e6ec3c9emr124795b3a.1.1750195235558; Tue, 17 Jun 2025 14:20:35 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:35 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 02/27] python3-requests: fix CVE-2024-47081 Date: Tue, 17 Jun 2025 14:19:59 -0700 Message-ID: <37d746033710509ffabc244e0130d20fd81d9673.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218919 From: Jiaying Song Requests is a HTTP library. Due to a URL parsing issue, Requests releases prior to 2.32.4 may leak .netrc credentials to third parties for specific maliciously-crafted URLs. Users should upgrade to version 2.32.4 to receive a fix. For older versions of Requests, use of the .netrc file can be disabled with `trust_env=False` on one's Requests Session. Reference: https://nvd.nist.gov/vuln/detail/CVE-2024-47081 Upstream patch: https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef Signed-off-by: Jiaying Song Signed-off-by: Steve Sakoman --- .../python3-requests/CVE-2024-47081.patch | 37 +++++++++++++++++++ .../python/python3-requests_2.27.1.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-requests/CVE-2024-47081.patch diff --git a/meta/recipes-devtools/python/python3-requests/CVE-2024-47081.patch b/meta/recipes-devtools/python/python3-requests/CVE-2024-47081.patch new file mode 100644 index 0000000000..1d465cc594 --- /dev/null +++ b/meta/recipes-devtools/python/python3-requests/CVE-2024-47081.patch @@ -0,0 +1,37 @@ +From c664b4415baf1b237a8d74f5e880179e69ee764c Mon Sep 17 00:00:00 2001 +From: Nate Prewitt +Date: Wed, 25 Sep 2024 08:03:20 -0700 +Subject: [PATCH] Only use hostname to do netrc lookup instead of netloc + +CVE: CVE-2024-47081 + +Upstream-Status: Backport +[https://github.com/psf/requests/commit/96ba401c1296ab1dda74a2365ef36d88f7d144ef] + +Signed-off-by: Jiaying Song +--- + requests/utils.py | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/requests/utils.py b/requests/utils.py +index 153776c7..eae72959 100644 +--- a/requests/utils.py ++++ b/requests/utils.py +@@ -208,13 +208,7 @@ def get_netrc_auth(url, raise_errors=False): + return + + ri = urlparse(url) +- +- # Strip port numbers from netloc. This weird `if...encode`` dance is +- # used for Python 3.2, which doesn't support unicode literals. +- splitstr = b':' +- if isinstance(url, str): +- splitstr = splitstr.decode('ascii') +- host = ri.netloc.split(splitstr)[0] ++ host = ri.hostname + + try: + _netrc = netrc(netrc_path).authenticators(host) +-- +2.34.1 + diff --git a/meta/recipes-devtools/python/python3-requests_2.27.1.bb b/meta/recipes-devtools/python/python3-requests_2.27.1.bb index 689a1dffb7..6f7c47abac 100644 --- a/meta/recipes-devtools/python/python3-requests_2.27.1.bb +++ b/meta/recipes-devtools/python/python3-requests_2.27.1.bb @@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=34400b68072d710fecd0a2940a0d1658" SRC_URI += "file://CVE-2023-32681.patch \ file://CVE-2024-35195.patch \ + file://CVE-2024-47081.patch \ " SRC_URI[sha256sum] = "68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61" From patchwork Tue Jun 17 21:20:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCAD6C71157 for ; Tue, 17 Jun 2025 21:20:44 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web11.31411.1750195238163860472 for ; Tue, 17 Jun 2025 14:20:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=qeBWtDIF; spf=softfail (domain: sakoman.com, ip: 209.85.210.180, mailfrom: steve@sakoman.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7426c44e014so5211271b3a.3 for ; Tue, 17 Jun 2025 14:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195237; x=1750800037; 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; bh=dN2uSRla74aVupL1MLnJ2nyE6w29AFr9ILkf55gjbSc=; b=qeBWtDIF5dZP27hyL0bfHemHz9m/WLN2pAIU6Yjjy8+lQ3ljMDOREc6pGF6YFnmmlR pB4YD+eJbO4c2Cjo7Op7AkvYq4az6nKny2iAz+astPDTJaKD+SvKISyX8Kly9KqzYj1C toPYBfbljljmxRdJbLh9JYsJK9eq115rEX1PIs/WdYr+cc6n92YohAAP+pzoNXferddh iduan2JuC4PVd7QDNNzc8E6ul4ZoQbfLxQgUCqQIlxBe/pKIge8F/+GYZRO/GiEA2Tmy +urSsxdRBC7aD62iHW7w3PvfrPtGrlAoefBaltm7yxezFzs2OkNphT3Knychx/MDsuyH PwWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195237; x=1750800037; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dN2uSRla74aVupL1MLnJ2nyE6w29AFr9ILkf55gjbSc=; b=eiZE/NAfdh0o+0QhTVmACSfZEiYi2yKpQf8o7r8Z0nxui0g6vgB19AOTHBUm3h4/iW ersrW2YftRZVPVyPl5Xq4ltfkjNaBTOBSi0fZAueogtx5CLtg+CbJYJu5x/ScbpzlOSy o5zlI2eSF1QmLRVXv64Ny2lNmDJJNFcs780JDEMC88xUCjXEOWkThey0k/ffqknbRwkA sHDYe9XUlBOtZGWTi4A6xSKRmy3KJLWf1XOfgcQu+Z/dVAIiIsSVnc4Hpr2PF1PnHzSQ xvtA+g6fwQebtgm2o/DOjYZgogR2ETQj92cp3XmiwgWMnkBmsZBKEQWUENIxWfUet0Ks r+8g== X-Gm-Message-State: AOJu0Yzli3bJjVD3WJzwYopg0N49mcCtk6HHcuxlK29d7/LIAT+UDWub fPZTGHKDIIz3hz8B5//UJ5pr9V9m2Odjh+n6YHSk/8fW6M5dqTl8LTEbRS+L6RnAFiFw5o4oPOF M2psD X-Gm-Gg: ASbGncsCfDumRa/DvdC3GJ7MJ8jPyvYu9tISg1J163N0tH0D905sQdpmSbAJWtOrLkr uedPS2BPVN/gNCLm86EEZV3rIilDniQG1mgoY/CwC7s9GU5MhZLZ7Tas/UzZ1SJ5ZYVr0dpbCFL AcIYw8NkSqJ/uRi5tsHsugsTdZdJOt8n709OpCg8hQeMH1mvO0zzmqArPmzgNlO/tswQ/Dm0sgA MRFX1T+GmM+oSB6IQuyCeLPQhIX+dh6TOQRw1lW9PxFAaRXq3ECAVRT571z07LrQWWAvs6uK2q2 5kJ6oa8vmoWmh/wQXUy9UAx/Sfs4Zlc1P4b4fgEx8aEvbcUNiX0yog== X-Google-Smtp-Source: AGHT+IECGUHqo227gUSTgJN0cJ/wGcJadQX8xsIyZWUbeozl3iQmGJDeX2f4RrBdP9qpOG5nxotNHw== X-Received: by 2002:a05:6a00:1823:b0:737:9b:582a with SMTP id d2e1a72fcca58-7489cfdb64bmr23023201b3a.24.1750195237254; Tue, 17 Jun 2025 14:20:37 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:36 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 03/27] net-tools: patch CVE-2025-46836 Date: Tue, 17 Jun 2025 14:20:00 -0700 Message-ID: <7f2ce7ea6bd3397e4a4f3f7bb6957d14838f66c5.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218920 From: Peter Marko Backport patch for this CVE and also patch for its regression. Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- .../net-tools/CVE-2025-46836-01.patch | 91 +++++++++++++++++++ .../net-tools/CVE-2025-46836-02.patch | 31 +++++++ .../net-tools/net-tools_2.10.bb | 2 + 3 files changed, 124 insertions(+) create mode 100644 meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-01.patch create mode 100644 meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-02.patch diff --git a/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-01.patch b/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-01.patch new file mode 100644 index 0000000000..0d55512497 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-01.patch @@ -0,0 +1,91 @@ +From 7a8f42fb20013a1493d8cae1c43436f85e656f2d Mon Sep 17 00:00:00 2001 +From: Zephkeks +Date: Tue, 13 May 2025 11:04:17 +0200 +Subject: [PATCH] CVE-2025-46836: interface.c: Stack-based Buffer Overflow in + get_name() + +Coordinated as GHSA-pfwf-h6m3-63wf + +CVE: CVE-2025-46836 +Upstream-Status: Backport [https://sourceforge.net/p/net-tools/code/ci/7a8f42fb20013a1493d8cae1c43436f85e656f2d/] +Signed-off-by: Peter Marko +--- + lib/interface.c | 63 ++++++++++++++++++++++++++++++------------------- + 1 file changed, 39 insertions(+), 24 deletions(-) + +diff --git a/lib/interface.c b/lib/interface.c +index 71d4163..a054f12 100644 +--- a/lib/interface.c ++++ b/lib/interface.c +@@ -211,32 +211,47 @@ out: + } + + static const char *get_name(char *name, const char *p) ++/* Safe version — guarantees at most IFNAMSIZ‑1 bytes are copied ++ and the destination buffer is always NUL‑terminated. */ + { +- while (isspace(*p)) +- p++; +- while (*p) { +- if (isspace(*p)) +- break; +- if (*p == ':') { /* could be an alias */ +- const char *dot = p++; +- while (*p && isdigit(*p)) p++; +- if (*p == ':') { +- /* Yes it is, backup and copy it. */ +- p = dot; +- *name++ = *p++; +- while (*p && isdigit(*p)) { +- *name++ = *p++; +- } +- } else { +- /* No, it isn't */ +- p = dot; +- } +- p++; +- break; +- } +- *name++ = *p++; ++ char *dst = name; /* current write ptr */ ++ const char *end = name + IFNAMSIZ - 1; /* last byte we may write */ ++ ++ /* Skip leading white‑space. */ ++ while (isspace((unsigned char)*p)) ++ ++p; ++ ++ /* Copy until white‑space, end of string, or buffer full. */ ++ while (*p && !isspace((unsigned char)*p) && dst < end) { ++ if (*p == ':') { /* possible alias veth0:123: */ ++ const char *dot = p; /* remember the colon */ ++ ++p; ++ while (*p && isdigit((unsigned char)*p)) ++ ++p; ++ ++ if (*p == ':') { /* confirmed alias */ ++ p = dot; /* rewind and copy it all */ ++ ++ /* copy the colon */ ++ if (dst < end) ++ *dst++ = *p++; ++ ++ /* copy the digits */ ++ while (*p && isdigit((unsigned char)*p) && dst < end) ++ *dst++ = *p++; ++ ++ if (*p == ':') /* consume trailing colon */ ++ ++p; ++ } else { /* if so treat as normal */ ++ p = dot; ++ } ++ break; /* interface name ends here */ ++ } ++ ++ *dst++ = *p++; /* ordinary character copy */ + } +- *name++ = '\0'; ++ ++ *dst = '\0'; /* always NUL‑terminate */ + return p; + } + diff --git a/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-02.patch b/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-02.patch new file mode 100644 index 0000000000..d2c3673a24 --- /dev/null +++ b/meta/recipes-extended/net-tools/net-tools/CVE-2025-46836-02.patch @@ -0,0 +1,31 @@ +From ddb0e375fb9ca95bb69335540b85bbdaa2714348 Mon Sep 17 00:00:00 2001 +From: Bernd Eckenfels +Date: Sat, 17 May 2025 21:53:23 +0200 +Subject: [PATCH] Interface statistic regression after 7a8f42fb2 + +CVE: CVE-2025-46836 +Upstream-Status: Backport [https://sourceforge.net/p/net-tools/code/ci/ddb0e375fb9ca95bb69335540b85bbdaa2714348/] +Signed-off-by: Peter Marko +--- + lib/interface.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/lib/interface.c b/lib/interface.c +index a054f12..ca4adf1 100644 +--- a/lib/interface.c ++++ b/lib/interface.c +@@ -239,12 +239,11 @@ static const char *get_name(char *name, const char *p) + /* copy the digits */ + while (*p && isdigit((unsigned char)*p) && dst < end) + *dst++ = *p++; +- +- if (*p == ':') /* consume trailing colon */ +- ++p; + } else { /* if so treat as normal */ + p = dot; + } ++ if (*p == ':') /* consume trailing colon */ ++ ++p; + break; /* interface name ends here */ + } + diff --git a/meta/recipes-extended/net-tools/net-tools_2.10.bb b/meta/recipes-extended/net-tools/net-tools_2.10.bb index 33304297ec..c4d298181a 100644 --- a/meta/recipes-extended/net-tools/net-tools_2.10.bb +++ b/meta/recipes-extended/net-tools/net-tools_2.10.bb @@ -11,6 +11,8 @@ SRC_URI = "git://git.code.sf.net/p/net-tools/code;protocol=https;branch=master \ file://net-tools-config.h \ file://net-tools-config.make \ file://Add_missing_headers.patch \ + file://CVE-2025-46836-01.patch \ + file://CVE-2025-46836-02.patch \ " S = "${WORKDIR}/git" From patchwork Tue Jun 17 21:20:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8CBCC71136 for ; Tue, 17 Jun 2025 21:20:44 +0000 (UTC) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mx.groups.io with SMTP id smtpd.web10.31260.1750195239956533398 for ; Tue, 17 Jun 2025 14:20:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=hKFxXB/3; spf=softfail (domain: sakoman.com, ip: 209.85.215.173, mailfrom: steve@sakoman.com) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-879d2e419b9so6021312a12.2 for ; Tue, 17 Jun 2025 14:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195239; x=1750800039; 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; bh=10ugOS6cwtlatol2TXAJjhsW3STIz75dMqtku1MtlCU=; b=hKFxXB/3qhNSGKd0v7tr3/reGKgMRMzbeeqWIqY0sSPGUpUHItNJm6BVZ5Hv5NR1sg MbqeHUzhwgiDJeAj1Wq05ppkFpqPB4p3hZJy/JHrBX59ZQsfOi3/TbpSoI9cnf5PiyS8 tP8C08t9PmnGcmk4NBjBndlpA9xdcphqvHdrIv9UmDk5qX2aW66GVHtKPTBD8OHL9b8m 6uvmJjgo/vgGCWqt8hL9uhXZFZmssQCkouMXU0Zs52saiBQIQkAQTpfi+HydO5jUUttI 2Wu3YQUrSt1ZTB5b4qU+uSN7k7bFOvkMlxvtCR9p4vvpbyI0pvk29VBiRM1d3B0ouB15 d9rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195239; x=1750800039; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=10ugOS6cwtlatol2TXAJjhsW3STIz75dMqtku1MtlCU=; b=dqfTvZA2biA2RQ58wia0tQ4YrGc/t2AcX9kMN+FKaZwfDJknFjmubAexMQ7aBcYbC3 RglzRxI3aEPJz9Oxabpj+YkBdeJYLqrKyXrSdWyZbO7iPFm2p87sh7TUvWmkALA5CLmC EaDb2gapFwa+TE1uZdPw3ktmfhwb2ZsvPLTYgDK/pvNQ8aAhHAbQ/f76N3MgDEEzKN+B OMxTTYJmhf8K5n49qxQKIGoXs7693AWOYYUPV4VR7MhJ50wKgfiLCnpmbtGul/aCh37i b3nwy9B1557XMu4J6pRYKalMLYzsmi/ya5I1CFJbIHtO7Ag/jg5/RBn2v8luoqoXLZMq r/AA== X-Gm-Message-State: AOJu0YxTkNH4pyp7qj3uUbImpPg3UKgbS3J87ON5haj+n8D5xVr2I5J3 vFtEt+qn4kOTYsHaVQ+z4bvQyoRFcnc9QunZ/bk9pNscKtNGU/EgoS546MPbKrq+TthDe9Ay6Ue rzMOt X-Gm-Gg: ASbGncs4RuRRPTCrIpT/ZL0BgEC10BXtdZoBJ7jI6tDHk7+iEBrrBLzsCxtjX+aCg4A jiWLCTjh3ZKX5HN8OLsI2tGz7iYM886WpeY4QeAZl6tNuHGYGdiF2+n+N+rkXOsVJEKzYJeRmaR WMXv5TqGZ5jL9Ow5qL7cBJIlywZUxLqb3Juzo6rO05hgU55PR4h0/JfyS5KnYl1h5jQQ/t2yKjO UtvyFzsvFIKv5tkedYOZNBr6ifxKleB9f5Pe2iWT8LMRPJye8xWq5VEofCbWziRLN4CRMa1QqjR Idx9UB0/UOl0qfQzvQ3f6HLap5FxlOU1ehjNRnSFaLY7bFy+3dZvgcY0H0iQuZNB X-Google-Smtp-Source: AGHT+IFINYa/ZkhLUuTCWvSFQ6nwCsyZDM8TsP09YTHReh8yY91WZK34LDPmgdWKyNYIFF75LXNIsw== X-Received: by 2002:a05:6a21:a343:b0:21f:5b6f:36eb with SMTP id adf61e73a8af0-21fbd68e189mr19031917637.39.1750195238907; Tue, 17 Jun 2025 14:20:38 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:38 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 04/27] libsoup-2.4: Fix CVE-2025-2784 Date: Tue, 17 Jun 2025 14:20:01 -0700 Message-ID: <5cea727e87489b144cba9b2aa491d0c90f34f93d.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218921 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/242a10fbb12dbdc12d254bd8fc8669a0ac055304 & https://gitlab.gnome.org/GNOME/libsoup/-/commit/c415ad0b6771992e66c70edf373566c6e247089d] https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/435 Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup-2.4/CVE-2025-2784-1.patch | 52 +++++++ .../libsoup/libsoup-2.4/CVE-2025-2784-2.patch | 135 ++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.2.bb | 2 + 3 files changed, 189 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-2.patch diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-1.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-1.patch new file mode 100644 index 0000000000..bc2538329f --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-1.patch @@ -0,0 +1,52 @@ +From 242a10fbb12dbdc12d254bd8fc8669a0ac055304 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Wed, 5 Feb 2025 14:39:42 -0600 +Subject: [PATCH] sniffer: Fix potential overflow + +Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libsoup2.4/tree/debian/patches/CVE-2025-2784-1.patch?h=ubuntu/focal-security +Upstream commit https://gitlab.gnome.org/GNOME/libsoup/-/commit/242a10fbb12dbdc12d254bd8fc8669a0ac055304] +CVE: CVE-2025-2784 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 2 +- + tests/meson.build | 4 +++- + tests/resources/whitespace.html | Bin 0 -> 512 bytes + tests/sniffing-test.c | 5 +++++ + tests/soup-tests.gresource.xml | 1 + + 5 files changed, 10 insertions(+), 2 deletions(-) + create mode 100644 tests/resources/whitespace.html + +--- libsoup2.4-2.70.0.orig/libsoup/soup-content-sniffer.c ++++ libsoup2.4-2.70.0/libsoup/soup-content-sniffer.c +@@ -642,7 +642,7 @@ sniff_feed_or_html (SoupContentSniffer * + pos = 3; + + look_for_tag: +- if (pos > resource_length) ++ if (pos >= resource_length) + goto text_html; + + if (skip_insignificant_space (resource, &pos, resource_length)) +--- libsoup2.4-2.70.0.orig/tests/sniffing-test.c ++++ libsoup2.4-2.70.0/tests/sniffing-test.c +@@ -601,6 +601,11 @@ main (int argc, char **argv) + "type/text_html; charset=UTF-8/test.html => text/html; charset=UTF-8", + do_sniffing_test); + ++ /* Test hitting skip_insignificant_space() with number of bytes equaling resource_length. */ ++ g_test_add_data_func ("/sniffing/whitespace", ++ "type/text_html/whitespace.html => text/html", ++ do_sniffing_test); ++ + /* Test that disabling the sniffer works correctly */ + g_test_add_data_func ("/sniffing/disabled", + "/text_or_binary/home.gif", +--- libsoup2.4-2.70.0.orig/tests/soup-tests.gresource.xml ++++ libsoup2.4-2.70.0/tests/soup-tests.gresource.xml +@@ -25,5 +25,6 @@ + resources/text.txt + resources/text_binary.txt + resources/tux.webp ++ resources/whitespace.html + + diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-2.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-2.patch new file mode 100644 index 0000000000..c9d9c04087 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-2784-2.patch @@ -0,0 +1,135 @@ +From c415ad0b6771992e66c70edf373566c6e247089d Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Tue, 18 Feb 2025 14:29:50 -0600 +Subject: [PATCH] sniffer: Add better coverage of skip_insignificant_space() + +Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/libsoup2.4/tree/debian/patches/CVE-2025-2784-2.patch?h=ubuntu/focal-security +Upstream commit https://gitlab.gnome.org/GNOME/libsoup/-/commit/c415ad0b6771992e66c70edf373566c6e247089d] +CVE: CVE-2025-2784 +Signed-off-by: Vijay Anusuri +--- + .../content-sniffer/soup-content-sniffer.c | 10 ++-- + tests/resources/whitespace.html | Bin 512 -> 0 bytes + tests/sniffing-test.c | 53 ++++++++++++++++-- + tests/soup-tests.gresource.xml | 1 - + 4 files changed, 53 insertions(+), 11 deletions(-) + delete mode 100644 tests/resources/whitespace.html + +--- libsoup2.4-2.70.0.orig/libsoup/soup-content-sniffer.c ++++ libsoup2.4-2.70.0/libsoup/soup-content-sniffer.c +@@ -612,8 +612,11 @@ sniff_text_or_binary (SoupContentSniffer + } + + static gboolean +-skip_insignificant_space (const char *resource, int *pos, int resource_length) ++skip_insignificant_space (const char *resource, gsize *pos, gsize resource_length) + { ++ if (*pos >= resource_length) ++ return TRUE; ++ + while ((resource[*pos] == '\x09') || + (resource[*pos] == '\x20') || + (resource[*pos] == '\x0A') || +@@ -632,7 +635,7 @@ sniff_feed_or_html (SoupContentSniffer * + { + const char *resource = (const char *)buffer->data; + int resource_length = MIN (512, buffer->length); +- int pos = 0; ++ gsize pos = 0; + + if (resource_length < 3) + goto text_html; +@@ -642,9 +645,6 @@ sniff_feed_or_html (SoupContentSniffer * + pos = 3; + + look_for_tag: +- if (pos >= resource_length) +- goto text_html; +- + if (skip_insignificant_space (resource, &pos, resource_length)) + goto text_html; + +--- libsoup2.4-2.70.0.orig/tests/sniffing-test.c ++++ libsoup2.4-2.70.0/tests/sniffing-test.c +@@ -432,6 +432,53 @@ test_disabled (gconstpointer data) + soup_uri_free (uri); + } + ++static const gsize MARKUP_LENGTH = strlen (""); ++ ++static void ++do_skip_whitespace_test (void) ++{ ++ SoupContentSniffer *sniffer = soup_content_sniffer_new (); ++ SoupMessage *msg = soup_message_new (SOUP_METHOD_GET, "http://example.org"); ++ const char *test_cases[] = { ++ "", ++ "response_headers, "text/html", NULL); ++ ++ guint i; ++ for (i = 0; i < G_N_ELEMENTS (test_cases); i++) { ++ const char *trailing_data = test_cases[i]; ++ gsize leading_zeros = 512 - MARKUP_LENGTH - strlen (trailing_data); ++ gsize testsize = MARKUP_LENGTH + leading_zeros + strlen (trailing_data); ++ guint8 *data = g_malloc0 (testsize); ++ guint8 *p = data; ++ char *content_type; ++ GBytes *buffer; ++ ++ /* Format of $trailing_data */ ++ memcpy (p, "", strlen ("-->")); ++ p += strlen ("-->"); ++ if (strlen (trailing_data)) ++ memcpy (p, trailing_data, strlen (trailing_data)); ++ /* Purposefully not NUL terminated. */ ++ ++ buffer = g_bytes_new_take (g_steal_pointer (&data), testsize); ++ content_type = soup_content_sniffer_sniff (sniffer, msg, (SoupBuffer *) buffer, NULL); ++ ++ g_free (content_type); ++ g_bytes_unref (buffer); ++ } ++ ++ g_object_unref (msg); ++ g_object_unref (sniffer); ++} ++ + int + main (int argc, char **argv) + { +@@ -601,16 +648,13 @@ main (int argc, char **argv) + "type/text_html; charset=UTF-8/test.html => text/html; charset=UTF-8", + do_sniffing_test); + +- /* Test hitting skip_insignificant_space() with number of bytes equaling resource_length. */ +- g_test_add_data_func ("/sniffing/whitespace", +- "type/text_html/whitespace.html => text/html", +- do_sniffing_test); +- + /* Test that disabling the sniffer works correctly */ + g_test_add_data_func ("/sniffing/disabled", + "/text_or_binary/home.gif", + test_disabled); + ++ g_test_add_func ("/sniffing/whitespace", do_skip_whitespace_test); ++ + ret = g_test_run (); + + soup_uri_free (base_uri); +--- libsoup2.4-2.70.0.orig/tests/soup-tests.gresource.xml ++++ libsoup2.4-2.70.0/tests/soup-tests.gresource.xml +@@ -25,6 +25,5 @@ + resources/text.txt + resources/text_binary.txt + resources/tux.webp +- resources/whitespace.html + + diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb index bb15e8b926..5e8a141dc5 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb @@ -32,6 +32,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32912-1.patch \ file://CVE-2025-32912-2.patch \ file://CVE-2025-32914.patch \ + file://CVE-2025-2784-1.patch \ + file://CVE-2025-2784-2.patch \ " SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" From patchwork Tue Jun 17 21:20:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8ED9C7115D for ; Tue, 17 Jun 2025 21:20:44 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web10.31261.1750195241600450685 for ; Tue, 17 Jun 2025 14:20:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=rPS60Yop; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-748cd3c8829so1028626b3a.2 for ; Tue, 17 Jun 2025 14:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195241; x=1750800041; 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; bh=3o45HpQY4+xWHleaAdWWsbU7heTrQP05fClYOWFvfVc=; b=rPS60YopADxEXzfj90LzIV81ZCYMWgp4qYan2ibHU8v9Sp/xlcbsUxj3cHoLQAjbHR KLFIHannJw8Z7nNxJHNJGardGoO4wBLlKa2AiexjaT9MZcSld4LuT0aIUO9j97e/7FxK iJefbxmpYodrCcgvIDHEWKe3v02m8LoRmBCSUQOKMSwqWGobSpzmQ0a/Ka89vGB++WRw tGAgJnLjQHWB8ej1aedoUU6/5/d7mxNGJm3V/CntAvI4iRmOTfpgr1/coMIPRVUDxpzl b7WEe6/RCLNVyIzbMmZR6HW5/hbUUbXCInfv4u4RIDLqb5dU6sfuoYZVyfyBMFAon/Gb BODA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195241; x=1750800041; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3o45HpQY4+xWHleaAdWWsbU7heTrQP05fClYOWFvfVc=; b=HueNrAhmoWlW0Xmi5AnuX+Ts0ApZ5ZqbLMDA2nU0PTR50yDV/Ih8R1Jeo55rzdVk3u caOO7VptFhhR7R/P6/vOuTmupdVtp38J5TuaUDx0O5MjICFKdGvPNcqnhfQklOBlSPW+ Zz/LylGDVUAIIx90c5c+xA61XI4VYzhPRNP88FVXGv1rx1ngN/SAEFzMtfsHZ9rTVtWO w0qxHe2EmFqa8I7txhvd9cGL/f3CCC7LBEzUdwVywSHC82Ighob/N5fGnV2xXK0U+Pxy 1hcuVZ93gSIVaQhwWmzTfZSqWcx10NtIc3JFpT+RVVUcJOTwIjB5PKA3frHa5HGvOdS2 cwVw== X-Gm-Message-State: AOJu0YwjxFwzcprZ3HMC/YCtPNsmCb01WyGpiBA29oBrZ759KCdS2ACA Zsqv4Avjq5KmYhczBlZhnuYu3lCO7a+caE4k/U5x4BbWskIR1CRI9uKmiXfrf1wdhtukZLr8Rds ZY39I X-Gm-Gg: ASbGncuR7ShNuIiQ61R91BNOIaLh3ibFxVu+dz01V+M1NsdalGk1tDnB8FyPTlciEpf ZT6G70gP3TiN0eF1mg8wBhWfOPowHtVrpalRVvm+9bQh9YATaW7Vzlk6u2SjHIYyuP6zdPjFqCI TnOqUst7/UjtcN7vvkWxQSO0xz55pBXgFJaCGyzMFdP17e7tQFCeS3UIiM+j5zEyuR75yeiqilj GeJTFcRosLKAG/NblkMaqK/a7IVG2j7rBD7HkLcG8EQKDkgXnO3sGFIvGpZppcXCOJHwrjXyAD7 v4iHXImcYMlvcboOFipgUJA0HsiK7NZcBLl7CClffCQCzradioWMkRbejA4HaJU6 X-Google-Smtp-Source: AGHT+IEO5pMDjDczdFD+WLPnH+9HIP9GawPrexc085/xnyWwlAgMS3zkhvgfeofwgBVEoAf/fVRyXg== X-Received: by 2002:a05:6a00:14c2:b0:748:2e1a:84e3 with SMTP id d2e1a72fcca58-7489ce0c6bbmr24520851b3a.8.1750195240714; Tue, 17 Jun 2025 14:20:40 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:40 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 05/27] libsoup: Fix CVE-2025-2784 Date: Tue, 17 Jun 2025 14:20:02 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218922 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/242a10fbb12dbdc12d254bd8fc8669a0ac055304 & https://gitlab.gnome.org/GNOME/libsoup/-/commit/c415ad0b6771992e66c70edf373566c6e247089d] https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/435 Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup/CVE-2025-2784-1.patch | 73 +++++++++ .../libsoup/libsoup/CVE-2025-2784-2.patch | 140 ++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 2 + 3 files changed, 215 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-2784-1.patch create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-2784-2.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-1.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-1.patch new file mode 100644 index 0000000000..d46886c57f --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-1.patch @@ -0,0 +1,73 @@ +From 242a10fbb12dbdc12d254bd8fc8669a0ac055304 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Wed, 5 Feb 2025 14:39:42 -0600 +Subject: [PATCH] sniffer: Fix potential overflow + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/242a10fbb12dbdc12d254bd8fc8669a0ac055304] +CVE: CVE-2025-2784 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 2 +- + tests/meson.build | 4 +++- + tests/sniffing-test.c | 5 +++++ + tests/soup-tests.gresource.xml | 1 + + 4 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index d7c46c8..648ea04 100644 +--- a/libsoup/content-sniffer/soup-content-sniffer.c ++++ b/libsoup/content-sniffer/soup-content-sniffer.c +@@ -666,7 +666,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer) + pos = 3; + + look_for_tag: +- if (pos > resource_length) ++ if (pos >= resource_length) + goto text_html; + + if (skip_insignificant_space (resource, &pos, resource_length)) +diff --git a/tests/meson.build b/tests/meson.build +index 7851e57..450becb 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -92,7 +92,9 @@ tests = [ + {'name': 'session'}, + {'name': 'server-auth'}, + {'name': 'server'}, +- {'name': 'sniffing'}, ++ {'name': 'sniffing', ++ 'depends': [test_resources], ++ }, + {'name': 'socket'}, + {'name': 'ssl', + 'dependencies': [gnutls_dep], +diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c +index 6116719..b542817 100644 +--- a/tests/sniffing-test.c ++++ b/tests/sniffing-test.c +@@ -512,6 +512,11 @@ main (int argc, char **argv) + "type/text_html; charset=UTF-8/test.html => text/html; charset=UTF-8", + do_sniffing_test); + ++ /* Test hitting skip_insignificant_space() with number of bytes equaling resource_length. */ ++ g_test_add_data_func ("/sniffing/whitespace", ++ "type/text_html/whitespace.html => text/html", ++ do_sniffing_test); ++ + /* Test that disabling the sniffer works correctly */ + g_test_add_data_func ("/sniffing/disabled", + "/text_or_binary/home.gif", +diff --git a/tests/soup-tests.gresource.xml b/tests/soup-tests.gresource.xml +index 9c08d17..cbef1d4 100644 +--- a/tests/soup-tests.gresource.xml ++++ b/tests/soup-tests.gresource.xml +@@ -25,5 +25,6 @@ + resources/text.txt + resources/text_binary.txt + resources/tux.webp ++ resources/whitespace.html + + +-- +2.25.1 + diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-2.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-2.patch new file mode 100644 index 0000000000..5ac837f9b8 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-2784-2.patch @@ -0,0 +1,140 @@ +From c415ad0b6771992e66c70edf373566c6e247089d Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Tue, 18 Feb 2025 14:29:50 -0600 +Subject: [PATCH] sniffer: Add better coverage of skip_insignificant_space() + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c415ad0b6771992e66c70edf373566c6e247089d] +CVE: CVE-2025-2784 +Signed-off-by: Vijay Anusuri +--- + .../content-sniffer/soup-content-sniffer.c | 10 ++-- + tests/sniffing-test.c | 53 +++++++++++++++++-- + tests/soup-tests.gresource.xml | 1 - + 3 files changed, 53 insertions(+), 11 deletions(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index 648ea04..ebe8f6d 100644 +--- a/libsoup/content-sniffer/soup-content-sniffer.c ++++ b/libsoup/content-sniffer/soup-content-sniffer.c +@@ -635,8 +635,11 @@ sniff_text_or_binary (SoupContentSniffer *sniffer, GBytes *buffer) + } + + static gboolean +-skip_insignificant_space (const char *resource, int *pos, int resource_length) ++skip_insignificant_space (const char *resource, gsize *pos, gsize resource_length) + { ++ if (*pos >= resource_length) ++ return TRUE; ++ + while ((resource[*pos] == '\x09') || + (resource[*pos] == '\x20') || + (resource[*pos] == '\x0A') || +@@ -656,7 +659,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer) + gsize resource_length; + const char *resource = g_bytes_get_data (buffer, &resource_length); + resource_length = MIN (512, resource_length); +- int pos = 0; ++ gsize pos = 0; + + if (resource_length < 3) + goto text_html; +@@ -666,9 +669,6 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer) + pos = 3; + + look_for_tag: +- if (pos >= resource_length) +- goto text_html; +- + if (skip_insignificant_space (resource, &pos, resource_length)) + goto text_html; + +diff --git a/tests/sniffing-test.c b/tests/sniffing-test.c +index b542817..7857732 100644 +--- a/tests/sniffing-test.c ++++ b/tests/sniffing-test.c +@@ -342,6 +342,52 @@ test_disabled (gconstpointer data) + g_uri_unref (uri); + } + ++static const gsize MARKUP_LENGTH = strlen (""); ++ ++static void ++do_skip_whitespace_test (void) ++{ ++ SoupContentSniffer *sniffer = soup_content_sniffer_new (); ++ SoupMessage *msg = soup_message_new (SOUP_METHOD_GET, "http://example.org"); ++ const char *test_cases[] = { ++ "", ++ "$trailing_data ++ memcpy (p, "", strlen ("-->")); ++ p += strlen ("-->"); ++ if (strlen (trailing_data)) ++ memcpy (p, trailing_data, strlen (trailing_data)); ++ // Purposefully not NUL terminated. ++ ++ buffer = g_bytes_new_take (g_steal_pointer (&data), testsize); ++ content_type = soup_content_sniffer_sniff (sniffer, msg, buffer, NULL); ++ ++ g_free (content_type); ++ g_bytes_unref (buffer); ++ } ++ ++ g_object_unref (msg); ++ g_object_unref (sniffer); ++} ++ + int + main (int argc, char **argv) + { +@@ -512,16 +558,13 @@ main (int argc, char **argv) + "type/text_html; charset=UTF-8/test.html => text/html; charset=UTF-8", + do_sniffing_test); + +- /* Test hitting skip_insignificant_space() with number of bytes equaling resource_length. */ +- g_test_add_data_func ("/sniffing/whitespace", +- "type/text_html/whitespace.html => text/html", +- do_sniffing_test); +- + /* Test that disabling the sniffer works correctly */ + g_test_add_data_func ("/sniffing/disabled", + "/text_or_binary/home.gif", + test_disabled); + ++ g_test_add_func ("/sniffing/whitespace", do_skip_whitespace_test); ++ + ret = g_test_run (); + + g_uri_unref (base_uri); +diff --git a/tests/soup-tests.gresource.xml b/tests/soup-tests.gresource.xml +index cbef1d4..9c08d17 100644 +--- a/tests/soup-tests.gresource.xml ++++ b/tests/soup-tests.gresource.xml +@@ -25,6 +25,5 @@ + resources/text.txt + resources/text_binary.txt + resources/tux.webp +- resources/whitespace.html + + +-- +2.25.1 + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 87ffb34f7d..74110b21c3 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -30,6 +30,8 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32912-1.patch \ file://CVE-2025-32912-2.patch \ file://CVE-2025-32914.patch \ + file://CVE-2025-2784-1.patch \ + file://CVE-2025-2784-2.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue Jun 17 21:20:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E63E1C7115B for ; Tue, 17 Jun 2025 21:20:44 +0000 (UTC) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web11.31413.1750195243317482742 for ; Tue, 17 Jun 2025 14:20:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=gcTB8dwC; spf=softfail (domain: sakoman.com, ip: 209.85.210.172, mailfrom: steve@sakoman.com) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-74801bc6dc5so90694b3a.1 for ; Tue, 17 Jun 2025 14:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195242; x=1750800042; 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; bh=1xHJgeJBLcA7rxzFlMUMR0h2zZzR9XwSFDVDWq4eQX4=; b=gcTB8dwCHFpF5IjQUhWqkpHunEbc7/1Uyg+GbIoJhqV6DMGID3CsAYHsWnt0E9b8wh fQqC6gYsLCFe6qaQXfDfWDKHIzS8GSlBpee8zCbDTii4RCnWpsXykoiQ8FAWl/+UFFOh EfxhCCCm7cgrGZCl9+RmB+HVuYSd3HeGUDcXzIludPrJVZHF+WRfCcwDbPs6ZkVXOTka eIxpW4z+aMqRIGU4Y+DGemEDHxtULHSLFalkEQor9Ma9dWM4V9omRdEvW8XO4TjmUMPw g2xDjR3CNW+IWfWXfphI9sz0OTsc4Mkc6EbCX1LlJX97iBplUCdR6j4mRz4SrRAeJGdF JVzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195242; x=1750800042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1xHJgeJBLcA7rxzFlMUMR0h2zZzR9XwSFDVDWq4eQX4=; b=bVMTGCk8VyJaBlQYzoC7t0Gx5luml8s2tiNY22bVrgaC2Ag39l1WZcPwhXaweHiKVx HMq8zsLSsHVWLroq25peOHm/l+INyAA23RknQboRJu8E7pPTQeCeaAbSRuLRJxPRNH8g H5RlshDvHF3/sYdvOIkuRsSY0kXkqXThhJdsyOS3h731peHXt/s7f01/uqt553FolG0k Jc9hfydQxpFgTMOEI2stTL5q6PKsSNcShdlkhI05dlhlQWmbbhQOD9DS4i8+hSVYBrLj R/DpvNGez2nn830C1qYM4b5KWCmrtCHLGw44yttv/gr+icFjXAAAMJWSQttIoWapqBO7 BMDQ== X-Gm-Message-State: AOJu0YzVOX/AGeA9RMsnN4LmHha5o2r927dOwWgcymFNr3NO8zBXSneZ Wup+EzKwdPSGdUrq+rAuG0d0TbvaIhs8t19TAjgex+jCeTjaqEPVbaEarY0iZVpYj9aOuD7uQg5 1XUbO X-Gm-Gg: ASbGncvcBm3k5tcQAtc+8zJmkie6R6E7cJSBkHCXlKbnV4zyxb7NoKGJN6mS+6qjTMD N4IidegxLd//bEW8nrLdhmxk5qjUJUmFm9sZkuwF3F03hYc5SHHsyy+GTQRL8w3BFwZQgWEOXuO aX4ikT3csK3m6mCUX+c9WWRnHGU1qYa9L4yXSA4UQPW7+iNAe9K1pkh/8Ct34CIMrqM0J1DtTTY ycQdqh86uDOwIQqk9yZqGmC3yP8jcBV5Wq9eHFWlxlXinXifJdMFTr4kShgtjSdyeYlconlo7h4 IfGaNX/j0Hv6Wwv3fEonithWfrnH1rKEUGZ04vMqiDSRhaDLQTV3oA== X-Google-Smtp-Source: AGHT+IE9LcEuOfD7gPr+lYZJqGDUgw3JdRNkPCaOowuZEFQKrpXtt+Kyj3r4Qn/VENy+R1eEDAVyJQ== X-Received: by 2002:a05:6a00:4646:b0:742:b9d2:dc8f with SMTP id d2e1a72fcca58-748e6ec3c9emr125073b3a.1.1750195242446; Tue, 17 Jun 2025 14:20:42 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:42 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 06/27] libsoup-2.4: Fix CVE-2025-32050 Date: Tue, 17 Jun 2025 14:20:03 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218923 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/9bb0a55de55c6940ced811a64fbca82fe93a9323] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup-2.4/CVE-2025-32050.patch | 28 +++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.2.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32050.patch diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32050.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32050.patch new file mode 100644 index 0000000000..474eb465a6 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32050.patch @@ -0,0 +1,28 @@ +From 9bb0a55de55c6940ced811a64fbca82fe93a9323 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Mon, 28 Oct 2024 12:29:48 -0500 +Subject: [PATCH] Fix using int instead of size_t for strcspn return + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/9bb0a55de55c6940ced811a64fbca82fe93a9323] +CVE: CVE-2025-32050 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-headers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c +index 613e1905..a5f7a7f6 100644 +--- a/libsoup/soup-headers.c ++++ b/libsoup/soup-headers.c +@@ -907,7 +907,7 @@ append_param_quoted (GString *string, + const char *name, + const char *value) + { +- int len; ++ gsize len; + + g_string_append (string, name); + g_string_append (string, "=\""); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb index 5e8a141dc5..6b227b0503 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb @@ -34,6 +34,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32914.patch \ file://CVE-2025-2784-1.patch \ file://CVE-2025-2784-2.patch \ + file://CVE-2025-32050.patch \ " SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" From patchwork Tue Jun 17 21:20:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0E13C7115A for ; Tue, 17 Jun 2025 21:20:54 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web10.31262.1750195245024283719 for ; Tue, 17 Jun 2025 14:20:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=DRTMrzt0; spf=softfail (domain: sakoman.com, ip: 209.85.210.170, mailfrom: steve@sakoman.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-748a42f718aso2796988b3a.2 for ; Tue, 17 Jun 2025 14:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195244; x=1750800044; 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; bh=htTGQvFlU7jGn9ZNY9siIe54thRdRRlsHHZAK7LJOBk=; b=DRTMrzt03e0s2NExXLNj45F+U/UE5QYYS3hVyJKCFXtOc5QlFHoGpkgjbwbwDOeacW uoA191g1wEJCxY07hrJrYlPYLHXTRVF5aYAUc3dhc/oWNsb2+UgZieU39fUi57MOfUdo Ef7Zan4jmMfPIv+OmlMoaORvlfdYJEYf54+qca//o/yMnkks8aq3jMHIZcG3pRRLwo6v 7E0VqrVknf8WzZfGBwwLHXKLTu+Mos08U4RO9+fXzD+5X0jWrZKqDjjaNP3YebOvB3ei VqdYmhai+rNr645CRb64Zrz04SvGgjVXhziN6YCipUw4XrX4DshkGBr+5lHxvV0mQ/ui HivA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195244; x=1750800044; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=htTGQvFlU7jGn9ZNY9siIe54thRdRRlsHHZAK7LJOBk=; b=X088Cki5x/73rOTWFmh3lvQfWf5TAiabdjmqP46BK3c9RkLVwcGgmTZZdK6ajf09cT Y5Pr2wqSeEQAdHl1CcyPig8U8RNsjp4KdGVTLwo0jq6VEIJ/XkNxGm4DPgh+dpnoLxH5 MwHbftVApX3Reg/TOd9Jw8qMVtqKKduZGXhmge7stSfSURv0Wnz3ASLmy/UYWZI37dRJ o+OhbZ5Cfo+USBI8XcoZEFgfVpuM16DyOCNAndnBOwgeVITojSXfm4sjL5b4B1yZDrKB S6pzJtvWSsNGpWAJ8ZwWqK3TvZQgJWe9SVaq+Yp2XsAG7cInYpsNzkl5peJjS3mp+fpE 1UPw== X-Gm-Message-State: AOJu0YzyTlu12WI/uqWicBCjV8igNrKD3mIbXT6/wacS+FgN2tGs7/UM TIZJnfiWoLEZ/+NDlNo/BNOKkc6j+kwIxIndJFMHg/q+s36HBcaHXm1n0Blrr3bZTG16mXDFVGt 9KiDw X-Gm-Gg: ASbGncugIkYQMMvaG5NBbhvIYpn4myeiQvZFsEfuRQBENn94JGviqEdHJau2sFQ8n+6 8/AOuFT7wKl6ssbRZI0CxqAC5HoVwBVhjXGzmrXZNdykUGzIIQkJG5aZKMqPq5h24lmy0jTsrGw K1gp8sNxm3LcvqYHqklo7Fa4PJwp/BnhdiL8ktMjUI6bDofagSxInUBqnywe15jcuBzCG6+c+A7 qVJAOqeZ8LEqKFV1yjr8GLJUMA+aejEbBxmHwkRbVl+JTp8CDGS8nRO0pG0Q0tUvlQ2PV+aQYDY X+mPmt7gh43Ps+5XAe9xiXn96N4hBl6G5JC8XhQp57SarRNEh0hLZvTn/nMWdpPc X-Google-Smtp-Source: AGHT+IGMgZ1B1SKy89VcPBscvA5uEXkBCCu+vMdSTh5zfil+6f1WefZZk14W5cqFpXKqO1OoZY3zNg== X-Received: by 2002:a05:6a00:3990:b0:746:26fe:8cdf with SMTP id d2e1a72fcca58-7489cf72666mr20806273b3a.7.1750195244137; Tue, 17 Jun 2025 14:20:44 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:43 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 07/27] libsoup: Fix CVE-2025-32050 Date: Tue, 17 Jun 2025 14:20:04 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218924 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/9bb0a55de55c6940ced811a64fbca82fe93a9323] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup/CVE-2025-32050.patch | 28 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32050.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32050.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32050.patch new file mode 100644 index 0000000000..474eb465a6 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32050.patch @@ -0,0 +1,28 @@ +From 9bb0a55de55c6940ced811a64fbca82fe93a9323 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Mon, 28 Oct 2024 12:29:48 -0500 +Subject: [PATCH] Fix using int instead of size_t for strcspn return + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/9bb0a55de55c6940ced811a64fbca82fe93a9323] +CVE: CVE-2025-32050 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-headers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c +index 613e1905..a5f7a7f6 100644 +--- a/libsoup/soup-headers.c ++++ b/libsoup/soup-headers.c +@@ -907,7 +907,7 @@ append_param_quoted (GString *string, + const char *name, + const char *value) + { +- int len; ++ gsize len; + + g_string_append (string, name); + g_string_append (string, "=\""); +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 74110b21c3..27aab1468f 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -32,6 +32,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32914.patch \ file://CVE-2025-2784-1.patch \ file://CVE-2025-2784-2.patch \ + file://CVE-2025-32050.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue Jun 17 21:20:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65174 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0DD8C71157 for ; Tue, 17 Jun 2025 21:20:54 +0000 (UTC) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by mx.groups.io with SMTP id smtpd.web10.31263.1750195246528255317 for ; Tue, 17 Jun 2025 14:20:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=bN285Zfj; spf=softfail (domain: sakoman.com, ip: 209.85.210.173, mailfrom: steve@sakoman.com) Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-74877ac9d42so3880291b3a.1 for ; Tue, 17 Jun 2025 14:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195246; x=1750800046; 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; bh=LN+jkE6gbryzGPNXj9CiWETmKlz1SpTaPplLQc5H3JI=; b=bN285Zfj125zjpb2MinMgl0pBgm+YBOd3PJbbMwZsvrFtmjv/7zGNpO70bjJBzGHJR n1TXg/MmOD79zgck1CPNqti1f3ACIDa7/LTjAUFVe1ez/dQFhCM3DnbQB5cAvDoS1gL3 dNClN1CIZL9KtdGTb+cKY5G7LYqTwyLFooSn5F8wt+FJbmY05sWWAiHyDQmiOG9tyG62 HzaPX/xZ5QPsPiJfVAvkbrmbKkw2llaQcbxY1B+THkBdDgg1AxLrTnldiOtzh5IYlsEi BCclMgZxMdomqWqtif6uiFN6lnkoWCIxq3yDP1JuIRwIdjpVjstAPVaIiFC5sMQCsMf1 t+EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195246; x=1750800046; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LN+jkE6gbryzGPNXj9CiWETmKlz1SpTaPplLQc5H3JI=; b=fH4L2EwWFu1jfGVzAFTDhf3hZIngyrjO92bnmQD7Mka5KF7Hiy7eWwWsI1BBqkqcNc lYyvJlbjtqi09spHKCcI3geozyvIzKuchhwf6TbneCgJzdQi4yC1lsKia/vwDFZyXAuF cPndaoTWO1TIzEtJXnMRb3Wm0G5ksPPI4MF+/w1qa5LwO10ZUZkCOOOpZJTQtfSaoihJ 2/whJtJ59yYrQP3z2TogBynZ3YPr3ek6SFgP30Q1ihXyzTnUe4vySdRRABjwyv1wBO2Q As4xI0U5rGCPLSb/sR6eDw3I8hweRQa+9OqgS7YT2iDQW1eWLRwfjVqxL2/Do2nEucMR hFjQ== X-Gm-Message-State: AOJu0YwLo7Ifk5FXs1DNtSqs9CEBrE4o5f7Lbfu2Szgq3fo2CiLuBES4 asj9SpmzgHlfAdxQbydNv8CfRA0s3inIjUcZF9qaQl14Lr03miVBn+/4aoUT9fkAL4kW9CfhA/L /HCTA X-Gm-Gg: ASbGncuxdQudQW0B3eHCSWaeADzna9FW0DkF2XyRv5vZl7O9ztD+SzcKgzz15pcsSgm TGPr9E39NkRCwLBAT3dft/qYb/DyrjXU7rRut/Imnru+bhtoziF+gXcUDU2R5kZsTeZ4Kq62kHC pwps9aM8rp5ZROq/LJTGajzjbhpa9E15bXoocbiHwvBFXAXeJsBzijR/UPwN3OU0VwHGufMZBOx gR0m+GwOOx2FuZ+f3zKp7zzPhi+6Z3CHQjNZWymoZpNd5LKU+SMz5KPNfSZPQAFJna1ns1PrCqw OVvoxtg2uykjAU4T7d5US7BSwTaImlTolAGGtcuoYVZZN03s67ddrg== X-Google-Smtp-Source: AGHT+IGLnNvVXVcYbNTJVemjZQY5Nc+HRAUa9Z0IlBcE+5sEfP7XOqvbXHOw5rR+HNiMOtvUBc54Hw== X-Received: by 2002:a05:6a00:a86:b0:748:2cbb:be45 with SMTP id d2e1a72fcca58-7489cfd5e2amr16878046b3a.15.1750195245721; Tue, 17 Jun 2025 14:20:45 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 08/27] libsoup-2.4: Fix CVE-2025-32052 Date: Tue, 17 Jun 2025 14:20:05 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218925 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f182429e5b1fc034050510da20c93256c4fa9652] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup-2.4/CVE-2025-32052.patch | 30 +++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.2.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32052.patch diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32052.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32052.patch new file mode 100644 index 0000000000..152b70fd9d --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32052.patch @@ -0,0 +1,30 @@ +From f182429e5b1fc034050510da20c93256c4fa9652 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Sat, 16 Nov 2024 12:07:30 -0600 +Subject: [PATCH] Fix heap buffer overflow in soup_content_sniffer_sniff + +Co-Author: Ar Jun + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f182429e5b1fc034050510da20c93256c4fa9652] +CVE: CVE-2025-32052 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index de0985eac..b62e48889 100644 +--- a/libsoup/soup-content-sniffer.c ++++ b/libsoup/soup-content-sniffer.c +@@ -524,7 +524,7 @@ sniff_unknown (SoupContentSniffer *sniffer, GBytes *buffer, + guint index_pattern = 0; + gboolean skip_row = FALSE; + +- while ((index_stream < resource_length) && ++ while ((index_stream < resource_length - 1) && + (index_pattern <= type_row->pattern_length)) { + /* Skip insignificant white space ("WS" in the spec) */ + if (type_row->pattern[index_pattern] == ' ') { +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb index 6b227b0503..f9358773e4 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb @@ -35,6 +35,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-2784-1.patch \ file://CVE-2025-2784-2.patch \ file://CVE-2025-32050.patch \ + file://CVE-2025-32052.patch \ " SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" From patchwork Tue Jun 17 21:20:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65178 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE7FFC7115B for ; Tue, 17 Jun 2025 21:20:54 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web11.31416.1750195248116790568 for ; Tue, 17 Jun 2025 14:20:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=tWYq88Lf; spf=softfail (domain: sakoman.com, ip: 209.85.210.169, mailfrom: steve@sakoman.com) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-748e63d4b05so43091b3a.2 for ; Tue, 17 Jun 2025 14:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195247; x=1750800047; 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; bh=vL17hYzMkC1jVNUju5pERinJecamZ/+ZyFPSDrpX1YE=; b=tWYq88Lfbi7rLh5ffgxeLuzo1QGCQv1ii4hjjCF/KL7AUdq+1cu/6ed3syOoAeDueZ pTid6fRycujrnb/unrqfo/VIn17TcKY/mPZJ0aNkMSRBn3mCxzHfpIpz5AebGQX+uEBU MTok9erMEpKarv0Ahri76bmIpWQr4G5ux9aMmNyvIZsA7hIPN86w5nNKp7J0OOGO6BsO +BFmWquHitwbhf66tZotdoiFRDYlx8Zo09U5zIYy4ThMba5N0UWR2xjLRqBEYVGi64O1 33zgQ1y0+ugXV1zM1UbM5Ae25Ky4M7afE0udgMo89kbFlzhf80yf5ihbe0e1gApKmDqj F0LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195247; x=1750800047; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vL17hYzMkC1jVNUju5pERinJecamZ/+ZyFPSDrpX1YE=; b=bJfildfT84lL4yNEEs1xj3tTVEwDEQ94jF7gNLFQHInFCMRpk/F1yUI2LFLh4GdfZv 4F9VWYLr4ABrGakstZ3xLDI3PZytiXz++L8q9VNttMAdk4E89qpPBy6Ved1wd3AeJd70 ig2TlIGhiMbZ/pXSGxOZN8WQRJtaxOzjposUnsFlSmbVjProPDR9azOzUzHAqL8geEOD U3iHsJXWtLq6rMlJZIxUdlg8kS6+PK/thwLkDIgyA6fKszTxzNhK49BAIPWQPCPJcJzA Ov8WeT6fAki2o9SzpJus3ubHg9+KYOorbOTxzas44UFcfLSRYAOGm1BbJ2YhOAQdDVk2 j0Zw== X-Gm-Message-State: AOJu0Yxhuy6OBAYmvxjgJsqcibUWdqjJ3LyFhBYnIAdPk98s69UqgZK9 QTTacUJ8J5LBkba8o7kGowOZA2sQ6F2Sc8RfBwcMHIDMYBj3ofEfF9JXzIVrrn0RKUiDpEqUVY1 It/fi X-Gm-Gg: ASbGncvrJloKOyEJ3UIYDcsPbirm8W96WklG0YXw0vhw+5uC3pAfNJuv5NnhYhzTf5A 43nqQA4lSQ+Qyrxr+zv510UeOQAlCSSOInI3fHfcI/z8C8Q4raeuCxZdEDWu22s8hDUXv7Kt0uG 7rzOpVQ4QnV85izaW3SAubdUnjKS4mgnzXj59zZveci+Rf9Kg5TT9u0PqCF5tII0Ggyr9iyxdVL zkkQcngfJgYHzNtOlqYNwugPesIiOObWKascKm8TNgsQGuGWHGYBw+YCMP+kdPfvtuu669T8L2E YOl/4NPNANvjzrfo4mjVF4bTpoc1yx0X+8T3nTzPHC+x4tIk3pVk7w== X-Google-Smtp-Source: AGHT+IHUrfv75cwMxJS4SD+uCBXS1zxDH+t1qFDbbzlvf+XZug1T0LaKlRaR/H5rboDBNagcPgcCUQ== X-Received: by 2002:a05:6a00:4646:b0:748:3822:e8e0 with SMTP id d2e1a72fcca58-7489cfd5dbemr20084242b3a.13.1750195247252; Tue, 17 Jun 2025 14:20:47 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:46 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 09/27] libsoup: Fix CVE-2025-32052 Date: Tue, 17 Jun 2025 14:20:06 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218926 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f182429e5b1fc034050510da20c93256c4fa9652] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup/CVE-2025-32052.patch | 30 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32052.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32052.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32052.patch new file mode 100644 index 0000000000..fca43e24ac --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32052.patch @@ -0,0 +1,30 @@ +From f182429e5b1fc034050510da20c93256c4fa9652 Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Sat, 16 Nov 2024 12:07:30 -0600 +Subject: [PATCH] Fix heap buffer overflow in soup_content_sniffer_sniff + +Co-Author: Ar Jun + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/f182429e5b1fc034050510da20c93256c4fa9652] +CVE: CVE-2025-32052 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index de0985eac..b62e48889 100644 +--- a/libsoup/content-sniffer/soup-content-sniffer.c ++++ b/libsoup/content-sniffer/soup-content-sniffer.c +@@ -524,7 +524,7 @@ sniff_unknown (SoupContentSniffer *sniffer, GBytes *buffer, + guint index_pattern = 0; + gboolean skip_row = FALSE; + +- while ((index_stream < resource_length) && ++ while ((index_stream < resource_length - 1) && + (index_pattern <= type_row->pattern_length)) { + /* Skip insignificant white space ("WS" in the spec) */ + if (type_row->pattern[index_pattern] == ' ') { +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 27aab1468f..26fe52937b 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -33,6 +33,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-2784-1.patch \ file://CVE-2025-2784-2.patch \ file://CVE-2025-32050.patch \ + file://CVE-2025-32052.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue Jun 17 21:20:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65176 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07C84C7115D for ; Tue, 17 Jun 2025 21:20:55 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web11.31417.1750195249687947376 for ; Tue, 17 Jun 2025 14:20:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=czAG7Qu/; spf=softfail (domain: sakoman.com, ip: 209.85.210.174, mailfrom: steve@sakoman.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7486ca9d396so3954591b3a.1 for ; Tue, 17 Jun 2025 14:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195249; x=1750800049; 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; bh=2p6JUAV4I48Id7z22H7SNSbW6mzNFQA669abKDeiSo0=; b=czAG7Qu/ZteIOCT0ZgVhPp1S7YA0YYUTmyJN7Ei4LPRw5yfsfyE6Fk7wBrRYZU5rW9 N2OVwIruBKDjbtPS7EJq2EVDE6bVL3M6ex/Yb8gaAJEc9rACatUEjaX0ZX43WE8c9pJ9 T/kpa9+A1j1IVXVxMArOGZa9CDH5OM402NVUDEpN2b+PQemDx05HIR5v5JMu7mqlRQuM OVgUXPjP5hohrLG9ZJDlStaiCagbySUEj2lA8JlZjX7fqXo3aKAKjtOss/Cyl/eL4/6A fVq3Sz1FctqTGxcPj4M4m6s8l9Fea0pnz/3OSZB8BhyPoFBFFSrhIxIBSVDB+XfXEWCe qAqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195249; x=1750800049; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2p6JUAV4I48Id7z22H7SNSbW6mzNFQA669abKDeiSo0=; b=OozNX5iJ04UtqukBm5kHHlyZ0NAzDkKV1qIDi7ps2Bjsp1F6vknm5gWU8eG4MAf11b SR+fEvHlAjPrjH+mkMTXVI/FUHlog7S6KbibMGKTTtlPf3tlIjCCP/mlTCvhGqgAjJ2m dlCwBIo+8pTfhpl2+4sPowWRtvFsaoQUNcbOGEKa7/4iNPBrLtXotvsnyoQ6azWw3kyK yp047JDhW8yIKHARtYJMXTWKYKIH4O1T3KtaAzuclUulmnxCoR0nccLmvLqgiFy9RlOn OHr4qqsloG3wHQEzxitshKyTQ++ZC9+1sxrdT6QKB+lgyhc9j4qpRWW0WCojFkVaMwqL 7SGg== X-Gm-Message-State: AOJu0YyitRLxpDTohiG317AkMH/8V1LBLu85xZ0syuE8rD7aV5VPQdzl VitEmwfaWclFggxXOIzky+q+iKzWvG8IvaZbWr9xWrZDubBQQSLLPAjM430FFwEvGb/KGUwJj+X MwpHL X-Gm-Gg: ASbGncu4SkHh4rxfyZVgVoVeTVQUtGMpHh6w7oF5uoRfM+RzR3OyPAXvGNxnThvNbkW w2QtGYR0yJ9E3rIrhIHhPyLO1Bo8SeZZVYS0Jpukw8sk0YliU1lL0znrwrbgwc5dvlX2ajm2uin NYVbewvq/lH24EEjzveQ/7/ULj6AG8WPKzWyWtH0ghsCq9q1gOmeqeKIX5vKrgeWSSUGpNt8hx0 dvGFOHRkxL3BKNcCHpqMuJA0+wyhf8v3sKYVPFSFlyU0kFN5ERSSPocNBHSAFzlrsx+GtvhsloS rNdML8ZoL40bjHduNF67t07IZ0I+rMwnOnvL58Wv1Z+f62IgvQZ8ew== X-Google-Smtp-Source: AGHT+IHbEYc9VWUzblSy7SEBDIpCYe0NFtqr1MGRNP+3qvGsyyI5h0PnJXN1UmLucycoweskYqi0JA== X-Received: by 2002:a05:6a00:4602:b0:748:3849:e790 with SMTP id d2e1a72fcca58-7489ccc77c6mr19556198b3a.0.1750195248814; Tue, 17 Jun 2025 14:20:48 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:48 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 10/27] libsoup-2.4: Fix CVE-2025-32053 Date: Tue, 17 Jun 2025 14:20:07 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218927 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup-2.4/CVE-2025-32053.patch | 38 +++++++++++++++++++ .../libsoup/libsoup-2.4_2.74.2.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch new file mode 100644 index 0000000000..139e8936a0 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2025-32053.patch @@ -0,0 +1,38 @@ +From eaed42ca8d40cd9ab63764e3d63641180505f40a Mon Sep 17 00:00:00 2001 +From: Ar Jun +Date: Mon, 18 Nov 2024 14:59:51 -0600 +Subject: [PATCH] Fix heap buffer overflow in + soup-content-sniffer.c:sniff_feed_or_html() + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a] +CVE: CVE-2025-32053 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index b62e4888..5a181ff1 100644 +--- a/libsoup/soup-content-sniffer.c ++++ b/libsoup/soup-content-sniffer.c +@@ -641,7 +641,7 @@ skip_insignificant_space (const char *resource, int *pos, int resource_length) + (resource[*pos] == '\x0D')) { + *pos = *pos + 1; + +- if (*pos > resource_length) ++ if (*pos >= resource_length) + return TRUE; + } + +@@ -704,7 +704,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer) + do { + pos++; + +- if (pos > resource_length) ++ if ((pos + 1) > resource_length) + goto text_html; + } while (resource[pos] != '>'); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb index f9358773e4..61ebebeacd 100644 --- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.74.2.bb @@ -36,6 +36,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-2784-2.patch \ file://CVE-2025-32050.patch \ file://CVE-2025-32052.patch \ + file://CVE-2025-32053.patch \ " SRC_URI[sha256sum] = "f0a427656e5fe19e1df71c107e88dfa1b2e673c25c547b7823b6018b40d01159" From patchwork Tue Jun 17 21:20:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65175 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14A7AC71136 for ; Tue, 17 Jun 2025 21:20:55 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web10.31264.1750195251135318682 for ; Tue, 17 Jun 2025 14:20:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=cH8Z4UZG; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-74865da80c4so3701890b3a.3 for ; Tue, 17 Jun 2025 14:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195250; x=1750800050; 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; bh=vpZmVL+bqSiE1yWZsJ4KmqKKwHfCPy3LkItIVnX6bG0=; b=cH8Z4UZGWkNjOCfQ0NA7jUM22vWcSMrI3zxGn8GdvjqRJNqPeZQN/7M7XVyiQ3Pt+T AXbY/Mtg2jH2JeYgAUDzibHKKsoJ2c7Pstn7nbdP+jGXEn+BAn7RpUzMwIGDAzTkP0hG +Vu9TB4oRYI75j6OgzQNvLsHDaGGncvf2T0nxhL5sjX2UL4aD8dvHXMrzJ6X4PnB646l 5Y1rdIznqPWktK8FCxEfA/eUQ9Mbih/cjVBjqL+k2s0446b1eQ7wNI4VJsaXyO5sEqKg Sapuka0UbwtRKdtwRZ7yEDUGYlhCQBXbuSGTQE8yOrDqtHAIz6awlbIjzXNWnGk6nhEC Zvaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195250; x=1750800050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpZmVL+bqSiE1yWZsJ4KmqKKwHfCPy3LkItIVnX6bG0=; b=F4+Arf4j9a0Sz78/9rtFLqOu5JvKzNot6oXqCtc6OHOR/UrvOarh9fZOKoBq766KjW nm6nXa0xsgieFRHW2ZvmScP0SyROmC2d9NZnoICL3oVJmdDXfA6B9q+KvKc/n1IMGCvj U4pbgUUYCydHtQk1L9cOU8qluBZn4Y1kOJxsTKvXk0fMyfBIFRHgNlZarA475vFY46cC 5uSiP/eGX/12KllkPHHF8AuEG1dMVWec1XIxUZtnE9jaWA6Q54e4joucbXQUT0zleeSM CfAYqGozzhZlWIY48hEqm2zulCFY06oUcKQ9YdOapmPNspSVQmmHLFsVi/Sh8T9+mEti BeKA== X-Gm-Message-State: AOJu0Yw5Itta31Ng8ZjxCaMZGMU+kDLsJ/tBFX6LTaB78bOr/6CnH+7y 9B14eERzHiDEJ0D5hyAmNPNe/R1mNqdnqSY7GmweVgnw0fMzyzfsG1eud1TgRE6eFJXx7N17PkB B82fu X-Gm-Gg: ASbGncu8/YRnC71UjsuySayBGHc4XwVVsFpwn4DvBsyIuyPRn2wiiivfSKcPgZmjJPJ JdHXrXtohWCF62IeNWCx3N1LOACl4OEpAxC8ZD95trJp0NPIIAqNuK9PSZfcSdgHUcvuDjyqMIV bXeXYy95b1kGWOeueeFs1xb5kAOBv+vWIW9WWvs5tACWKrSP7GavlypuRezPc9a6eSR91KGsWup y3ktjvk515XivTcY9QCvI2SiapehX5DOHZHQyENFYAiwJPB208CebcrN1Pv/IQ0pnrFlV3pNh62 qLzcivWzli/ms7PfehyXrRwIJAzh0as7PRpO5KC+avw4taWt4D9RCA== X-Google-Smtp-Source: AGHT+IGDSxsFWXkoNneBRuswfdW4uFepp89JVMb82TNldTtUeu96x3wfzEBtR9SEWKLE/VCQKy4JCQ== X-Received: by 2002:a05:6a00:92a8:b0:742:a5f2:9c51 with SMTP id d2e1a72fcca58-7489cfeb010mr20617982b3a.16.1750195250309; Tue, 17 Jun 2025 14:20:50 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:50 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 11/27] libsoup: Fix CVE-2025-32053 Date: Tue, 17 Jun 2025 14:20:08 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218928 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup/CVE-2025-32053.patch | 38 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-32053.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-32053.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-32053.patch new file mode 100644 index 0000000000..7860526620 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-32053.patch @@ -0,0 +1,38 @@ +From eaed42ca8d40cd9ab63764e3d63641180505f40a Mon Sep 17 00:00:00 2001 +From: Ar Jun +Date: Mon, 18 Nov 2024 14:59:51 -0600 +Subject: [PATCH] Fix heap buffer overflow in + soup-content-sniffer.c:sniff_feed_or_html() + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/eaed42ca8d40cd9ab63764e3d63641180505f40a] +CVE: CVE-2025-32053 +Signed-off-by: Vijay Anusuri +--- + libsoup/content-sniffer/soup-content-sniffer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libsoup/content-sniffer/soup-content-sniffer.c b/libsoup/content-sniffer/soup-content-sniffer.c +index b62e4888..5a181ff1 100644 +--- a/libsoup/content-sniffer/soup-content-sniffer.c ++++ b/libsoup/content-sniffer/soup-content-sniffer.c +@@ -641,7 +641,7 @@ skip_insignificant_space (const char *resource, int *pos, int resource_length) + (resource[*pos] == '\x0D')) { + *pos = *pos + 1; + +- if (*pos > resource_length) ++ if (*pos >= resource_length) + return TRUE; + } + +@@ -704,7 +704,7 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, GBytes *buffer) + do { + pos++; + +- if (pos > resource_length) ++ if ((pos + 1) > resource_length) + goto text_html; + } while (resource[pos] != '>'); + +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index 26fe52937b..a90f683cb8 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -34,6 +34,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-2784-2.patch \ file://CVE-2025-32050.patch \ file://CVE-2025-32052.patch \ + file://CVE-2025-32053.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue Jun 17 21:20:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65179 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14B44C761AE for ; Tue, 17 Jun 2025 21:20:55 +0000 (UTC) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web11.31418.1750195252990195053 for ; Tue, 17 Jun 2025 14:20:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ZVGoTLCR; spf=softfail (domain: sakoman.com, ip: 209.85.210.182, mailfrom: steve@sakoman.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-742c7a52e97so5212737b3a.3 for ; Tue, 17 Jun 2025 14:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195252; x=1750800052; 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; bh=nvstm/5o0G9BqzXl+W9wNYzAj/E1MN8duX9ZRWGCQ34=; b=ZVGoTLCRd+tqrhR78vXJlIR6PZw5RLGUi0plHX/RnXUrxFLKRl1rSrj7CGKhBxl7KK ah4oJyhYjVWN/SKdoBN8WVnSBOG9N75GALXuV/zoj7WAj1ALkwC4II5k+1SHP/4V+Yye 9KrZuOjcIrzW8JEquOm9XvqlVxnt9XLAUz2LX5zjE6/PgMGmhE4oQohVBeHHhliUvs9s cHm+T2oD9QHJG6WEgA9nUA1rqB3GQ79Rd3mqFpRPiL7PShv2TKO+Vvha1CAZ+KhQd96l 5OPBUViN2UTTS82YuJUx5yHjc6HESulY0kQ+aaayB/caErx2KbW0QZb7+jwdDzshRGrU lkkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195252; x=1750800052; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nvstm/5o0G9BqzXl+W9wNYzAj/E1MN8duX9ZRWGCQ34=; b=NtHtw1XA6Mad5oUko+C01dif39OotKod7Pa4H5WD8An1TXvkWWSAUG/+XqjTuizsd+ k/5w1oHmShtenRsfypyHG3PjxR/WLIC08CYLkSqxa5qfBiXXXvVBboP7Fwtr8sJ0oaeq dFGJ9XV6sDCRFgwTRpUmwyG2SLDNiQRcsr9d+hsKKi/w+nt4F2L6WmrL9MZFe/K3xedB J8MCJJxofmSfX7DBgENthGMlflSwjBtTD/ixGx/UFFlwaccjJz43I2n4rofQidOENBG/ ylTlid5ENKt7Gr4wJaUs0TOJ6x3KNxolAfYSAWDmwU/x2Aedv0y4WGA8OipqeM5cmOcK ggkA== X-Gm-Message-State: AOJu0Yyl1clpGYPI0SbSJWbSzzPh0rcUbJsLiXKgjG5j+1J+Oo6O7t6z 9pJtdDHb2I6kZwqBgXIslB2Rsgh28iniljCOdM/fZJqitCltOFBDperpVjlBRYgr2vWW1a3ixlC Gjfoh X-Gm-Gg: ASbGncuKUKPTbatRhekU3jtN/3IHv4hMZ62IGO8oSCUfv7uXxIVAOpiZuHWA/66bmYh R8062r1EXK0/PFVpKDwT7QKdpgbU3/HLm5ePuwxAWPu2VwA0Uk9b7kKyojiCBb4GGvXfeZwrDNu QSdFNAViVGMyNWnGEI/BK+tyKmSs1BZs/RhQKLYfvZ/fHgijYPM2grNsPgotBlxAlIPS7atdN3S z535Snpw6ffgUtgKMdVzpeFEMKJHLhmUySwN6fzDWsWRhf3I1RSoJGifB3kUIX/ylUTEnc37KR2 DHwM8dkyCmn1M27SvPc7p0Fq633kVP0vX4fljWfg+Q67EQK7XNrVlg== X-Google-Smtp-Source: AGHT+IGgJ/3suuSKpoCRzujmCAEFviU2acwnq2+UE2hpgEvkinL012EeDoLAqqokQ/7Sqxp7sKYVfA== X-Received: by 2002:a05:6a00:21c1:b0:748:323f:ba21 with SMTP id d2e1a72fcca58-7489cf5c8c2mr20504024b3a.1.1750195251967; Tue, 17 Jun 2025 14:20:51 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:51 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 12/27] libsoup: Fix CVE-2025-46420 Date: Tue, 17 Jun 2025 14:20:09 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218929 From: Vijay Anusuri Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e] Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- .../libsoup/libsoup/CVE-2025-46420.patch | 60 +++++++++++++++++++ meta/recipes-support/libsoup/libsoup_3.0.7.bb | 1 + 2 files changed, 61 insertions(+) create mode 100644 meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch diff --git a/meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch b/meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch new file mode 100644 index 0000000000..dbaec12f7d --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup/CVE-2025-46420.patch @@ -0,0 +1,60 @@ +From c9083869ec2a3037e6df4bd86b45c419ba295f8e Mon Sep 17 00:00:00 2001 +From: Patrick Griffis +Date: Thu, 26 Dec 2024 18:31:42 -0600 +Subject: [PATCH] soup_header_parse_quality_list: Fix leak + +When iterating over the parsed list we now steal the allocated strings that we want and then free_full the list which may contain remaining strings. + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/c9083869ec2a3037e6df4bd86b45c419ba295f8e] +CVE: CVE-2025-46420 +Signed-off-by: Vijay Anusuri +--- + libsoup/soup-headers.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c +index a5f7a7f6..85385cea 100644 +--- a/libsoup/soup-headers.c ++++ b/libsoup/soup-headers.c +@@ -530,7 +530,7 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) + GSList *unsorted; + QualityItem *array; + GSList *sorted, *iter; +- char *item, *semi; ++ char *semi; + const char *param, *equal, *value; + double qval; + int n; +@@ -543,9 +543,8 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) + unsorted = soup_header_parse_list (header); + array = g_new0 (QualityItem, g_slist_length (unsorted)); + for (iter = unsorted, n = 0; iter; iter = iter->next) { +- item = iter->data; + qval = 1.0; +- for (semi = strchr (item, ';'); semi; semi = strchr (semi + 1, ';')) { ++ for (semi = strchr (iter->data, ';'); semi; semi = strchr (semi + 1, ';')) { + param = skip_lws (semi + 1); + if (*param != 'q') + continue; +@@ -577,15 +576,15 @@ soup_header_parse_quality_list (const char *header, GSList **unacceptable) + if (qval == 0.0) { + if (unacceptable) { + *unacceptable = g_slist_prepend (*unacceptable, +- item); ++ g_steal_pointer (&iter->data)); + } + } else { +- array[n].item = item; ++ array[n].item = g_steal_pointer (&iter->data); + array[n].qval = qval; + n++; + } + } +- g_slist_free (unsorted); ++ g_slist_free_full (unsorted, g_free); + + qsort (array, n, sizeof (QualityItem), sort_by_qval); + sorted = NULL; +-- +GitLab + diff --git a/meta/recipes-support/libsoup/libsoup_3.0.7.bb b/meta/recipes-support/libsoup/libsoup_3.0.7.bb index a90f683cb8..67aa180612 100644 --- a/meta/recipes-support/libsoup/libsoup_3.0.7.bb +++ b/meta/recipes-support/libsoup/libsoup_3.0.7.bb @@ -35,6 +35,7 @@ SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \ file://CVE-2025-32050.patch \ file://CVE-2025-32052.patch \ file://CVE-2025-32053.patch \ + file://CVE-2025-46420.patch \ " SRC_URI[sha256sum] = "ebdf90cf3599c11acbb6818a9d9e3fc9d2c68e56eb829b93962972683e1bf7c8" From patchwork Tue Jun 17 21:20:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65177 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20A43C77B73 for ; Tue, 17 Jun 2025 21:20:55 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web10.31266.1750195254546609458 for ; Tue, 17 Jun 2025 14:20:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=T5aXIZrl; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-74877ac9d42so3880369b3a.1 for ; Tue, 17 Jun 2025 14:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195254; x=1750800054; 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; bh=eHGSg8qpJVlw3moiuxMKsz+F6xBZ/WFNzgXiZWZ73oY=; b=T5aXIZrlDSrqAjJM7ClZ7l2tFlroPqMoF9jdp/SJPvPuJkKxtnJbpWXfJR+iGUGfJp Plb02pBKm7lVS1YhniwhlrG9GyipkMn/W/OhD4v/qhZTOXA6oKQ0IKZ+gIFCOdxb0HIK 0Y5Y+lJF3oXW9ixiDk2v3QXFi1sGVzGrI5888kqTu6QWdq5cwqEhWWpcLALvfh2WLgsG y20WnbA8dWBeH3GnxMf5nrBalTAVGvLk/Rts5ipQ20RVUf4Kn5g3SJpYYhmjmVM9a+iv LnBQqqGdrNWDBJK4TtT2COrGZP82+4qNmAf5mvUBtccXvGCVr2/Dn7jNpmzvA4SorjKt Rolw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195254; x=1750800054; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eHGSg8qpJVlw3moiuxMKsz+F6xBZ/WFNzgXiZWZ73oY=; b=t8SrhIjc6gqsuM3Wj7hetzAnerUKGO3ZEaBUhslbEzkVIkYkLXL67DyipDxh0hGpvp /mfmc+8VQSIiqV1OI1OzuoCwasC31zzH+L6vfwkNMBnlgh7YcQ24ue1DZew3sMHCOYUf wno4ybxVI2r32/U0FMecczz2TtUGfq//GrnLGakEl5klZNgQyrFrlx3+ZFCHPMDatTop RakIqc4Ck5R/KYEEYfOow9P97uvp4NntIIkZ467MWkawmG1h0YnQeM41gisonMQ4+icN bzu1XNPF7LwYe1EzQPd/d7ae9pQSWjnJTb6utE20LzSN19l/x7VlB6jRFifabx7E7vc8 IrMA== X-Gm-Message-State: AOJu0Yz52xJxDj0Eiql0BkcMas1xsIh3BjgZHxDNsFKgbYJnsIxRuHka TdNOZIhRK5gajs3PoIYcejPpSeo6D+6n26OUsTBfXBzzB1/bdtzlLtXupNb/NC5WAvNt1xHbIwN Olm/P X-Gm-Gg: ASbGncuoe4IbgJcJy6RMS4TfyLXoswzgfgORfGiCFGZCkjoTZljPys6/rEMEUVMoR4n 0XtdY5Eu+brQB30imvec1tTtfy3hhW2dBk+EdoyzhG5xlh1BY6hC/LcfS5ORCyRVisA8dRxC+J4 bIEzh8MjAGoGteng+z/OGQTy1coty7jdjmvo2OtIZK0+mQudKaNjqn5FKmdtDmPe1rR3vpvukq2 XvzHFQ4swMy3FQNY4MY0UhGKGgHprF7C4Ts+Um7GLaDZCu9kfttpOdgLbf8zQBmWFGTzb8f0uGj Mca9ICt64qk532mgufJX+AOhWpiShPqWIAkgh54yF2aiiB0iFdVqbQ== X-Google-Smtp-Source: AGHT+IG3tPcYdzCqTJ9Njrz4uJ7OurXoHGjbwJDUKifhATbIFlBh7AA6h5ZSL+FOqo5DZQ46DPDCRQ== X-Received: by 2002:a05:6a00:22cd:b0:740:afda:a742 with SMTP id d2e1a72fcca58-7489ccee906mr19901423b3a.0.1750195253736; Tue, 17 Jun 2025 14:20:53 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:53 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 13/27] ffmpeg: fix CVE-2025-1373 Date: Tue, 17 Jun 2025 14:20:10 -0700 Message-ID: <99cda92e387ca071c4235c14a137510a4fb481c2.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:20:55 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218930 From: Colin Pinnell McAllister CVE-2025-1373 does not appear to affect ffmpeg 5.0.3. The CVE has been added to the ignore list. Signed-off-by: Colin Pinnell McAllister Signed-off-by: Steve Sakoman --- meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb index 4ae444258f..ae257a3926 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb @@ -81,6 +81,11 @@ CVE_CHECK_IGNORE += "CVE-2024-22862" # bugfix: https://github.com/FFmpeg/FFmpeg/commit/9903ba28c28ab18dc7b7b6fb8571cc8b5caae1a6 CVE_CHECK_IGNORE += "CVE-2024-7272" +# Vulnerable code not present in any release +# introduced: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/19f7dae81ab2c19643b97da7556383ee3f721e78 +# bugfix: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/43be8d07281caca2e88bfd8ee2333633e1fb1a13 +CVE_CHECK_IGNORE += "CVE-2025-1373" + # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 ARM_INSTRUCTION_SET:armv4 = "arm" ARM_INSTRUCTION_SET:armv5 = "arm" From patchwork Tue Jun 17 21:20:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C961C7115A for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web11.31419.1750195256111333363 for ; Tue, 17 Jun 2025 14:20:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=u/NLXSmX; spf=softfail (domain: sakoman.com, ip: 209.85.210.178, mailfrom: steve@sakoman.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-747abb3cd0bso80891b3a.1 for ; Tue, 17 Jun 2025 14:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195255; x=1750800055; 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; bh=ZBjWYjfA8SItULboc/ftNmWzz5Wo1DMkEeaJQ1mC3Ek=; b=u/NLXSmXi1hpwr6joLvKPj5Sc1ANGy+2SJ7dRie3zXKECT+h8ztx84OJFrIKFH0EDv knUk+uJjPebYsFUdKNLpsFj7hyZqF9qH1negb2l9ieb94EGRWb/2reoFY4tc05dP/GfW da+5CfTC38AdzkMcYjfP0KNS2kOG2VtyfHUn5bw/nvV/8p57HjFP2S7Z6rCSSqlZ24yb 8BRKDontTBt/pQS35TlZUnoBYRt3N8sHGecg1GhG0xHD8kesMPTcwAkffLyBtTD+t/E/ dYgAeZLDChoVD526gicJQeIhcDWDVfhssks/bgM7KwSGZz+up6bNqE7B23XvG0vY1jAL UDbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195255; x=1750800055; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZBjWYjfA8SItULboc/ftNmWzz5Wo1DMkEeaJQ1mC3Ek=; b=YA402H7gOutRecBb8OXN0PsvFFrIFfOiu/MJTh34/H40BTqG1cZXSq0oznfIDXwuWl amGYd1U1jMwp/FqgB84kQJgTqN/BYWsnkzPbSLErw2aZXq4N9efVxcR7fj4Nrio19uBf TH20rNZbd/Y77UfykhLWSAqSkVRQIogAPWqI0JbodRrEeQvRo3ph0LJRiuiB04bYaazv HyaaaJvjacoPgwRNZu/O3do2GpOFqeNxARcdFZEM609LjmP2fsP/Z8Ph3w0b1g0kVQ6l oiBL36r89YuCHwGo4mT9bH6e0tbTi29AOzqyVHwQe32KbWv9HwRx4bqTd1WmTgTvXkjV 4Xbg== X-Gm-Message-State: AOJu0YyREEa/QEw3W0+wpTQIS7w6uV0v+jiCOciVTwAc0SE/NDDDab8s LYiBRPdip5Ffv6HFJsEhy1cTgzKgOzvWw+eMsfnx0DKlQmesfPDDj0aKidfMD+ihwrfEDL4MKUX 1VZU3 X-Gm-Gg: ASbGncts8Sd/6Bmm5GGfeqVhv4bGU/tpBFjDLcsbvArVsx/9qwJErI3BEwqoGL9a+A7 EuC53/S6IEcjCaFNiBMZiAAQkW3esjukoQzMRX06jK+2SWJM78Kr2UjkDmobCBR/YVsxmJdqfCn L4Ci2eFZqRzxeUbbLASpJ2p063Bfs53n81xcvAbQ713DJ+mBLcHTfBwI090amhFr+K8AtVihPas EUjBLkT5wOjJ2J37ssDd2OD6dNORj3F4YNBSXecft4k77y6W6CWFnSh+9T+1cb85OOi0tyCmUki 0EP7CpjX5IkILTvUtwWNQavXqmntGQ7FaegES2dGIovduCGrPvdwMg== X-Google-Smtp-Source: AGHT+IEYEuQoQvDQ0M+vJ4sL4IG4rHgZj2OXs6bMbsmfSTyR84rdVvHR1cz9AT1ffuKdELIxWj3Upw== X-Received: by 2002:a05:6a00:7596:b0:742:b928:59cb with SMTP id d2e1a72fcca58-748e6fcd4a7mr135773b3a.7.1750195255281; Tue, 17 Jun 2025 14:20:55 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:54 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 14/27] ffmpeg: Add "libswresample libavcodec" to CVE_PRODUCT Date: Tue, 17 Jun 2025 14:20:11 -0700 Message-ID: <34df694e0cdf4c1e3dfc99502a9e615b8c802cdb.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218931 From: aszh07 Currently, CVE_PRODUCT only detects vulnerabilities where the product is "ffmpeg". However, there are also vulnerabilities where the product is "libswresample", and "libavcodec" as shown below. https://app.opencve.io/vendors/?vendor=ffmpeg Therefore, add "libswresample libavcodec" to CVE_PRODUCT to detect vulnerabilities where the product is "libswresample libavcodec" as well. (From OE-Core rev: 9684eba5c543de229108008e29afd1dd021a9799) Signed-off-by: aszh07 Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie Signed-off-by: Naman Jain Signed-off-by: Steve Sakoman --- meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb index ae257a3926..dcdb65d2eb 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.3.bb @@ -233,3 +233,5 @@ INSANE_SKIP:${MLPREFIX}libavutil = "textrel" INSANE_SKIP:${MLPREFIX}libswscale = "textrel" INSANE_SKIP:${MLPREFIX}libswresample = "textrel" INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" + +CVE_PRODUCT = "ffmpeg libswresample libavcodec" From patchwork Tue Jun 17 21:20:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65180 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C914C71157 for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.31268.1750195257790160473 for ; Tue, 17 Jun 2025 14:20:57 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=FwkOy6Cr; spf=softfail (domain: sakoman.com, ip: 209.85.215.179, mailfrom: steve@sakoman.com) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-b2fd091f826so92590a12.1 for ; Tue, 17 Jun 2025 14:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195257; x=1750800057; 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; bh=kL3C/qPUVYRQf5/mJd9T4tVhWdAcgbu28NrV9yERV+s=; b=FwkOy6Cry08amw9FvEP3lenygXkodjyv991t5FIeu4/av/Ra8wuexfRdfb0fwEu3nv OH5nDeR9X4XZi2Uk08fE3LYObi1orOkUlUGYIaZVvlITACLZcsJz5kyJnQij/KBLPpTs tyK4KUVOlfgUI1R84sNZSC/DzpLAux28C+33Kuj72QpgrebiTDGi1B2Igu/QvPAirE99 HrI0CVjdNR8+oYvVM0BeNOyDpymIZ3g9+tzPH1l2SRGCVAtyZ+fpQVl3QVe4Dcesj6vm MfF9n4Wnkxof4ypMa/ahv+dMnlY6m2QayIE0j8fkv+sh2K75Yor84T+dcolCMcIqZuMh q2Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195257; x=1750800057; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kL3C/qPUVYRQf5/mJd9T4tVhWdAcgbu28NrV9yERV+s=; b=tkJDInapS+c7IgyxJ9jU1mpdVtGsM/JTK8Pv/q3CMjvLStof++IRHOpML5je2KK0Lh JLwnpUFCePq6eeV+L7c7GuOmyPOw4TcUobCrcvWanWgmv5OZ8VkB5QKfKqNZeGOMrJoC ZQQNsO0EvwdXv8DgSQpjAZ3TgTprUieUwVCEsw4FMpLSD7f9fSdBpox6150fry3U1vaJ 0Q4SGiQkQ3gd9mMjlIPjOmhfD5HTfd34Bb9Y+UvBIkHiFjy4Bacyif+jBbPAxbuk484H ip14lAI2SrFCdpOkyW6Cj2HT/EZXlt8MbV8OAv5wJT8S4rVDteKADwN5Zalo4DbYKOvs xHpA== X-Gm-Message-State: AOJu0Yx630+1+rlVBYf/qCATHVMqEkWjc1WG+sBqLPJRNdB6iv1KJpQw aYaiTGV9bgVmxfU33Yb2jZZdxXXhpyzG48PB/5MR6+xHACWegCYIbA+LMDd+xJcP7YS3K+llY7p TXgiB X-Gm-Gg: ASbGncuBf8a5A5cbphU1kw38ypD5IfiRAekSzFJD7Kscx/hChAIlp35cp5Riu9f9Bbl BBbDb+7EruF7U0mLGcai+lBOP9yEX5sbJ3QTzFRohnSyPvhXfA9l88a4TBbFhK9qHR7/G1AEl3g kxbWlZtL812KbZdoROo7Ds6Hv5iT5gB5g7OLgLauY+D6uDECmiVdyKlcaglMK7/J0LbJa8goYYh VZG78d3iUSFiuJSSS+pJ5P30NngNzr9B4ZL54QF6/M6oyQwdOJtsusu7dBYsQ5acgWJL5HFAOLN iwY3JpGVIIOvxLlKdPJpnrC2FhdrDMf33sjdCVNBKpsz/cRWqZZ+fQ== X-Google-Smtp-Source: AGHT+IEUUWo8k9yyxKcJzs+b8PdnvhkoNmDIzCxuy52+6SICPvpeY4KGAIF928zSBA/uILto9lNkGA== X-Received: by 2002:a05:6300:67ca:b0:21f:7497:9f93 with SMTP id adf61e73a8af0-2200364a74bmr205827637.4.1750195256913; Tue, 17 Jun 2025 14:20:56 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:56 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 15/27] scripts/install-buildtools: Update to 4.0.27 Date: Tue, 17 Jun 2025 14:20:12 -0700 Message-ID: <9277fae3c81a269994faa6ba6f6c9bdfc74e11bd.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218932 From: Aleksandar Nikolic Update to the 4.0.27 release of the 4.0.27 series for buildtools Signed-off-by: Aleksandar Nikolic Signed-off-by: Steve Sakoman --- scripts/install-buildtools | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install-buildtools b/scripts/install-buildtools index 8e55bd69c8..cf75d84630 100755 --- a/scripts/install-buildtools +++ b/scripts/install-buildtools @@ -57,8 +57,8 @@ logger = scriptutils.logger_create(PROGNAME, stream=sys.stdout) DEFAULT_INSTALL_DIR = os.path.join(os.path.split(scripts_path)[0],'buildtools') DEFAULT_BASE_URL = 'https://downloads.yoctoproject.org/releases/yocto' -DEFAULT_RELEASE = 'yocto-4.0.26' -DEFAULT_INSTALLER_VERSION = '4.0.26' +DEFAULT_RELEASE = 'yocto-4.0.27' +DEFAULT_INSTALLER_VERSION = '4.0.27' DEFAULT_BUILDDATE = '202110XX' # Python version sanity check From patchwork Tue Jun 17 21:20:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29B88C7115B for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web11.31420.1750195259432250870 for ; Tue, 17 Jun 2025 14:20:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=KsuDjZfu; spf=softfail (domain: sakoman.com, ip: 209.85.210.169, mailfrom: steve@sakoman.com) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-748435ce7cdso5284728b3a.1 for ; Tue, 17 Jun 2025 14:20:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195259; x=1750800059; 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; bh=9Q1G1hunavYzFZ2EnsmNhTxSQpof6nHE82P4BafI0zc=; b=KsuDjZfu+58INSsfpOhqlxooegh2UcqVhb9U4ZGUTNNP9nh4tu7KAOdCl+9Zqlz5iU 8wht9sq/FzKV41C5OnRtOoyF8A3YBIgwlFGgFD0dGkA4Bdl8AvqnCLH+yPfsvGOOIpuT lYhvN2kboOdtIV3a5aTuYBbvpQl0j9UWuoJCFB8skOwkKz+G6rzIDiQDkBTMmJ2NTpWE zVT6KbzoqNAB/u0Iqyn9Dl4czWljShB1XTCyyIkZVVhnovvvrE12TS6WN5DJXJJ7/8ir Isfrkn8BjAHXtVrILtkciCfEgdiBYxFj5TuLwy11i5jQlepEFARGrflqSJdfeNI05geg aBzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195259; x=1750800059; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Q1G1hunavYzFZ2EnsmNhTxSQpof6nHE82P4BafI0zc=; b=JkAundWMjPDNcili8FANt8y+8KwRgL8H89WdGd2hz83NvRJeVqHm2AICoJ3PJnLX77 6l5s+KtAFzX/r4RUHhHAgc+uKpt611OzsPY7pY4fAjd3PVXsl88prw84UVSSdWYmvc1+ wnhvpK3Ak3vk4T9HVfYh49fXlVDAASlLVOTwXMhc9kxDQWjrNLiEbA03nBVWplVQsPxp yl2AxbCJmh4qNegzo9WFVrwDP8bMRrZkW2WwSoK3QQJMkGM/O0b+AD2FrTsD50hYZ2LB 80trh9B7nNUaRPUh6+h6r5UJqGMfClpJkT/CXO8HxuSUKyx/2Uw+15uMoImut31+39/g U8Xg== X-Gm-Message-State: AOJu0Yyd6oC/yvarhmPrTwvIWyEXAEMcc7ZjfF/kq3uRdrdPWUEo4fFB XuThcmBGVs94MBYJ6ckcrkXiaF5kPbffchETflxndjEoSE9GZfbXkLYnUyvB6N0gBEI9IVy6Ds1 Gdkqd X-Gm-Gg: ASbGncsfJ57rH9AQTtk1xAvwA1Har3QIiz/lrpZhOHKvjVyu2hzErgivxngL/gWEFcV Qyses5w5gWIVMEgIVzocGgrHDRs7fA3nztv5NS0YanauCpV+M0P3SyxRKOhV3R28bn8nanl7B/X 9LXpZdArsrUQpsjVUGn0CxGqkPWlD4bIKrQ8TbIEPOO3rHTMbzy9/OBhUMs5uVE1YyMx9rXD54a B9lMkwMiTG3gFmUAR78fjYLqOopGoiU2Jn0kyQXcHX2NRm/UWx+IDGMZHan4tf6RpwI6+w0o2TM x38bWMQXo9H0bHPvDuJ7MizXOv2aKm6UAbhhK0ZiOWHcrSmB/kbK2VMSyvt4HaQp X-Google-Smtp-Source: AGHT+IFTOurVf76M9P2x8I/P9QNYZeWFgnyv4m/yQSBrWmXge5Fr8W8VR4U43ZzgjE3Az5rIYlzPwQ== X-Received: by 2002:a05:6a00:4646:b0:740:aa33:c6f8 with SMTP id d2e1a72fcca58-7489ce314f7mr20660604b3a.7.1750195258690; Tue, 17 Jun 2025 14:20:58 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:58 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 16/27] babeltrace/libatomic-ops: correct the SRC_URI Date: Tue, 17 Jun 2025 14:20:13 -0700 Message-ID: <94d24ff01573dc1d65078c92150dc252b3e9b145.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218933 From: Guocai He The old SRC_URIs are not available and need to update. Signed-off-by: Guocai He Signed-off-by: Steve Sakoman --- meta/recipes-kernel/lttng/babeltrace_1.5.11.bb | 2 +- meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-kernel/lttng/babeltrace_1.5.11.bb b/meta/recipes-kernel/lttng/babeltrace_1.5.11.bb index 8e2fe4164d..0e93207139 100644 --- a/meta/recipes-kernel/lttng/babeltrace_1.5.11.bb +++ b/meta/recipes-kernel/lttng/babeltrace_1.5.11.bb @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa" DEPENDS = "glib-2.0 util-linux popt bison-native flex-native" -SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.5 \ +SRC_URI = "git://git.efficios.com/babeltrace.git;protocol=https;branch=stable-1.5 \ file://run-ptest \ " SRCREV = "91c00f70884887ff5c4849a8e3d47e311a22ba9d" diff --git a/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb index fad92df507..69d8a266f6 100644 --- a/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb +++ b/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.14.bb @@ -8,8 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://doc/LICENSING.txt;md5=dfc50c7cea7b66935844587a0f7389e7 \ " -SRC_URI = "https://github.com/ivmai/libatomic_ops/releases/download/v${PV}/libatomic_ops-${PV}.tar.gz" -UPSTREAM_CHECK_URI = "https://github.com/ivmai/libatomic_ops/releases" +SRC_URI = "https://github.com/bdwgc/libatomic_ops/releases/download/v${PV}/libatomic_ops-${PV}.tar.gz" +UPSTREAM_CHECK_URI = "https://github.com/bdwgc/libatomic_ops/releases" SRC_URI[sha256sum] = "390f244d424714735b7050d056567615b3b8f29008a663c262fb548f1802d292" From patchwork Tue Jun 17 21:20:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30DA7C7115D for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web11.31422.1750195261177065573 for ; Tue, 17 Jun 2025 14:21:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=QG5F2P/c; spf=softfail (domain: sakoman.com, ip: 209.85.210.177, mailfrom: steve@sakoman.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-748e378ba4fso392256b3a.1 for ; Tue, 17 Jun 2025 14:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195260; x=1750800060; 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; bh=776AGtm1GUAsf2d8a4E/DtcHPM1G3jvwfP/nT02CJvg=; b=QG5F2P/cEt65aeFCe+Pa/4Dvs+ygBHju4iDQw5mqqSPuk5R/tOPbA/zqqHUi6f27uv wMGYHIUE1REnG1cO1TkamDsT2BOk2E1vdfHi1P0yuAu7YIbJ8wSKOqtw5mZi8k+UkUhE 9EtvamgWVNxhUCQ+ZhDFYVHu/Gi6d33b1Q9DQHoANtQZrGsnV4+X+HYoBln5VFmuzyn0 X3P4Qi32rf7wbdpwb+Lc063Dhe3ujnstydJNz3AfAEMKO8sGF/DHzidkBXm5wyM/D8l4 +hVZQWL8l7CmlAR0atlF91ZsBNTJxX/3xFgXYN5UpfttveBK+7WVOa3wWW/gaz/FelWD +6AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195260; x=1750800060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=776AGtm1GUAsf2d8a4E/DtcHPM1G3jvwfP/nT02CJvg=; b=Q3dGWMxCfzJvmSX5JRHzXZhn/PiKDUZVE8etypeuCGl9u1A6j1+/q6thWSH+s6lA89 c01DehDLu1c9yBiBFPjboxegfJRfboEv2jVlTSuqLlfOYo4EYi50m0RnGH8Q+8FAQ+Eb 5nbJJVuRVWvmb5/H/IsXbQigKC+DOVi958F+Twv1Yw0mWdAMf7x99n51yXfWZRaP1BRq Ku8TrVuip6Y9BVZ4+jiIZVnXWNtfgMrBmq9huk6tjsqo7/yggboPLsCnGOPD9TK4GwaZ Ipbb0/5edI4IRXHu9v4n42V9tiNssHIK8g1pn7CtVpJNoBMuzNdZjThGTbV6pK0crTvN +okQ== X-Gm-Message-State: AOJu0Yz3TlI9Ib21xbc9P1YwL07sPpzJL8LmlLBaBEFy7ZY5AYYy5LIg 5a3hEImp4xajgH5aB6dBcVkiB7FOjatVRiI/F9v0C+kkiZ0iIvcLeIUO3ZFecmQ/l/Iun3Jcu/t MaEWL X-Gm-Gg: ASbGncs2TZZx54AH8NZxcMcmvZfwYPp8fiv/qSfMFXl5vWkwi/ufh2YdW6kKgDXrxyI TA580pgsNbVR88QjP1lb69y+ymXWsAZWsn+Vqo1+jr5WztPdNB9vNm+qJF675DdY9NccSVncmsD IxoK4PWlduHm9RpWVV4442pcy+SbPpybtxZjWDLglQ1AOwUP4IdCrAQtsTLHUYuQh1ddameHEpj b5/ib21MkDB4nGDYhM7ntpJ6JDl0NTUN7qER/OE1fW/fCruCLAKeYmrTeSRek8JtwMCTtI+Iols o+lqEcf0l5kaRstxvZL68R/RetST53Ez3xGx8NfeCG9oKXHUzF675w== X-Google-Smtp-Source: AGHT+IEef9MPmHpLrsSOfvbdpUOLmusjvAgd9KNp55HIfc550dcobfUhHOGllm7h+fD6+SvhvSgowA== X-Received: by 2002:a05:6a00:3c8f:b0:73c:c11:b42e with SMTP id d2e1a72fcca58-7489d0309f3mr21723315b3a.20.1750195260181; Tue, 17 Jun 2025 14:21:00 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:20:59 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 17/27] libpng: Improve ptest Date: Tue, 17 Jun 2025 14:20:14 -0700 Message-ID: <5835b803acc255c227213670588dd01c5168c266.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218934 From: Poonam Jadhav Install libpng test-suite to run it as a ptest. As the test-suite takes more than 30 seconds to run, add libpng-ptest to PTESTS_SLOW in ptest-packagelists.inc Signed-off-by: Poonam Jadhav Signed-off-by: Steve Sakoman --- .../distro/include/ptest-packagelists.inc | 2 +- .../recipes-multimedia/libpng/files/run-ptest | 26 +---------- .../libpng/libpng_1.6.39.bb | 43 +++++++++++++++---- 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 5c6a30635f..53c023bb81 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -29,7 +29,6 @@ PTESTS_FAST = "\ libnl-ptest \ libmodule-build-perl-ptest \ libpcre-ptest \ - libpng-ptest \ libssh2-ptest \ libtimedate-perl-ptest \ libtest-needs-perl-ptest \ @@ -88,6 +87,7 @@ PTESTS_SLOW = "\ glib-2.0-ptest \ gstreamer1.0-ptest \ libevent-ptest \ + libpng-ptest \ lttng-tools-ptest \ openssh-ptest \ openssl-ptest \ diff --git a/meta/recipes-multimedia/libpng/files/run-ptest b/meta/recipes-multimedia/libpng/files/run-ptest index 9ab5d0c1f4..85051a59f5 100644 --- a/meta/recipes-multimedia/libpng/files/run-ptest +++ b/meta/recipes-multimedia/libpng/files/run-ptest @@ -2,28 +2,6 @@ set -eux -./pngfix pngtest.png &> log.txt 2>&1 +cd src -if grep -i "OK" log.txt 2>&1 ; then - echo "PASS: pngfix passed" -else - echo "FAIL: pngfix failed" -fi -rm -f log.txt - -./pngtest pngtest.png &> log.txt 2>&1 - -if grep -i "PASS" log.txt 2>&1 ; then - echo "PASS: pngtest passed" -else - echo "FAIL: pngtest failed" -fi -rm -f log.txt - -for i in pngstest timepng; do - if "./${i}" pngtest.png 2>&1; then - echo "PASS: $i" - else - echo "FAIL: $i" - fi -done +make check-TESTS diff --git a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb index 94db1d3f6b..011eec94a2 100644 --- a/meta/recipes-multimedia/libpng/libpng_1.6.39.bb +++ b/meta/recipes-multimedia/libpng/libpng_1.6.39.bb @@ -13,7 +13,7 @@ LIBV = "16" SRC_URI = "\ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz \ file://run-ptest \ - " +" SRC_URI[sha256sum] = "1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937" @@ -32,15 +32,42 @@ PACKAGES =+ "${PN}-tools" FILES:${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" -BBCLASSEXTEND = "native nativesdk" - # CVE-2019-17371 is actually a memory leak in gif2png 2.x CVE_CHECK_IGNORE += "CVE-2019-17371" +RDEPENDS:${PN}-ptest += "make bash gawk" + do_install_ptest() { - install -m644 "${S}/pngtest.png" "${D}${PTEST_PATH}" - install -m755 "${B}/.libs/pngfix" "${D}${PTEST_PATH}" - install -m755 "${B}/.libs/pngtest" "${D}${PTEST_PATH}" - install -m755 "${B}/.libs/pngstest" "${D}${PTEST_PATH}" - install -m755 "${B}/.libs/timepng" "${D}${PTEST_PATH}" + # Install test scripts to ptest path + install -d ${D}${PTEST_PATH}/src/tests + install -m 755 ${S}/tests/* ${D}${PTEST_PATH}/src/tests + install -m 755 ${S}/test-driver ${D}${PTEST_PATH}/src + install -d ${D}${PTEST_PATH}/src/tests/scripts + install -m 755 ${S}/scripts/*.awk ${D}${PTEST_PATH}/src/tests/scripts + install -m 644 ${S}/scripts/pnglib* ${S}/scripts/*.c ${S}/scripts/*.def ${S}/scripts/macro.lst ${D}${PTEST_PATH}/src/tests/scripts + install -m 644 ${S}/scripts/pnglibconf.h.prebuilt ${D}${PTEST_PATH}/src/tests/scripts/pnglibconf.h + install -d ${D}${PTEST_PATH}/src/contrib/tools + install -m 755 ${S}/contrib/tools/*.sh ${D}${PTEST_PATH}/src/contrib/tools + install -m 644 ${S}/contrib/tools/*.c ${S}/contrib/tools/*.h ${D}${PTEST_PATH}/src/contrib/tools + + # Install .libs directory binaries to ptest path + install -m 755 ${B}/.libs/pngtest ${B}/.libs/pngstest ${B}/.libs/pngimage ${B}/.libs/pngunknown ${B}/.libs/pngvalid ${D}${PTEST_PATH}/src + + # Copy png files to ptest path + cd ${S} && find contrib -name '*.png' | cpio -pd ${D}${PTEST_PATH}/src + + # Install Makefile and png files + install -m 644 ${S}/pngtest.png ${D}${PTEST_PATH}/src + install -m 644 ${S}/*.png ${S}/*.h ${S}/*.c ${S}/*.dfa ${B}/pnglibconf.out ${S}/Makefile.am ${S}/Makefile.in ${D}${PTEST_PATH}/src/tests + + sed -e 's/^abs_srcdir = ..*/abs_srcdir = \.\./' \ + -e 's/^top_srcdir = ..*/top_srcdir = \.\./' \ + -e 's/^srcdir = ..*/srcdir = \./' \ + -e 's/^Makefile: ..*/Makefile: /' \ + -e 's/check-TESTS: $(check_PROGRAMS)/check-TESTS:/g' \ + ${B}/Makefile > ${D}${PTEST_PATH}/src/Makefile + + sed -e 's|#!/bin/awk|#!/usr/bin/awk|g' -i ${D}${PTEST_PATH}/src/tests/scripts/*.awk } + +BBCLASSEXTEND = "native nativesdk" From patchwork Tue Jun 17 21:20:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3885BC71136 for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web10.31271.1750195262600809379 for ; Tue, 17 Jun 2025 14:21:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=LMsPObqX; spf=softfail (domain: sakoman.com, ip: 209.85.210.174, mailfrom: steve@sakoman.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-742caef5896so5174852b3a.3 for ; Tue, 17 Jun 2025 14:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195262; x=1750800062; 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; bh=rYlAxPuXA8dnfmu8i+wfbdgDc6Ycx58eTjl1jZj+m5E=; b=LMsPObqX388VTqFXkjL2DvZrezEnlEfDSNCDcCoHm2nXlKCijHQITkmnM2uvsAnfGU PIUvmsJ/yeFJMTV/PpomP2BEQxnjf0RDNMK/8IMsGs136u+DyugBLvrqtGDat3tVNlKx rB3P9p/UAVAv8DAKBpBkaKwp9iof0etS0c8hF1EMcM0XG/91VnSECRoiv+4xyu4uGcTE A+QxjCrEwAGhInMELX+JBpEWnRzJMVomMWH7MLMonCagZD7ApKCCERWlGhKKHVfkeyEp gBMF4ss7R39od2EQdzBA+Kh6nSEybOW5dXTPrFvmvGCIYFo2HOFWsAtYfXrxfanLojUR hrCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195262; x=1750800062; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rYlAxPuXA8dnfmu8i+wfbdgDc6Ycx58eTjl1jZj+m5E=; b=dhTdZ5ji92QpQKxqc8KTGH4v4Gx/cjEGx+D3dTyJ2353G2vLenJgl1QXBUXcoRVelD j8qKIHV3y0dYMluCddUbOxzgm4xOukZA7DF3UxKO3QvQBHqcLxLyT7u6FTVdLz42tppZ v36pm1HdAnGhuw0c0RcYPgZSdIVG2DxjRNHViXrSafScAbaZdQmcG2Q2GhL+Nm60D5ho dftaHcsMf3/zsnPnHYEWXDq35On46Cz47u8FpiuAR16WpFaB4X1X3/F4fS0up9tigQaL 7kxloDL8TI/YZPEheNxL9EwGXSlOEyCRYkh1IvsL27LuV/pXHEBj8W5Yp7g+8u816beD EaJA== X-Gm-Message-State: AOJu0Yy7SXGqMK4JGG3QG3yKC1rLOXoQHWpm2D58aGZfA5YLvnzfFdLy 7Qxs6dUts11It1GBEFN7qCPfGfj/tiwgBc13pD9CP6OE3SL8qXQmGOtpb0aX+/Qy5HOp+foI8GH HhUza X-Gm-Gg: ASbGncu22YNX/NCQodKL61QyzHYDu1f0J19WtVf0Plwccoewe+5Vdh1SFelgA1dh4/B 5SffDw8hhxbwNw0aaTeRsPYVvMjgU4V0M+ABGQDcmyVev93Up4ud53N4+kreEv+jn3sdulqNL9l DZyPgPy++nMGQ3yPdIv/jAcTRrRQ6o6D6x+nYgycWs3xj+uC7Fb8Z6D/ZLWvs+TZYVPQyLI8YHw UeS50uOioQIbsuwyDvRi/Sybjw/l11MU5l9OSelsas8ASZ64O8gwe6ixA0RCtZB0H3QhXqKwLZw K/MO+P5g4z1WyqhgsJ2WknlHO2MFHRVHDAEv1rS2sJhrvYvPL9VD7A== X-Google-Smtp-Source: AGHT+IGSli+bcx9ox1ljWWCtoc3dN8uAUq7nUnmH47eroCYvy7soufkfO1Js6SUaqxYXNpJqxg+xxQ== X-Received: by 2002:a05:6a00:3a17:b0:748:2fa4:14c0 with SMTP id d2e1a72fcca58-7489ccc780cmr20445449b3a.0.1750195261783; Tue, 17 Jun 2025 14:21:01 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:01 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 18/27] xz: Update LICENSE variable for xz packages Date: Tue, 17 Jun 2025 14:20:15 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218935 From: aszh07 Update LICENSE defined for xz packages to match the license information provided in the xz COPYING file. The License information from PACKAGERS file of xz mentions packages with lzma files are in public domain.They ask to use GPLv2+, if only it's not possible to mention "PD and GPLv2+". Include PD license with GPLv2 to packages with lzma content: xz-dev package contains lzma header xz-doc package contains lzma man pages xz packages contains lzma binaries Links: https://github.com/tukaani-project/xz/blob/v5.4.6/COPYING https://github.com/tukaani-project/xz/blob/v5.4.6/PACKAGERS (From OE-Core rev: d511c41dac048fbdd93a54136e93b0623a18a83d) Signed-off-by: Bhabu Bindu Signed-off-by: Richard Purdie (cherry picked from commit 4e5b955def5d9f305f5aba2c68b73287c03fd163) Signed-off-by: Steve Sakoman --- meta/recipes-extended/xz/xz_5.2.6.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-extended/xz/xz_5.2.6.bb b/meta/recipes-extended/xz/xz_5.2.6.bb index 7f889e4367..938c659008 100644 --- a/meta/recipes-extended/xz/xz_5.2.6.bb +++ b/meta/recipes-extended/xz/xz_5.2.6.bb @@ -9,10 +9,10 @@ SECTION = "base" # libgnu, which appears to be used for DOS builds. So we're left with # GPL-2.0-or-later and PD. LICENSE = "GPL-2.0-or-later & GPL-3.0-with-autoconf-exception & LGPL-2.1-or-later & PD" -LICENSE:${PN} = "GPL-2.0-or-later" -LICENSE:${PN}-dev = "GPL-2.0-or-later" +LICENSE:${PN} = "PD & GPL-2.0-or-later" +LICENSE:${PN}-dev = "PD & GPL-2.0-or-later" LICENSE:${PN}-staticdev = "GPL-2.0-or-later" -LICENSE:${PN}-doc = "GPL-2.0-or-later" +LICENSE:${PN}-doc = "PD & GPL-2.0-or-later" LICENSE:${PN}-dbg = "GPL-2.0-or-later" LICENSE:${PN}-locale = "GPL-2.0-or-later" LICENSE:liblzma = "PD" From patchwork Tue Jun 17 21:20:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E34FC7115F for ; Tue, 17 Jun 2025 21:21:05 +0000 (UTC) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mx.groups.io with SMTP id smtpd.web11.31426.1750195264149110391 for ; Tue, 17 Jun 2025 14:21:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=ON+BZ8i9; spf=softfail (domain: sakoman.com, ip: 209.85.210.176, mailfrom: steve@sakoman.com) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-748da522e79so631737b3a.1 for ; Tue, 17 Jun 2025 14:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195263; x=1750800063; 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; bh=+MPqEeF0AgrveD9Nnl4XjtNsDzpJyCNbvaDiINEOxQA=; b=ON+BZ8i9YF8sv3JypiMHket/1yckJ73CND/ZuFoZfFCY0X/1tVOqP9xHLltpZkmobJ 970oPMOj1dYitMpjMDDF42Vtm4BXPa0asj18ckgxXrYzHOeyDBf4JHEBWi1E7r52Dee3 +RkDMnwTEy+yr9iX+zl4GcC01Bofs3/AkoJ15J6nnz/LeJKx4a4lccPusR0CJyc47hlc tdMkAols6httm+BuQ2RJ1/zKuMIObSM3BI+jbhIVfHJyPWycyPnpPOMqTGFhPX1k0+qO Vxc5QxIKldjWTVDSyJsELeYZRV7d9AUx4iBBDE0j8dc13Qp/eCQDo4ZItL/w3hVKjEtB EUUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195263; x=1750800063; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+MPqEeF0AgrveD9Nnl4XjtNsDzpJyCNbvaDiINEOxQA=; b=Np3S7gu/yPkVm9gNs1oYfN56TaBytCXwD56AU3j1iokyfB69K/cIMxekvW8AWPYpL5 DvipPIwSms5j+xfGW+XA43yOsT08lyWCUb8jhfYZwm6SteglkXNgyZmDYgNRSwLezNgG dt6BvwRgbeQVqyr6cVfUxqVGGLudBO0NM1cUZ9PUmNBtN9f27uE0uyioSPzt1Lh68gNn ylNXIY6PEYcfl5WT9HW5WlA4kSWviyG5oJEQvD9LNhgxYghcyx9ta1XVkMiOsGctMs7i hLREyPt/4IOn+Ag+Yyb6uWOu93Hu2I5iw60/wFULkanoiNJUcQb5anOMxWg85U/TJb5R vcGA== X-Gm-Message-State: AOJu0YzehfiCKiaqEZ+Q0IV5qRxbYX6qFM1Tp+OEB/V675Hv+vXlEiMX +ZzyDACdvCNaZIjoEYyUXfglsEOkrVF7jfvwQ+yYd/pNTQ6jqu47rdL9EM2ZkDGxA9qYDnX84ll oCcjC X-Gm-Gg: ASbGncsyaurfc3Grvp53ERQge5Yb/WbK5mv8CERVNK9HM+7tdDNwILJU7XrhVAFzJjr WF0xgrXNtHktK008fM9N6AojgVQdlnoxMB4jtJZWp01gn3tGQvcSNQeiT9W4zRFHbK57qKagyyV I9kMHdqG+dZSVUye6ijexdByLMpJ9Q42R/0gC1JNa0P7IAfr8VNbqET32E2zCqtHqaOZn131zxJ OyBfSKhUQ2nNwXzhKW4zgpMNN1hbU6396XkgkTuHa9KgbAXpDWmjJ5uR9NdpVCHp7f5RuShKjk7 4XWkdqQwwspC2UvoijvYj+eY7LyLgiaaJ+8Z2ymgyiaLOn+YZApUORyl7P0JmK/L X-Google-Smtp-Source: AGHT+IE8ceiB9nOCZuFYNvloUbM6xevhi1Dklo+4KnSMxsRtXtRU6XOqOoHDxCXsN4svxHn/WMkNcw== X-Received: by 2002:a05:6a00:2d20:b0:742:a91d:b2f6 with SMTP id d2e1a72fcca58-7489d00b6b0mr19319468b3a.13.1750195263346; Tue, 17 Jun 2025 14:21:03 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:03 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 19/27] e2fsprogs: removed 'sed -u' option Date: Tue, 17 Jun 2025 14:20:16 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:05 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218936 From: Aditya Tayade In embedded box, sed might be provided another providers like Busybox, hence use generic options whenever possible. /bin/sed -> /etc/alternatives/sed /etc/alternatives/sed -> /bin/busybox.nosuid Here used 'sed -u' option is not necessary, hence removed it. Fixes below error: sed: invalid option -- 'u' Also added 'set -eux' option which halts execution of the script on any failures. (From OE-Core rev: 5b3b290baa0a83f493b7ca25d5ffa5ff279bcc69) Signed-off-by: Aditya Tayade Signed-off-by: Pawan Badganchi Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 07caee1829d2a61bc018fe0e37ecd482922179ee) Signed-off-by: Steve Sakoman (cherry picked from commit d2da6b5c5668dbc84b905ba2fe4c9b57b580fd82) Signed-off-by: Steve Sakoman --- meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest index 279923db8e..1857a17189 100644 --- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest +++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest @@ -1,7 +1,8 @@ #!/bin/sh +set -eux cd ./test -SKIP_SLOW_TESTS=yes ./test_script | sed -u -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /' +SKIP_SLOW_TESTS=yes ./test_script | sed -e '/:[[:space:]]ok/s/^/PASS: /' -e '/:[[:space:]]failed/s/^/FAIL: /' -e '/:[[:space:]]skipped/s/^/SKIP: /' rm -rf /var/volatile/tmp/*e2fsprogs* rm -f tmp-* rm -f *.tmp From patchwork Tue Jun 17 21:20:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65191 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4566BC71157 for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web11.31427.1750195266471097645 for ; Tue, 17 Jun 2025 14:21:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=IsD+ZtbO; spf=softfail (domain: sakoman.com, ip: 209.85.210.169, mailfrom: steve@sakoman.com) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-748d982e97cso878276b3a.1 for ; Tue, 17 Jun 2025 14:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195266; x=1750800066; 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; bh=kmCZhtDufwPtQ6jq2Oi2yAdI+Wz1/BKUS0SsHgpAv3k=; b=IsD+ZtbOE5GAavbzKOAfH6prW5duVe++Oy6EU5iZY9AYnQKBxQoRMHpJrBvqkvNgO6 +IcDoqZ2Ja5UXJ/YmKzUry+y15X6Ic7/p0KFEMZID58NXqx8GhLwiR4/eKEoMQfAmBA3 U2VP0Js30Uai/XmpU2DsKvrGg+KaAgZ2uhDMkS5AZvcZ5quQmnA5wLCe6S2ZnFxI7vYM 1SvvSXWWDeP393o6Z/KcN2R+wbKTo2p/pj1OI8i3QjNZAqUitKaZ2hincWzMHCFx25oG PRWlvQWh6qCt7iwvUM+dLCobyIAy/aV4uqL3fx3RGOuvKKA2xELnB2tSIq4seLOg1h8i vkSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195266; x=1750800066; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kmCZhtDufwPtQ6jq2Oi2yAdI+Wz1/BKUS0SsHgpAv3k=; b=aVq+ZcQdTWtJMPQyBJAQULp7J6DWIszwLCkvBdwddRFXqwZc2II1HQg8fqaJES4Uvg R+lCsMMP1pG4WzPRFCTFmyotbFCPnx7jPTQD/l3m5BB2cREX5dtbThLbIUtRIyer9UHO GpLmLBZJSgtLe1GEh4UCGVKAVlGiO0hw0e3l29xmMmuNpFcaJgRrW4aY/mkDcKGIqxpI a4g3McHeW/PMIGFisVfGiaSMJQl/g+mAm4WBwzbYy9tyAuPNRhRsyG7TgixGq2IgwLzm 6yedp4NqMl53hSlXRfmr5OpurT5AG2BgahNasATLXsz/8Wa9YIKp3y16dIKG+SpYbevM 3kgw== X-Gm-Message-State: AOJu0Yz3iGJiPzKb72jX3ukc2JXi8qe8UkypajqeN7jKIlI8hKpqQvS4 HHXsl0yL6pvl27xPDkU0z8PpTijcNmMIWVg1bqpS6YweXwgIfjeFjkNQMrTQ4qQYBpk4bHby+/k Hvj2N X-Gm-Gg: ASbGnctb9c5Zbb58ZWs6YxGQIM07rpG8H7w9VL8AN3e7or6aSBpQBh4ioirIF9X7yY4 Q9YH+gWsUVxDChXKREcFm1wT5oQG3HetqzmUIfaSv1IpuMK3OEInK524u1eukUSY4IGRYeqDmah ZfUg7d5CS5ejdo/9nv70h2O3bcng0/jmxzoVJPP3WRD/gvYQEuytRn6imbQMYpReoQUm/yK2PUE aoJjyEChn6V8HVTbbcx0k5qdKqsiOtfIk1KzTo+bzV13ZwM+AuYlb66IaUDq1Iferqxp2wNQuis 3z9W3Lj2G89lyfpuBScRni8rPXOHeX+bwAhxOoltqeGpJeXsrOpnyg== X-Google-Smtp-Source: AGHT+IGuvCWpE0VF2+mF8pujjYxQxJJtX/6Ox2OuBac0Nyic+KYImCTGGNcRLeyx++g5q1tUbGr/Tw== X-Received: by 2002:a05:6a00:ccb:b0:748:e38d:fed4 with SMTP id d2e1a72fcca58-748e38e07b4mr1351970b3a.6.1750195265204; Tue, 17 Jun 2025 14:21:05 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:04 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 20/27] glibc: pthreads NPTL lost wakeup fix 2 Date: Tue, 17 Jun 2025 14:20:17 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218937 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=1db84775f831a1494993ce9c118deaf9537cc50a] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-1.patch | 455 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 456 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-1.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-1.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-1.patch new file mode 100644 index 0000000000..44a2b6772c --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-1.patch @@ -0,0 +1,455 @@ +From 31d9848830e496f57d4182b518467c4c63bfd4bd Mon Sep 17 00:00:00 2001 +From: Frank Barrus +Date: Mon, 16 Jun 2025 22:37:54 -0700 +Subject: [PATCH] pthreads NPTL: lost wakeup fix 2 + +This fixes the lost wakeup (from a bug in signal stealing) with a change +in the usage of g_signals[] in the condition variable internal state. +It also completely eliminates the concept and handling of signal stealing, +as well as the need for signalers to block to wait for waiters to wake +up every time there is a G1/G2 switch. This greatly reduces the average +and maximum latency for pthread_cond_signal. + +The g_signals[] field now contains a signal count that is relative to +the current g1_start value. Since it is a 32-bit field, and the LSB is +still reserved (though not currently used anymore), it has a 31-bit value +that corresponds to the low 31 bits of the sequence number in g1_start. +(since g1_start also has an LSB flag, this means bits 31:1 in g_signals +correspond to bits 31:1 in g1_start, plus the current signal count) + +By making the signal count relative to g1_start, there is no longer +any ambiguity or A/B/A issue, and thus any checks before blocking, +including the futex call itself, are guaranteed not to block if the G1/G2 +switch occurs, even if the signal count remains the same. This allows +initially safely blocking in G2 until the switch to G1 occurs, and +then transitioning from G1 to a new G1 or G2, and always being able to +distinguish the state change. This removes the race condition and A/B/A +problems that otherwise ocurred if a late (pre-empted) waiter were to +resume just as the futex call attempted to block on g_signal since +otherwise there was no last opportunity to re-check things like whether +the current G1 group was already closed. + +By fixing these issues, the signal stealing code can be eliminated, +since there is no concept of signal stealing anymore. The code to block +for all waiters to exit g_refs can also be removed, since any waiters +that are still in the g_refs region can be guaranteed to safely wake +up and exit. If there are still any left at this time, they are all +sent one final futex wakeup to ensure that they are not blocked any +longer, but there is no need for the signaller to block and wait for +them to wake up and exit the g_refs region. + +The signal count is then effectively "zeroed" but since it is now +relative to g1_start, this is done by advancing it to a new value that +can be observed by any pending blocking waiters. Any late waiters can +always tell the difference, and can thus just cleanly exit if they are +in a stale G1 or G2. They can never steal a signal from the current +G1 if they are not in the current G1, since the signal value that has +to match in the cmpxchg has the low 31 bits of the g1_start value +contained in it, and that's first checked, and then it won't match if +there's a G1/G2 change. + +Note: the 31-bit sequence number used in g_signals is designed to +handle wrap-around when checking the signal count, but if the entire +31-bit wraparound (2 billion signals) occurs while there is still a +late waiter that has not yet resumed, and it happens to then match +the current g1_start low bits, and the pre-emption occurs after the +normal "closed group" checks (which are 64-bit) but then hits the +futex syscall and signal consuming code, then an A/B/A issue could +still result and cause an incorrect assumption about whether it +should block. This particular scenario seems unlikely in practice. +Note that once awake from the futex, the waiter would notice the +closed group before consuming the signal (since that's still a 64-bit +check that would not be aliased in the wrap-around in g_signals), +so the biggest impact would be blocking on the futex until the next +full wakeup from a G1/G2 switch. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=1db84775f831a1494993ce9c118deaf9537cc50a] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_common.c | 106 +++++++++------------------ + nptl/pthread_cond_wait.c | 144 ++++++++++++------------------------- + 2 files changed, 81 insertions(+), 169 deletions(-) + +diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c +index fb035f72c3..8dd7037923 100644 +--- a/nptl/pthread_cond_common.c ++++ b/nptl/pthread_cond_common.c +@@ -201,7 +201,6 @@ static bool __attribute__ ((unused)) + __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + unsigned int *g1index, int private) + { +- const unsigned int maxspin = 0; + unsigned int g1 = *g1index; + + /* If there is no waiter in G2, we don't do anything. The expression may +@@ -222,85 +221,46 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + * New waiters arriving concurrently with the group switching will all go + into G2 until we atomically make the switch. Waiters existing in G2 + are not affected. +- * Waiters in G1 will be closed out immediately by setting a flag in +- __g_signals, which will prevent waiters from blocking using a futex on +- __g_signals and also notifies them that the group is closed. As a +- result, they will eventually remove their group reference, allowing us +- to close switch group roles. */ +- +- /* First, set the closed flag on __g_signals. This tells waiters that are +- about to wait that they shouldn't do that anymore. This basically +- serves as an advance notificaton of the upcoming change to __g1_start; +- waiters interpret it as if __g1_start was larger than their waiter +- sequence position. This allows us to change __g1_start after waiting +- for all existing waiters with group references to leave, which in turn +- makes recovery after stealing a signal simpler because it then can be +- skipped if __g1_start indicates that the group is closed (otherwise, +- we would have to recover always because waiters don't know how big their +- groups are). Relaxed MO is fine. */ +- atomic_fetch_or_relaxed (cond->__data.__g_signals + g1, 1); +- +- /* Wait until there are no group references anymore. The fetch-or operation +- injects us into the modification order of __g_refs; release MO ensures +- that waiters incrementing __g_refs after our fetch-or see the previous +- changes to __g_signals and to __g1_start that had to happen before we can +- switch this G1 and alias with an older group (we have two groups, so +- aliasing requires switching group roles twice). Note that nobody else +- can have set the wake-request flag, so we do not have to act upon it. +- +- Also note that it is harmless if older waiters or waiters from this G1 +- get a group reference after we have quiesced the group because it will +- remain closed for them either because of the closed flag in __g_signals +- or the later update to __g1_start. New waiters will never arrive here +- but instead continue to go into the still current G2. */ +- unsigned r = atomic_fetch_or_release (cond->__data.__g_refs + g1, 0); +- while ((r >> 1) > 0) +- { +- for (unsigned int spin = maxspin; ((r >> 1) > 0) && (spin > 0); spin--) +- { +- /* TODO Back off. */ +- r = atomic_load_relaxed (cond->__data.__g_refs + g1); +- } +- if ((r >> 1) > 0) +- { +- /* There is still a waiter after spinning. Set the wake-request +- flag and block. Relaxed MO is fine because this is just about +- this futex word. +- +- Update r to include the set wake-request flag so that the upcoming +- futex_wait only blocks if the flag is still set (otherwise, we'd +- violate the basic client-side futex protocol). */ +- r = atomic_fetch_or_relaxed (cond->__data.__g_refs + g1, 1) | 1; +- +- if ((r >> 1) > 0) +- futex_wait_simple (cond->__data.__g_refs + g1, r, private); +- /* Reload here so we eventually see the most recent value even if we +- do not spin. */ +- r = atomic_load_relaxed (cond->__data.__g_refs + g1); +- } +- } +- /* Acquire MO so that we synchronize with the release operation that waiters +- use to decrement __g_refs and thus happen after the waiters we waited +- for. */ +- atomic_thread_fence_acquire (); ++ * Waiters in G1 will be closed out immediately by the advancing of ++ __g_signals to the next "lowseq" (low 31 bits of the new g1_start), ++ which will prevent waiters from blocking using a futex on ++ __g_signals since it provides enough signals for all possible ++ remaining waiters. As a result, they can each consume a signal ++ and they will eventually remove their group reference. */ + + /* Update __g1_start, which finishes closing this group. The value we add + will never be negative because old_orig_size can only be zero when we + switch groups the first time after a condvar was initialized, in which +- case G1 will be at index 1 and we will add a value of 1. See above for +- why this takes place after waiting for quiescence of the group. ++ case G1 will be at index 1 and we will add a value of 1. + Relaxed MO is fine because the change comes with no additional + constraints that others would have to observe. */ + __condvar_add_g1_start_relaxed (cond, + (old_orig_size << 1) + (g1 == 1 ? 1 : - 1)); + +- /* Now reopen the group, thus enabling waiters to again block using the +- futex controlled by __g_signals. Release MO so that observers that see +- no signals (and thus can block) also see the write __g1_start and thus +- that this is now a new group (see __pthread_cond_wait_common for the +- matching acquire MO loads). */ +- atomic_store_release (cond->__data.__g_signals + g1, 0); +- ++ unsigned int lowseq = ((old_g1_start + old_orig_size) << 1) & ~1U; ++ ++ /* If any waiters still hold group references (and thus could be blocked), ++ then wake them all up now and prevent any running ones from blocking. ++ This is effectively a catch-all for any possible current or future ++ bugs that can allow the group size to reach 0 before all G1 waiters ++ have been awakened or at least given signals to consume, or any ++ other case that can leave blocked (or about to block) older waiters.. */ ++ if ((atomic_fetch_or_release (cond->__data.__g_refs + g1, 0) >> 1) > 0) ++ { ++ /* First advance signals to the end of the group (i.e. enough signals ++ for the entire G1 group) to ensure that waiters which have not ++ yet blocked in the futex will not block. ++ Note that in the vast majority of cases, this should never ++ actually be necessary, since __g_signals will have enough ++ signals for the remaining g_refs waiters. As an optimization, ++ we could check this first before proceeding, although that ++ could still leave the potential for futex lost wakeup bugs ++ if the signal count was non-zero but the futex wakeup ++ was somehow lost. */ ++ atomic_store_release (cond->__data.__g_signals + g1, lowseq); ++ ++ futex_wake (cond->__data.__g_signals + g1, INT_MAX, private); ++ } + /* At this point, the old G1 is now a valid new G2 (but not in use yet). + No old waiter can neither grab a signal nor acquire a reference without + noticing that __g1_start is larger. +@@ -311,6 +271,10 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + g1 ^= 1; + *g1index ^= 1; + ++ /* Now advance the new G1 g_signals to the new lowseq, giving it ++ an effective signal count of 0 to start. */ ++ atomic_store_release (cond->__data.__g_signals + g1, lowseq); ++ + /* These values are just observed by signalers, and thus protected by the + lock. */ + unsigned int orig_size = wseq - (old_g1_start + old_orig_size); +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index 20c348a503..1cb3dbf7b0 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -238,9 +238,7 @@ __condvar_cleanup_waiting (void *arg) + signaled), and a reference count. + + The group reference count is used to maintain the number of waiters that +- are using the group's futex. Before a group can change its role, the +- reference count must show that no waiters are using the futex anymore; this +- prevents ABA issues on the futex word. ++ are using the group's futex. + + To represent which intervals in the waiter sequence the groups cover (and + thus also which group slot contains G1 or G2), we use a 64b counter to +@@ -300,11 +298,12 @@ __condvar_cleanup_waiting (void *arg) + last reference. + * Reference count used by waiters concurrently with signalers that have + acquired the condvar-internal lock. +- __g_signals: The number of signals that can still be consumed. ++ __g_signals: The number of signals that can still be consumed, relative to ++ the current g1_start. (i.e. bits 31 to 1 of __g_signals are bits ++ 31 to 1 of g1_start with the signal count added) + * Used as a futex word by waiters. Used concurrently by waiters and + signalers. +- * LSB is true iff this group has been completely signaled (i.e., it is +- closed). ++ * LSB is currently reserved and 0. + __g_size: Waiters remaining in this group (i.e., which have not been + signaled yet. + * Accessed by signalers and waiters that cancel waiting (both do so only +@@ -328,18 +327,6 @@ __condvar_cleanup_waiting (void *arg) + sufficient because if a waiter can see a sufficiently large value, it could + have also consume a signal in the waiters group. + +- Waiters try to grab a signal from __g_signals without holding a reference +- count, which can lead to stealing a signal from a more recent group after +- their own group was already closed. They cannot always detect whether they +- in fact did because they do not know when they stole, but they can +- conservatively add a signal back to the group they stole from; if they +- did so unnecessarily, all that happens is a spurious wake-up. To make this +- even less likely, __g1_start contains the index of the current g2 too, +- which allows waiters to check if there aliasing on the group slots; if +- there wasn't, they didn't steal from the current G1, which means that the +- G1 they stole from must have been already closed and they do not need to +- fix anything. +- + It is essential that the last field in pthread_cond_t is __g_signals[1]: + The previous condvar used a pointer-sized field in pthread_cond_t, so a + PTHREAD_COND_INITIALIZER from that condvar implementation might only +@@ -435,6 +422,9 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + { + while (1) + { ++ uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); ++ unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ + /* Spin-wait first. + Note that spinning first without checking whether a timeout + passed might lead to what looks like a spurious wake-up even +@@ -446,35 +436,45 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + having to compare against the current time seems to be the right + choice from a performance perspective for most use cases. */ + unsigned int spin = maxspin; +- while (signals == 0 && spin > 0) ++ while (spin > 0 && ((int)(signals - lowseq) < 2)) + { + /* Check that we are not spinning on a group that's already + closed. */ +- if (seq < (__condvar_load_g1_start_relaxed (cond) >> 1)) +- goto done; ++ if (seq < (g1_start >> 1)) ++ break; + + /* TODO Back off. */ + + /* Reload signals. See above for MO. */ + signals = atomic_load_acquire (cond->__data.__g_signals + g); ++ g1_start = __condvar_load_g1_start_relaxed (cond); ++ lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + spin--; + } + +- /* If our group will be closed as indicated by the flag on signals, +- don't bother grabbing a signal. */ +- if (signals & 1) +- goto done; +- +- /* If there is an available signal, don't block. */ +- if (signals != 0) ++ if (seq < (g1_start >> 1)) ++ { ++ /* If the group is closed already, ++ then this waiter originally had enough extra signals to ++ consume, up until the time its group was closed. */ ++ goto done; ++ } ++ ++ /* If there is an available signal, don't block. ++ If __g1_start has advanced at all, then we must be in G1 ++ by now, perhaps in the process of switching back to an older ++ G2, but in either case we're allowed to consume the available ++ signal and should not block anymore. */ ++ if ((int)(signals - lowseq) >= 2) + break; + + /* No signals available after spinning, so prepare to block. + We first acquire a group reference and use acquire MO for that so + that we synchronize with the dummy read-modify-write in + __condvar_quiesce_and_switch_g1 if we read from that. In turn, +- in this case this will make us see the closed flag on __g_signals +- that designates a concurrent attempt to reuse the group's slot. ++ in this case this will make us see the advancement of __g_signals ++ to the upcoming new g1_start that occurs with a concurrent ++ attempt to reuse the group's slot. + We use acquire MO for the __g_signals check to make the + __g1_start check work (see spinning above). + Note that the group reference acquisition will not mask the +@@ -482,15 +482,24 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + an atomic read-modify-write operation and thus extend the release + sequence. */ + atomic_fetch_add_acquire (cond->__data.__g_refs + g, 2); +- if (((atomic_load_acquire (cond->__data.__g_signals + g) & 1) != 0) +- || (seq < (__condvar_load_g1_start_relaxed (cond) >> 1))) ++ signals = atomic_load_acquire (cond->__data.__g_signals + g); ++ g1_start = __condvar_load_g1_start_relaxed (cond); ++ lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ ++ if (seq < (g1_start >> 1)) + { +- /* Our group is closed. Wake up any signalers that might be +- waiting. */ ++ /* group is closed already, so don't block */ + __condvar_dec_grefs (cond, g, private); + goto done; + } + ++ if ((int)(signals - lowseq) >= 2) ++ { ++ /* a signal showed up or G1/G2 switched after we grabbed the refcount */ ++ __condvar_dec_grefs (cond, g, private); ++ break; ++ } ++ + // Now block. + struct _pthread_cleanup_buffer buffer; + struct _condvar_cleanup_buffer cbuffer; +@@ -501,7 +510,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + __pthread_cleanup_push (&buffer, __condvar_cleanup_waiting, &cbuffer); + + err = __futex_abstimed_wait_cancelable64 ( +- cond->__data.__g_signals + g, 0, clockid, abstime, private); ++ cond->__data.__g_signals + g, signals, clockid, abstime, private); + + __pthread_cleanup_pop (&buffer, 0); + +@@ -524,6 +533,8 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + signals = atomic_load_acquire (cond->__data.__g_signals + g); + } + ++ if (seq < (__condvar_load_g1_start_relaxed (cond) >> 1)) ++ goto done; + } + /* Try to grab a signal. Use acquire MO so that we see an up-to-date value + of __g1_start below (see spinning above for a similar case). In +@@ -532,69 +543,6 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + while (!atomic_compare_exchange_weak_acquire (cond->__data.__g_signals + g, + &signals, signals - 2)); + +- /* We consumed a signal but we could have consumed from a more recent group +- that aliased with ours due to being in the same group slot. If this +- might be the case our group must be closed as visible through +- __g1_start. */ +- uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); +- if (seq < (g1_start >> 1)) +- { +- /* We potentially stole a signal from a more recent group but we do not +- know which group we really consumed from. +- We do not care about groups older than current G1 because they are +- closed; we could have stolen from these, but then we just add a +- spurious wake-up for the current groups. +- We will never steal a signal from current G2 that was really intended +- for G2 because G2 never receives signals (until it becomes G1). We +- could have stolen a signal from G2 that was conservatively added by a +- previous waiter that also thought it stole a signal -- but given that +- that signal was added unnecessarily, it's not a problem if we steal +- it. +- Thus, the remaining case is that we could have stolen from the current +- G1, where "current" means the __g1_start value we observed. However, +- if the current G1 does not have the same slot index as we do, we did +- not steal from it and do not need to undo that. This is the reason +- for putting a bit with G2's index into__g1_start as well. */ +- if (((g1_start & 1) ^ 1) == g) +- { +- /* We have to conservatively undo our potential mistake of stealing +- a signal. We can stop trying to do that when the current G1 +- changes because other spinning waiters will notice this too and +- __condvar_quiesce_and_switch_g1 has checked that there are no +- futex waiters anymore before switching G1. +- Relaxed MO is fine for the __g1_start load because we need to +- merely be able to observe this fact and not have to observe +- something else as well. +- ??? Would it help to spin for a little while to see whether the +- current G1 gets closed? This might be worthwhile if the group is +- small or close to being closed. */ +- unsigned int s = atomic_load_relaxed (cond->__data.__g_signals + g); +- while (__condvar_load_g1_start_relaxed (cond) == g1_start) +- { +- /* Try to add a signal. We don't need to acquire the lock +- because at worst we can cause a spurious wake-up. If the +- group is in the process of being closed (LSB is true), this +- has an effect similar to us adding a signal. */ +- if (((s & 1) != 0) +- || atomic_compare_exchange_weak_relaxed +- (cond->__data.__g_signals + g, &s, s + 2)) +- { +- /* If we added a signal, we also need to add a wake-up on +- the futex. We also need to do that if we skipped adding +- a signal because the group is being closed because +- while __condvar_quiesce_and_switch_g1 could have closed +- the group, it might stil be waiting for futex waiters to +- leave (and one of those waiters might be the one we stole +- the signal from, which cause it to block using the +- futex). */ +- futex_wake (cond->__data.__g_signals + g, 1, private); +- break; +- } +- /* TODO Back off. */ +- } +- } +- } +- + done: + + /* Confirm that we have been woken. We do that before acquiring the mutex +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 1ea4d5a252..f15e031971 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -62,6 +62,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://0025-CVE-2025-4802.patch \ + file://0026-PR25847-1.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65187 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 456A4C7115A for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web10.31277.1750195268186693155 for ; Tue, 17 Jun 2025 14:21:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=qKgvpCN9; spf=softfail (domain: sakoman.com, ip: 209.85.210.169, mailfrom: steve@sakoman.com) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-74264d1832eso6992382b3a.0 for ; Tue, 17 Jun 2025 14:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195267; x=1750800067; 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; bh=wMvKI6kMyV6+EA4PGyXk6+dibmC6LP6nAZI8ZBHyFYs=; b=qKgvpCN9A2yh6/azVEg+5/K956XI+r1IpXioY4MJv6Zcc7/bIsqIQgxFDVtnHyqLYU MT4LMfDPYXQScwAWwj6uGJFHnaKtznE8dMgj10kNEkrG9FN9vVzwxq51K1pxHjoq9+QJ Dp/57wE4agJ2Xeb7GbFQMgMwLkZwJS08R103atGJLjnaF2Xj6mHP6z7nAb3xrvx3cPQt yNj8GUS5kfPMCbxwFnu8E5Ih4lnycLobHQp509iS43Q2sJLMCgUz0RbzKbo6hjBz7Erc 7zCdjtWzZjS9l/CMVrJ9KjMakc+FYBJVVnpUCRrlwJd148C6aVrC3Tg8NIu2tPDxnZYV RPJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195267; x=1750800067; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wMvKI6kMyV6+EA4PGyXk6+dibmC6LP6nAZI8ZBHyFYs=; b=QkSp8mu4F9KUQGzgIAqxYwVOGDx/StuLWihm4jMMnhk95chyKKRLLQ3iXWykMswWvf lkzmZZBzgWPa4RFxfT5argOE7qtnA+E63VHK6yJTovwa0FqKUUbNb3FuTdmVe9F4bH7Q f6v9wrfLt9emjKWmU9TfZ2MrFuLXk78y+E5vMQzFVR18wzVu2m6By9EKrV0G6xIJc4WL s3iVJcDiFcC8sl0VKQxcQCV63NmSgn2FoBiHQSiYXhiW/ERRYQKajMDuKIvrux4Vr3Dm dRXHCIx40Or2zL9A6/ZQVEMe+9IKIOVfNXj3nEd67mZT56izZhu7ElsI0OsVmEx53P6/ xLCg== X-Gm-Message-State: AOJu0YwRDCdv/GyxalbPSoNFqMWcLzNule4ILXhSuc7i5KfyWcI3tqw7 kyRVECPHlh3Qk1PGUT6PacElqBEQAqYcdpzJ/mElz7NaVIPvCT0bDqvE34O7yxYdyKZzNFSskMT oYoCI X-Gm-Gg: ASbGncsPoYarcsvaBlVXhQopZcbckWLIb+1wqtQZX9Xee4V1T8Mn8nrqAdxrB02ML36 09Ek/fJKf4THj4hMklC5h9cKl0ouJZh4KP5MS8Kx99RQQfClS/loi55mUe4CKrOigrLD2mLzYDL 8qdax7iG4r2SUAhRdjBMSGZvu89q1fICnXZi33xoxbPbupKWetDRv5NnCD7OlOFLNpt/g9/hpr0 iqQUQdFtfTM63eoN8tVUBSRPHVQQfXHsI1x3XodLrBkEWlHXQ2vl8rbF5WCJXxm8TfbbCyPMp7o 1Trv8D8u4nCXOhTivtib5azoq4OEizWS1SOXn+fd0KIJkC7mAUSfRQ== X-Google-Smtp-Source: AGHT+IFqPgaTjwL1AwBzWnPx41tYnZtlgIaOmwd7E7dYeEJadd/ICdZERAjO9/j4kSLERVhu3d6D/g== X-Received: by 2002:a05:6a00:8ca:b0:740:5927:bb8b with SMTP id d2e1a72fcca58-7489ccdeea2mr19754441b3a.0.1750195267201; Tue, 17 Jun 2025 14:21:07 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:06 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 21/27] glibc: nptl Update comments and indentation for new condvar implementation Date: Tue, 17 Jun 2025 14:20:18 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218938 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=0cc973160c23bb67f895bc887dd6942d29f8fee3] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-2.patch | 144 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 145 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-2.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-2.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-2.patch new file mode 100644 index 0000000000..cb89431769 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-2.patch @@ -0,0 +1,144 @@ +From 6aab1191e35a3da66e8c49d95178a9d77c119a1f Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Mon, 16 Jun 2025 23:17:53 -0700 +Subject: [PATCH] nptl: Update comments and indentation for new condvar + implementation + +Some comments were wrong after the most recent commit. This fixes that. +Also fixing indentation where it was using spaces instead of tabs. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=0cc973160c23bb67f895bc887dd6942d29f8fee3] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_common.c | 5 +++-- + nptl/pthread_cond_wait.c | 39 +++++++++++++++++++------------------- + 2 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c +index 8dd7037923..306a207dd6 100644 +--- a/nptl/pthread_cond_common.c ++++ b/nptl/pthread_cond_common.c +@@ -221,8 +221,9 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + * New waiters arriving concurrently with the group switching will all go + into G2 until we atomically make the switch. Waiters existing in G2 + are not affected. +- * Waiters in G1 will be closed out immediately by the advancing of +- __g_signals to the next "lowseq" (low 31 bits of the new g1_start), ++ * Waiters in G1 have already received a signal and been woken. If they ++ haven't woken yet, they will be closed out immediately by the advancing ++ of __g_signals to the next "lowseq" (low 31 bits of the new g1_start), + which will prevent waiters from blocking using a futex on + __g_signals since it provides enough signals for all possible + remaining waiters. As a result, they can each consume a signal +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index 1cb3dbf7b0..cee1968756 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -249,7 +249,7 @@ __condvar_cleanup_waiting (void *arg) + figure out whether they are in a group that has already been completely + signaled (i.e., if the current G1 starts at a later position that the + waiter's position). Waiters cannot determine whether they are currently +- in G2 or G1 -- but they do not have too because all they are interested in ++ in G2 or G1 -- but they do not have to because all they are interested in + is whether there are available signals, and they always start in G2 (whose + group slot they know because of the bit in the waiter sequence. Signalers + will simply fill the right group until it is completely signaled and can +@@ -412,7 +412,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + } + + /* Now wait until a signal is available in our group or it is closed. +- Acquire MO so that if we observe a value of zero written after group ++ Acquire MO so that if we observe (signals == lowseq) after group + switching in __condvar_quiesce_and_switch_g1, we synchronize with that + store and will see the prior update of __g1_start done while switching + groups too. */ +@@ -422,8 +422,8 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + { + while (1) + { +- uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); +- unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); ++ unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + + /* Spin-wait first. + Note that spinning first without checking whether a timeout +@@ -447,21 +447,21 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + + /* Reload signals. See above for MO. */ + signals = atomic_load_acquire (cond->__data.__g_signals + g); +- g1_start = __condvar_load_g1_start_relaxed (cond); +- lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ g1_start = __condvar_load_g1_start_relaxed (cond); ++ lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + spin--; + } + +- if (seq < (g1_start >> 1)) ++ if (seq < (g1_start >> 1)) + { +- /* If the group is closed already, ++ /* If the group is closed already, + then this waiter originally had enough extra signals to + consume, up until the time its group was closed. */ + goto done; +- } ++ } + + /* If there is an available signal, don't block. +- If __g1_start has advanced at all, then we must be in G1 ++ If __g1_start has advanced at all, then we must be in G1 + by now, perhaps in the process of switching back to an older + G2, but in either case we're allowed to consume the available + signal and should not block anymore. */ +@@ -483,22 +483,23 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + sequence. */ + atomic_fetch_add_acquire (cond->__data.__g_refs + g, 2); + signals = atomic_load_acquire (cond->__data.__g_signals + g); +- g1_start = __condvar_load_g1_start_relaxed (cond); +- lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ g1_start = __condvar_load_g1_start_relaxed (cond); ++ lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + +- if (seq < (g1_start >> 1)) ++ if (seq < (g1_start >> 1)) + { +- /* group is closed already, so don't block */ ++ /* group is closed already, so don't block */ + __condvar_dec_grefs (cond, g, private); + goto done; + } + + if ((int)(signals - lowseq) >= 2) + { +- /* a signal showed up or G1/G2 switched after we grabbed the refcount */ ++ /* a signal showed up or G1/G2 switched after we grabbed the ++ refcount */ + __condvar_dec_grefs (cond, g, private); + break; +- } ++ } + + // Now block. + struct _pthread_cleanup_buffer buffer; +@@ -536,10 +537,8 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + if (seq < (__condvar_load_g1_start_relaxed (cond) >> 1)) + goto done; + } +- /* Try to grab a signal. Use acquire MO so that we see an up-to-date value +- of __g1_start below (see spinning above for a similar case). In +- particular, if we steal from a more recent group, we will also see a +- more recent __g1_start below. */ ++ /* Try to grab a signal. See above for MO. (if we do another loop ++ iteration we need to see the correct value of g1_start) */ + while (!atomic_compare_exchange_weak_acquire (cond->__data.__g_signals + g, + &signals, signals - 2)); + +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index f15e031971..92c4dad023 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -63,6 +63,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ file://0025-CVE-2025-4802.patch \ file://0026-PR25847-1.patch \ + file://0026-PR25847-2.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46AEAC71136 for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by mx.groups.io with SMTP id smtpd.web11.31435.1750195270138280294 for ; Tue, 17 Jun 2025 14:21:10 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=iEhuWxD4; spf=softfail (domain: sakoman.com, ip: 209.85.215.174, mailfrom: steve@sakoman.com) Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-b2c49373c15so4892887a12.3 for ; Tue, 17 Jun 2025 14:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195269; x=1750800069; 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; bh=RgFhSEwT2qsL6bInNgs/2Kd/G9seENhxwDAYJfnA6vo=; b=iEhuWxD45iNYyqgbZnIFbSuB1V9X8pfTJ7Q8cYqCp43WjmZ5GRvMJlfzhYbCUS9YU8 CMV6tjrGhuwB41tAtdzjWPO/o2g83VufmSYkAVLK5B+7rakT9AXLTK240jSM03K0tzSF dZmpD5b7/Q+/r1rjJJ7MCp2o7ifolMzpRVRU829MGDwU5JvSl1YvUl87SeHH+9gI5A/e FIqX/gP7ijAan1sNH9SBsKQiLi50A0D62RsmfmSB/wKDzY6p0luUcp+YgwUGw7rWkgdL P4uAQXbpxpUgZmZiguZaDUXuOM7o8EMn0o/D+0yu7dHo68v3tu5LV0x8WvdkYZAUyk3j Nyjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195269; x=1750800069; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RgFhSEwT2qsL6bInNgs/2Kd/G9seENhxwDAYJfnA6vo=; b=MxycYdc65uRAsw1sdtqRHMKpoe5q9zouC0vgVlr9H4eXk2KCQ1jox4M9UiY+bnC6dq V6pmUkm51BbvQsnOF+U1P4KHqy1hjIjMuocpa9C3xeygSSQl8E8K6MNLFWa8VT5T0xk0 vPEuu0U2iN0lIJb6dbfqptBC90sMvt7Gx0cc56rTJE423e9tX9+2lQnBDN3Gw5E/8JvH VUaJVBjVepyUtCuHmwXyKX5hRIocPlzBRHHU9qJ/L4t7XbINYjeViKRgv1aWRQh0fsJT uY47LjqtkqPVgzEKTsQ0WU2V4hfRTgal21k98APamhkXBvJFwkgx+y7FB+ucAzDiuaCL pzaQ== X-Gm-Message-State: AOJu0YyyKyBMX36p034Q3hsGr8Lub7TQXVF5gY80aee0CiOtH7gvmiEb dCl5bjlvTpVHGoLrUEAgjfk1vd7e4gHeUdJZ+cmsfJIdlorKeGuCXLFkXwGsSWSD8LHCQOCgcqu /uuYi X-Gm-Gg: ASbGncsFYbWGwGuT0+C3By2vIlLDCZVCvPcZussh2JjAgdrx2+arc85XyXWM7Vi6vaL wwPcSq92yCilJcDAZvGCQaKVok+ebi3sCuh+mZRaUzVVVF2qpSOdzIGC8HdYQkga86W5knagjD/ i8AZ2dGwd14q6TSgZxn+UT8cSImaGELWqf2n1Dz/yY22pxeTe1JPyigtKA+c/7LeMxhDV2991RV 6s1xHAyewlYRKAb0gJk/wgxXQBdCqmQeePk55UxR4WBquLnGScJJ8jTUIbd9gbqq0/ei/W184yW EN8m/eG+vlZIBF2CDRMXW1tZDSFUU/BX/udWwbR5+PgDM9Gu8+lfV0Co13rK6uiK X-Google-Smtp-Source: AGHT+IGudAHHopu53N7tpG/x8168SiTNU4SKuONzo3OxcKIF2skhdmHuhbAtZwBbx/AzATDSYWdMhQ== X-Received: by 2002:a05:6a21:3298:b0:21a:d503:f47c with SMTP id adf61e73a8af0-21fbd63484dmr22390584637.28.1750195269176; Tue, 17 Jun 2025 14:21:09 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:08 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 22/27] glibc: nptl Remove unnecessary catch-all-wake in condvar group switch Date: Tue, 17 Jun 2025 14:20:19 -0700 Message-ID: <02f2ac08edb506ec43cec93a5b09f5e6d7df02ec.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218939 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=b42cc6af11062c260c7dfa91f1c89891366fed3e] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-3.patch | 77 +++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 78 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-3.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-3.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-3.patch new file mode 100644 index 0000000000..4cfcca846c --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-3.patch @@ -0,0 +1,77 @@ +From 28a5082045429fdc5a4744d45fdc5b5202528eaa Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Mon, 16 Jun 2025 23:29:49 -0700 +Subject: [PATCH] nptl: Remove unnecessary catch-all-wake in condvar group + switch + +This wake is unnecessary. We only switch groups after every sleeper in a group +has been woken. Sure, they may take a while to actually wake up and may still +hold a reference, but waking them a second time doesn't speed that up. Instead +this just makes the code more complicated and may hide problems. + +In particular this safety wake wouldn't even have helped with the bug that was +fixed by Barrus' patch: The bug there was that pthread_cond_signal would not +switch g1 when it should, so we wouldn't even have entered this code path. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=b42cc6af11062c260c7dfa91f1c89891366fed3e] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_common.c | 30 +----------------------------- + 1 file changed, 1 insertion(+), 29 deletions(-) + +diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c +index 306a207dd6..f976a533a1 100644 +--- a/nptl/pthread_cond_common.c ++++ b/nptl/pthread_cond_common.c +@@ -221,13 +221,7 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + * New waiters arriving concurrently with the group switching will all go + into G2 until we atomically make the switch. Waiters existing in G2 + are not affected. +- * Waiters in G1 have already received a signal and been woken. If they +- haven't woken yet, they will be closed out immediately by the advancing +- of __g_signals to the next "lowseq" (low 31 bits of the new g1_start), +- which will prevent waiters from blocking using a futex on +- __g_signals since it provides enough signals for all possible +- remaining waiters. As a result, they can each consume a signal +- and they will eventually remove their group reference. */ ++ * Waiters in G1 have already received a signal and been woken. */ + + /* Update __g1_start, which finishes closing this group. The value we add + will never be negative because old_orig_size can only be zero when we +@@ -240,28 +234,6 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + + unsigned int lowseq = ((old_g1_start + old_orig_size) << 1) & ~1U; + +- /* If any waiters still hold group references (and thus could be blocked), +- then wake them all up now and prevent any running ones from blocking. +- This is effectively a catch-all for any possible current or future +- bugs that can allow the group size to reach 0 before all G1 waiters +- have been awakened or at least given signals to consume, or any +- other case that can leave blocked (or about to block) older waiters.. */ +- if ((atomic_fetch_or_release (cond->__data.__g_refs + g1, 0) >> 1) > 0) +- { +- /* First advance signals to the end of the group (i.e. enough signals +- for the entire G1 group) to ensure that waiters which have not +- yet blocked in the futex will not block. +- Note that in the vast majority of cases, this should never +- actually be necessary, since __g_signals will have enough +- signals for the remaining g_refs waiters. As an optimization, +- we could check this first before proceeding, although that +- could still leave the potential for futex lost wakeup bugs +- if the signal count was non-zero but the futex wakeup +- was somehow lost. */ +- atomic_store_release (cond->__data.__g_signals + g1, lowseq); +- +- futex_wake (cond->__data.__g_signals + g1, INT_MAX, private); +- } + /* At this point, the old G1 is now a valid new G2 (but not in use yet). + No old waiter can neither grab a signal nor acquire a reference without + noticing that __g1_start is larger. +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 92c4dad023..5e1f45608e 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -64,6 +64,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0025-CVE-2025-4802.patch \ file://0026-PR25847-1.patch \ file://0026-PR25847-2.patch \ + file://0026-PR25847-3.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65188 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54C98C7115B for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web10.31279.1750195271917005527 for ; Tue, 17 Jun 2025 14:21:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=vOoGn6Sg; spf=softfail (domain: sakoman.com, ip: 209.85.210.171, mailfrom: steve@sakoman.com) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-74801bc6dc5so90974b3a.1 for ; Tue, 17 Jun 2025 14:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195271; x=1750800071; 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; bh=2ep62FNMWcnUYn81+hk0f+oUs3Hqk4erI1Xwgyr+s5Y=; b=vOoGn6SgQ6wBDTxrLaRVYAHpl3NwVf30x4DJA+9ofYz2h3briYcwg2jGkOtpelgcDg olnpU00Dhota0oPjOk8kv9kdeTU0UGL9QnVYSCtZsUNViTr0ddWbs3HxfdDZQ15I6DSw 4FDIkDH85CzIM18j91z2DuEXB/5vVO0GYnDDwuSTvUZ/IlPvCJIeyxjyQ0fs4Sn5zZxo MV+Ae72kxp+Yd++X/YVDDV1KiK4wMAQy6NPNV+kusm82x43j6GoMBvJQLNzUth1L7uwp HwupJH7Hqx7NEZNnTTp0aEBhFcNwh2I5ZoRpobvbGfh3YM6GGJt0J1rtrxfp9ap7Peb8 rv4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195271; x=1750800071; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2ep62FNMWcnUYn81+hk0f+oUs3Hqk4erI1Xwgyr+s5Y=; b=VaJLOdQx+ViqHxITjJJYOZYkwfAthIryVqjRCVPSG4fWjGZLLbS0lxczP69vXEymOc PKInc/7j9PtzhBVJdLjVT4KFNISaiqEwT7hTFDuAwnI+DwedwqzTcvbwm3I5QY1fU+H8 Yx2PYGfO97KTO0ObB+fAZ1rU0fy4HVegEo+KSoKkdbL92QiZ1zSGAV63I/rAU/rb+23k lyc/bTrtsJUMpQCNW//pyguOiKJgc3BuljLjs/CUGU+fkKcfNdP6qoazRWjdy2bGv8C3 D//qZBKCGhrpJ5XitqjZtRmEZhiC58AUBF5mKyz+HO7vM3ft4tcZM00Q2HbMz8lpr3NF toeg== X-Gm-Message-State: AOJu0YyI2ydz/IK6bdADUH08bYCpb9sIlWvloQGbRc0F42TSjUqpBgNd 7iABSPdY4fFhv279sJ0dbZjZ8M8YcLZkgk6OjIrW3REFFGAHwWgDiz/VEo/9hdIgn+08WdDJ+19 rTFxi X-Gm-Gg: ASbGncs5KfJWz0QnN7L0lmQ5kmNEAzHz2/5J301FqcDtVr8rMHq2c6zZqWTMZj7/JWS tYUYlKUnbEC/ZQ4Ig0VYBoUjVEfTQao+GRurejt6j02GCFetFsAqiGa1Ka61hCdmhqIBHHYTRGM 9CVQQzs0+XEOZY+sBuCb/hvTl3HyHIZdDz1tTaaErbEe3Qr/nTnAy2pOlxWytLAelU989m3s2CB zHQOqlNXEP97zIDA2xcTIZ1H5TYdKXrl1yK/Ud06FsvrHoiaywKpxssGQCgiSa5eEPpXtgm4l0O Y2Z+OFWeKgesteQClY5kD8a64jqusqkbxmBBAOirm2+ceFQvzXcpGw== X-Google-Smtp-Source: AGHT+IEIPlK9YCwF51qSAHWSZH7PjDb/BIQjs/A458JzvbuO8ISzq7A9AKP13wLUIB+Xtyxb4KiGlw== X-Received: by 2002:a05:6a00:2282:b0:748:e289:6bc with SMTP id d2e1a72fcca58-748e6ec48dcmr108012b3a.1.1750195270751; Tue, 17 Jun 2025 14:21:10 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:10 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 23/27] glibc: nptl Remove unnecessary quadruple check in pthread_cond_wait Date: Tue, 17 Jun 2025 14:20:20 -0700 Message-ID: <761758340002f9dbff8e0668f4883ff623b232a0.1750195103.git.steve@sakoman.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218940 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=4f7b051f8ee3feff1b53b27a906f245afaa9cee1] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-4.patch | 117 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 118 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-4.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-4.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-4.patch new file mode 100644 index 0000000000..f8674d62ae --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-4.patch @@ -0,0 +1,117 @@ +From 16b9af737c77b153fca4f36cbdbe94f7416c0b42 Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Mon, 16 Jun 2025 23:38:40 -0700 +Subject: [PATCH] nptl: Remove unnecessary quadruple check in pthread_cond_wait + +pthread_cond_wait was checking whether it was in a closed group no less than +four times. Checking once is enough. Here are the four checks: + +1. While spin-waiting. This was dead code: maxspin is set to 0 and has been + for years. +2. Before deciding to go to sleep, and before incrementing grefs: I kept this +3. After incrementing grefs. There is no reason to think that the group would + close while we do an atomic increment. Obviously it could close at any + point, but that doesn't mean we have to recheck after every step. This + check was equally good as check 2, except it has to do more work. +4. When we find ourselves in a group that has a signal. We only get here after + we check that we're not in a closed group. There is no need to check again. + The check would only have helped in cases where the compare_exchange in the + next line would also have failed. Relying on the compare_exchange is fine. + +Removing the duplicate checks clarifies the code. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=4f7b051f8ee3feff1b53b27a906f245afaa9cee1] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_wait.c | 49 ---------------------------------------- + 1 file changed, 49 deletions(-) + +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index cee1968756..47e834cade 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -366,7 +366,6 @@ static __always_inline int + __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + clockid_t clockid, const struct __timespec64 *abstime) + { +- const int maxspin = 0; + int err; + int result = 0; + +@@ -425,33 +424,6 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); + unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + +- /* Spin-wait first. +- Note that spinning first without checking whether a timeout +- passed might lead to what looks like a spurious wake-up even +- though we should return ETIMEDOUT (e.g., if the caller provides +- an absolute timeout that is clearly in the past). However, +- (1) spurious wake-ups are allowed, (2) it seems unlikely that a +- user will (ab)use pthread_cond_wait as a check for whether a +- point in time is in the past, and (3) spinning first without +- having to compare against the current time seems to be the right +- choice from a performance perspective for most use cases. */ +- unsigned int spin = maxspin; +- while (spin > 0 && ((int)(signals - lowseq) < 2)) +- { +- /* Check that we are not spinning on a group that's already +- closed. */ +- if (seq < (g1_start >> 1)) +- break; +- +- /* TODO Back off. */ +- +- /* Reload signals. See above for MO. */ +- signals = atomic_load_acquire (cond->__data.__g_signals + g); +- g1_start = __condvar_load_g1_start_relaxed (cond); +- lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; +- spin--; +- } +- + if (seq < (g1_start >> 1)) + { + /* If the group is closed already, +@@ -482,24 +454,6 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + an atomic read-modify-write operation and thus extend the release + sequence. */ + atomic_fetch_add_acquire (cond->__data.__g_refs + g, 2); +- signals = atomic_load_acquire (cond->__data.__g_signals + g); +- g1_start = __condvar_load_g1_start_relaxed (cond); +- lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; +- +- if (seq < (g1_start >> 1)) +- { +- /* group is closed already, so don't block */ +- __condvar_dec_grefs (cond, g, private); +- goto done; +- } +- +- if ((int)(signals - lowseq) >= 2) +- { +- /* a signal showed up or G1/G2 switched after we grabbed the +- refcount */ +- __condvar_dec_grefs (cond, g, private); +- break; +- } + + // Now block. + struct _pthread_cleanup_buffer buffer; +@@ -533,9 +487,6 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + /* Reload signals. See above for MO. */ + signals = atomic_load_acquire (cond->__data.__g_signals + g); + } +- +- if (seq < (__condvar_load_g1_start_relaxed (cond) >> 1)) +- goto done; + } + /* Try to grab a signal. See above for MO. (if we do another loop + iteration we need to see the correct value of g1_start) */ +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 5e1f45608e..bb5d22cfe8 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -65,6 +65,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-PR25847-1.patch \ file://0026-PR25847-2.patch \ file://0026-PR25847-3.patch \ + file://0026-PR25847-4.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54D10C7115F for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web11.31436.1750195273282730357 for ; Tue, 17 Jun 2025 14:21:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=NSn8ZdcD; spf=softfail (domain: sakoman.com, ip: 209.85.215.172, mailfrom: steve@sakoman.com) Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-b2f62bbb5d6so5070406a12.0 for ; Tue, 17 Jun 2025 14:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195272; x=1750800072; 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; bh=C/bqgyilaqk6UIx4dpsmeB5JIKMqTNMymqgluZio464=; b=NSn8ZdcDSRr7sHfWRmuP6CwBJhb9OvwB797nCGK2LmNdoyENPgMsJDBIeU1BrIKbQ+ Ioz+bQ1FmJYmYnFVdddzTLb5Kbaa2MP2wfhDDgQ9Zvc4XNp05Bzy2P/4mQAEAcQQ09ZN Z+NMkKrzu4l3yzVUcjrpKytzcyTXA6Akb36OFIchhELBc1zU3/ipn3Rzu441kFMlPW6D lfN4SkM6bXjZfp4HKYmaMTlTTyeW2acof7E6NQfr3t/2i6bts0RANRh4SVn0322jhX+x jQDQ4miNYJGOZYAGV/JjnVkVj6jjji7pk19SSTfEMNw7lUpAg0uU408nUqQlOfQBPve/ 6xjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195272; x=1750800072; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C/bqgyilaqk6UIx4dpsmeB5JIKMqTNMymqgluZio464=; b=dcJr6M1JEBqzbcvUDfzBfD9D2BBAAOD4zVGkpNXLdhLfLzikRebtm3G29xkipQCQ1t 0U2Yc+0tMRZTnET+XsDxoZ9JAv2oJ98OZcJuQolWLPZoFw3QIF0m0Hk2wH1PJ2vkz/A/ sMovVEtghcbe92vyM5zOIABH7vSybc/19PrM5NQ83dq/glnee7D4S3p3mQrzGEqyGvqm gRbqQfu8+dlxkLk8SW7B1aiE+aQ0es3KNEnY9CVywauqAQfzgVJQNWGAV5iXy5ZQQ45q KRu8YAHL74QPrx6Y+FUtNGEds/UxYhKk3vT/wrt/wrIeAedTRC9EygM6JzewtkgGPCfG XTRg== X-Gm-Message-State: AOJu0Ywu54mXvP8MrYtiVPr0DMd0uMztbHGVWWwD3byzd1oTBJHSpVIw WZErztZVZwaG52K5XlchTuTQktroKiN0ANtgNUkmL/tU2naK/Lh2AM31TKczTsd540OuAJme66r tDYcy X-Gm-Gg: ASbGncuvGwNxvTwrfLInOwYpyQN3yd//v/nl7WnPFXYAB7+ProG0RR38gaDn4TO3zzb INR3yModWeLr8w2pPW5+VU8yS0X3nfNyJe7HMqQAGveI1iwGlPWs2q45CvnR0Cc58ysuVkuk0h1 JnjuZIKoKV5dsbpP04NfmAGBpl7DEQtlSN7beFVQzFDWjPK+vQOXWA78JdSGfeHhcqxqWzhkERD gi78Ixu/RARAYdsExzsK870zWdaSPdkVt14G+liruIsNukSffC7mIeVne1BBLLP/wVVfDP+SZGH s1c2jCV2WUeoz0g0DxNe4WHoNbPFiwjWpj0wlazDBuDhyLF8chxa6Q== X-Google-Smtp-Source: AGHT+IGR4PM9ft5ujoZmKLp/JjCJYQ/M9Q48VdNGm0rJCZXekiQoaEyNkVwFE9dbRUsFFESEcwbqTQ== X-Received: by 2002:a05:6a20:a115:b0:1ee:e20f:f14e with SMTP id adf61e73a8af0-21fbd668cacmr22957642637.38.1750195272317; Tue, 17 Jun 2025 14:21:12 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:12 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 24/27] glibc: nptl Use a single loop in pthread_cond_wait instaed of a nested loop Date: Tue, 17 Jun 2025 14:20:21 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218941 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=929a4764ac90382616b6a21f099192b2475da674] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-5.patch | 105 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 106 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-5.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-5.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-5.patch new file mode 100644 index 0000000000..16fe6f8460 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-5.patch @@ -0,0 +1,105 @@ +From d9ffb50dc55f77e584a5d0275eea758c7a6b04e3 Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Mon, 16 Jun 2025 23:53:35 -0700 +Subject: [PATCH] nptl: Use a single loop in pthread_cond_wait instaed of a + nested loop + +The loop was a little more complicated than necessary. There was only one +break statement out of the inner loop, and the outer loop was nearly empty. +So just remove the outer loop, moving its code to the one break statement in +the inner loop. This allows us to replace all gotos with break statements. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=929a4764ac90382616b6a21f099192b2475da674] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_wait.c | 41 +++++++++++++++++++--------------------- + 1 file changed, 19 insertions(+), 22 deletions(-) + +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index 47e834cade..5c86880105 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -410,17 +410,15 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + return err; + } + +- /* Now wait until a signal is available in our group or it is closed. +- Acquire MO so that if we observe (signals == lowseq) after group +- switching in __condvar_quiesce_and_switch_g1, we synchronize with that +- store and will see the prior update of __g1_start done while switching +- groups too. */ +- unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); +- +- do +- { ++ + while (1) + { ++ /* Now wait until a signal is available in our group or it is closed. ++ Acquire MO so that if we observe (signals == lowseq) after group ++ switching in __condvar_quiesce_and_switch_g1, we synchronize with that ++ store and will see the prior update of __g1_start done while switching ++ groups too. */ ++ unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); + uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); + unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + +@@ -429,7 +427,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + /* If the group is closed already, + then this waiter originally had enough extra signals to + consume, up until the time its group was closed. */ +- goto done; ++ break; + } + + /* If there is an available signal, don't block. +@@ -438,8 +436,16 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + G2, but in either case we're allowed to consume the available + signal and should not block anymore. */ + if ((int)(signals - lowseq) >= 2) +- break; +- ++ { ++ /* Try to grab a signal. See above for MO. (if we do another loop ++ iteration we need to see the correct value of g1_start) */ ++ if (atomic_compare_exchange_weak_acquire ( ++ cond->__data.__g_signals + g, ++ &signals, signals - 2)) ++ break; ++ else ++ continue; ++ } + /* No signals available after spinning, so prepare to block. + We first acquire a group reference and use acquire MO for that so + that we synchronize with the dummy read-modify-write in +@@ -479,21 +485,12 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + the lock during cancellation is not possible. */ + __condvar_cancel_waiting (cond, seq, g, private); + result = err; +- goto done; ++ break; + } + else + __condvar_dec_grefs (cond, g, private); + +- /* Reload signals. See above for MO. */ +- signals = atomic_load_acquire (cond->__data.__g_signals + g); + } +- } +- /* Try to grab a signal. See above for MO. (if we do another loop +- iteration we need to see the correct value of g1_start) */ +- while (!atomic_compare_exchange_weak_acquire (cond->__data.__g_signals + g, +- &signals, signals - 2)); +- +- done: + + /* Confirm that we have been woken. We do that before acquiring the mutex + to allow for execution of pthread_cond_destroy while having acquired the +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index bb5d22cfe8..04dcb22c3d 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -66,6 +66,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-PR25847-2.patch \ file://0026-PR25847-3.patch \ file://0026-PR25847-4.patch \ + file://0026-PR25847-5.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65190 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DA5FC761AE for ; Tue, 17 Jun 2025 21:21:15 +0000 (UTC) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mx.groups.io with SMTP id smtpd.web11.31437.1750195274847721113 for ; Tue, 17 Jun 2025 14:21:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=OwpPAUuY; spf=softfail (domain: sakoman.com, ip: 209.85.215.176, mailfrom: steve@sakoman.com) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-b2f603b0ef6so4597601a12.1 for ; Tue, 17 Jun 2025 14:21:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195274; x=1750800074; 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; bh=yQ4C/tkDQao32UMPO5rgOvjp/qNsjyrn2Vi2Mq0mVhY=; b=OwpPAUuY1S5Sk6CbJlX7+L/2/mps6K4Sq6UuvOsanUTl/ka5OzFQDi4QUVsXukKeE5 sJsbkSloMQkiq2YnqiQPvsewsftNZKP8rcxjZ8ePYmVthBy+xHoD+APTMukz5kvN3ajf hOYgESs90xMUComyjQ2UFgWJkn+cQcBdSOJ0xR2xHAhrHYKWf6IqPl3cOjS21DSHUeOC lUm1F5svE4caEvc6I/RmKwVaGB/n5r9VM+YhtJ8m2Lz3QZA8FOlSqAubMwdanswioYnp 2cyqYIo15T3VxDwPcUFT47ACit9Xg84iMPhr4mJsaM7uBVlVx58upfmRSd+XMjaAyeBf 8CYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195274; x=1750800074; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yQ4C/tkDQao32UMPO5rgOvjp/qNsjyrn2Vi2Mq0mVhY=; b=QW+324oaZ8WVihqti6RWcr8fgdYsKzX0BWmsCu1nurZdEyh3yUUx8kvVHXSKZNB+xv GdCpzso44S9ExYB68p2Rxv8xdwSTQAIhG9eaKn8N2EZtGs8uAisCFpAQ7iPjWkVjzIhN NocS+rM405PM0zaj4Y+a5VJaKTW8YSIb06wbx3U288NugmsH8o86UqcOADwBJAnqNIEh Kl6d9swCYBeHYEeNL2cfosjGcJLYFVFEIqmFLTfV9ZMEDTnXD3+fUBJIqtO/X4chAU1R Y6/L/osvCrysbdc82raBKOqcNYh8wDqi9c7FHN4vrHN5SZujY6uSzJA56QU7K9hzdW2Q sASQ== X-Gm-Message-State: AOJu0YylPjaXTfWxDy5AWJnc1RVm6sVn9T5kwhJbdsnga27shcGIjxut zvTVpvpCnwbSeVSdPqjUuVC7YsPMg70fcC/3Hwul17UvDXjcNvWHV1y983exkNrP3Y+V7OmpH2A QBXHJ X-Gm-Gg: ASbGncs3psJVl0AhdORiNPXIO0Xqv22tOEgJVL4RJjKNHoIKKtJ8d1Pwd8Fmrs4jlxe 5mIRQCY+bLcTM1A1w6HNq8pt/jh65cyFICPmRvRgoVpWrDGkXEP3WwOA5ACAOgQzvt8YJsNMg8x yZ3VKfZOc1oUySZBUtW5yvncTilBeo97ZTeGSKVvoTuoCyjdFpKHsCVv1njQrAO/QwZRSZM7tIP 9smSV0Hsg1uLiGlYqaTBqV96jgD0lkri7X55XvGh3qMs2lZuoBE8sIxy0ZukagoFUGnNmkA+yVS ySn6CGQT1rPM7sMA5QO+830GizgdftdtB+B9/J8Q9GwRRxKI2Btgew== X-Google-Smtp-Source: AGHT+IE271VMeZXXDJp8O4UW3eVLchrp38po9fri+qqHVC+yMOFoRRgN6UzJLbDfLCmO/OiaK/OtNg== X-Received: by 2002:a05:6a21:9ccb:b0:21f:4ecc:11a9 with SMTP id adf61e73a8af0-21fbd7b01ccmr21624302637.32.1750195273969; Tue, 17 Jun 2025 14:21:13 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:13 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 25/27] glibc: nptl Fix indentation Date: Tue, 17 Jun 2025 14:20:22 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:15 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218942 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=ee6c14ed59d480720721aaacc5fb03213dc153da] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-6.patch | 169 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 170 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-6.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-6.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-6.patch new file mode 100644 index 0000000000..cf87e21ddd --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-6.patch @@ -0,0 +1,169 @@ +From a2faee6d0dac6e5232255da9afda4d9ed6cfb6e5 Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Tue, 17 Jun 2025 01:37:12 -0700 +Subject: [PATCH] nptl: Fix indentation + +In my previous change I turned a nested loop into a simple loop. I'm doing +the resulting indentation changes in a separate commit to make the diff on +the previous commit easier to review. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=ee6c14ed59d480720721aaacc5fb03213dc153da] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_wait.c | 132 ++++++++++++++++----------------------- + 1 file changed, 54 insertions(+), 78 deletions(-) + +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index 5c86880105..104ebd48ca 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -410,87 +410,63 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + return err; + } + +- +- while (1) +- { +- /* Now wait until a signal is available in our group or it is closed. +- Acquire MO so that if we observe (signals == lowseq) after group +- switching in __condvar_quiesce_and_switch_g1, we synchronize with that +- store and will see the prior update of __g1_start done while switching +- groups too. */ +- unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); +- uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); +- unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; +- +- if (seq < (g1_start >> 1)) +- { +- /* If the group is closed already, +- then this waiter originally had enough extra signals to +- consume, up until the time its group was closed. */ +- break; +- } +- +- /* If there is an available signal, don't block. +- If __g1_start has advanced at all, then we must be in G1 +- by now, perhaps in the process of switching back to an older +- G2, but in either case we're allowed to consume the available +- signal and should not block anymore. */ +- if ((int)(signals - lowseq) >= 2) +- { +- /* Try to grab a signal. See above for MO. (if we do another loop +- iteration we need to see the correct value of g1_start) */ +- if (atomic_compare_exchange_weak_acquire ( +- cond->__data.__g_signals + g, ++ while (1) ++ { ++ /* Now wait until a signal is available in our group or it is closed. ++ Acquire MO so that if we observe (signals == lowseq) after group ++ switching in __condvar_quiesce_and_switch_g1, we synchronize with that ++ store and will see the prior update of __g1_start done while switching ++ groups too. */ ++ unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); ++ uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); ++ unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; ++ ++ if (seq < (g1_start >> 1)) ++ { ++ /* If the group is closed already, ++ then this waiter originally had enough extra signals to ++ consume, up until the time its group was closed. */ ++ break; ++ } ++ ++ /* If there is an available signal, don't block. ++ If __g1_start has advanced at all, then we must be in G1 ++ by now, perhaps in the process of switching back to an older ++ G2, but in either case we're allowed to consume the available ++ signal and should not block anymore. */ ++ if ((int)(signals - lowseq) >= 2) ++ { ++ /* Try to grab a signal. See above for MO. (if we do another loop ++ iteration we need to see the correct value of g1_start) */ ++ if (atomic_compare_exchange_weak_acquire ( ++ cond->__data.__g_signals + g, + &signals, signals - 2)) +- break; +- else +- continue; +- } +- /* No signals available after spinning, so prepare to block. +- We first acquire a group reference and use acquire MO for that so +- that we synchronize with the dummy read-modify-write in +- __condvar_quiesce_and_switch_g1 if we read from that. In turn, +- in this case this will make us see the advancement of __g_signals +- to the upcoming new g1_start that occurs with a concurrent +- attempt to reuse the group's slot. +- We use acquire MO for the __g_signals check to make the +- __g1_start check work (see spinning above). +- Note that the group reference acquisition will not mask the +- release MO when decrementing the reference count because we use +- an atomic read-modify-write operation and thus extend the release +- sequence. */ +- atomic_fetch_add_acquire (cond->__data.__g_refs + g, 2); +- +- // Now block. +- struct _pthread_cleanup_buffer buffer; +- struct _condvar_cleanup_buffer cbuffer; +- cbuffer.wseq = wseq; +- cbuffer.cond = cond; +- cbuffer.mutex = mutex; +- cbuffer.private = private; +- __pthread_cleanup_push (&buffer, __condvar_cleanup_waiting, &cbuffer); +- +- err = __futex_abstimed_wait_cancelable64 ( +- cond->__data.__g_signals + g, signals, clockid, abstime, private); +- +- __pthread_cleanup_pop (&buffer, 0); +- +- if (__glibc_unlikely (err == ETIMEDOUT || err == EOVERFLOW)) +- { +- __condvar_dec_grefs (cond, g, private); +- /* If we timed out, we effectively cancel waiting. Note that +- we have decremented __g_refs before cancellation, so that a +- deadlock between waiting for quiescence of our group in +- __condvar_quiesce_and_switch_g1 and us trying to acquire +- the lock during cancellation is not possible. */ +- __condvar_cancel_waiting (cond, seq, g, private); +- result = err; + break; +- } +- else +- __condvar_dec_grefs (cond, g, private); +- ++ else ++ continue; + } ++ // Now block. ++ struct _pthread_cleanup_buffer buffer; ++ struct _condvar_cleanup_buffer cbuffer; ++ cbuffer.wseq = wseq; ++ cbuffer.cond = cond; ++ cbuffer.mutex = mutex; ++ cbuffer.private = private; ++ __pthread_cleanup_push (&buffer, __condvar_cleanup_waiting, &cbuffer); ++ ++ err = __futex_abstimed_wait_cancelable64 ( ++ cond->__data.__g_signals + g, signals, clockid, abstime, private); ++ ++ __pthread_cleanup_pop (&buffer, 0); ++ ++ if (__glibc_unlikely (err == ETIMEDOUT || err == EOVERFLOW)) ++ { ++ /* If we timed out, we effectively cancel waiting. */ ++ __condvar_cancel_waiting (cond, seq, g, private); ++ result = err; ++ break; ++ } ++ } + + /* Confirm that we have been woken. We do that before acquiring the mutex + to allow for execution of pthread_cond_destroy while having acquired the +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 04dcb22c3d..d3c0cbd703 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -67,6 +67,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-PR25847-3.patch \ file://0026-PR25847-4.patch \ file://0026-PR25847-5.patch \ + file://0026-PR25847-6.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65192 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65DA6C71136 for ; Tue, 17 Jun 2025 21:21:25 +0000 (UTC) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web11.31439.1750195276569450290 for ; Tue, 17 Jun 2025 14:21:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=j3DyBrGC; spf=softfail (domain: sakoman.com, ip: 209.85.215.179, mailfrom: steve@sakoman.com) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-b2f62bbb5d6so5070444a12.0 for ; Tue, 17 Jun 2025 14:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195276; x=1750800076; 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; bh=jETi5rplYRmxTDWSiK8F3DabK0IwNd1381dc/j9zDuM=; b=j3DyBrGC0fsQRgHrt0KMI47MwnMFUeogr90lhoeiRT4cUuoO1elNo6jFMPpD0oahL5 ckVuMjlj6U3aqKi3Dhx5cIy+fhJq7WZP1393jlYxkkZAAD1bRJBqHZx+cvO/TS2Ob6KA 1gkS1DAH9YTMhbH6Audbx755XSoFBdx3+kNVxwYbvaeJtA+XrpqZTjKAjD6I+qAmA3UL KKDegPFd3YaHiUU44L8MyxdP0i8NdW0IdTBA7vvsLBRlfHXE5InkBMPLSCiW8SwZJQWy bztfintn90bezCH7UF8Gy0V9cxk2J7Lh9UtTTRUBVCO5KIbHB2DHFrbahuLKlhgG9ZI5 dnKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195276; x=1750800076; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jETi5rplYRmxTDWSiK8F3DabK0IwNd1381dc/j9zDuM=; b=rpP+RuNfjvwgyTKkXbYonZWHc7Na3Gk3v6Tl3aBeh51xhSPmi+mttSKYIXcm/lX7lr xvb1aVLqOv0oJA7H6ildrFe7hffMTr9nWSEyOFc3DLStrSeOCSLNVw0RTzJfFyTS26GS 4PE6Z3glNCmVYaw/wPwUAJwwuchA4afh4Z74SQXvGIDMSqEXCSn0Vt1KqaPZKBm8KVLB dgW8fHsEwq6KcZKy4LC8cJc+WrHF8pVPR65hBg6lLKa7R2NuwsECh/1jjCiReuVPjdVV FFyBQ9z0vgmNPzd783LTYxqcuHgcolZxY4qH6aDS9NW6yPWChlwKHc+EXwlUS/qj2dbb sWBQ== X-Gm-Message-State: AOJu0YzpIQXfP55SeAdZyPjJY/KOCYGNPOd0Ggj1O7VL5z95bRQPGw+z UUZ/4CPbhUy7iRbl9JIB12i54HcGM+IJ0yBcGZxMNvbH3wAoMsR2cVP/oaqZ55sPUteD7iRKZEx 6RCau X-Gm-Gg: ASbGncufMsYU0DeM8Oas5dNhSbUocSK1Sq48ttSFCOTMHj5uBa82041OtQYK6BsMA2n xBkhMmHBEQe4z8tFKuUDXZwnkpam0EGMQOjeBM702LiE0MYl22UjciUwz1jKhwNFzmLVe46W76P UhOfZ1y19qfcYCS76qfPdQW8HGNQYsEKV9lfz17LxwYTm2vTXSgcQ5HFA6iDBKk/LPFWhb0gImV 22MmxIlhV7t8ZWTrOk7ZffGs6YGut7wMyhsZPL8HIRxd1IwMSGBZsJdP11xstSbvAUkYEuNOTQI HbtcztPsiS+tbSBAOA/K28pn6FboYO7BYf2NKTQVM9CBrZHs5P4ASg== X-Google-Smtp-Source: AGHT+IEFAUjLqTsV/AD3wcDyhTfxwvKWQSDo71J7gAtnyhhadrYNixLyd9stLwmIl1u2CE78IPIhCQ== X-Received: by 2002:a05:6a20:6f08:b0:21f:543f:f124 with SMTP id adf61e73a8af0-21fbd5f1ecamr25624547637.24.1750195275545; Tue, 17 Jun 2025 14:21:15 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:15 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 26/27] glibc: nptl rename __condvar_quiesce_and_switch_g1 Date: Tue, 17 Jun 2025 14:20:23 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218943 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=4b79e27a5073c02f6bff9aa8f4791230a0ab1867] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-7.patch | 160 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 161 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-7.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-7.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-7.patch new file mode 100644 index 0000000000..a9e9cc7c48 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-7.patch @@ -0,0 +1,160 @@ +From 2a601ac9041e2ca645acad2c174b1c545cfceafe Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Tue, 17 Jun 2025 01:53:25 -0700 +Subject: [PATCH] nptl: rename __condvar_quiesce_and_switch_g1 + +This function no longer waits for threads to leave g1, so rename it to +__condvar_switch_g1 + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=4b79e27a5073c02f6bff9aa8f4791230a0ab1867] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_broadcast.c | 4 ++-- + nptl/pthread_cond_common.c | 26 ++++++++++++-------------- + nptl/pthread_cond_signal.c | 17 ++++++++--------- + nptl/pthread_cond_wait.c | 9 ++++----- + 4 files changed, 26 insertions(+), 30 deletions(-) + +diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c +index 5ae141ac81..a07435589a 100644 +--- a/nptl/pthread_cond_broadcast.c ++++ b/nptl/pthread_cond_broadcast.c +@@ -60,7 +60,7 @@ ___pthread_cond_broadcast (pthread_cond_t *cond) + cond->__data.__g_size[g1] << 1); + cond->__data.__g_size[g1] = 0; + +- /* We need to wake G1 waiters before we quiesce G1 below. */ ++ /* We need to wake G1 waiters before we switch G1 below. */ + /* TODO Only set it if there are indeed futex waiters. We could + also try to move this out of the critical section in cases when + G2 is empty (and we don't need to quiesce). */ +@@ -69,7 +69,7 @@ ___pthread_cond_broadcast (pthread_cond_t *cond) + + /* G1 is complete. Step (2) is next unless there are no waiters in G2, in + which case we can stop. */ +- if (__condvar_quiesce_and_switch_g1 (cond, wseq, &g1, private)) ++ if (__condvar_switch_g1 (cond, wseq, &g1, private)) + { + /* Step (3): Send signals to all waiters in the old G2 / new G1. */ + atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, +diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c +index f976a533a1..3baac4dabc 100644 +--- a/nptl/pthread_cond_common.c ++++ b/nptl/pthread_cond_common.c +@@ -189,16 +189,15 @@ __condvar_get_private (int flags) + return FUTEX_SHARED; + } + +-/* This closes G1 (whose index is in G1INDEX), waits for all futex waiters to +- leave G1, converts G1 into a fresh G2, and then switches group roles so that +- the former G2 becomes the new G1 ending at the current __wseq value when we +- eventually make the switch (WSEQ is just an observation of __wseq by the +- signaler). ++/* This closes G1 (whose index is in G1INDEX), converts G1 into a fresh G2, ++ and then switches group roles so that the former G2 becomes the new G1 ++ ending at the current __wseq value when we eventually make the switch ++ (WSEQ is just an observation of __wseq by the signaler). + If G2 is empty, it will not switch groups because then it would create an + empty G1 which would require switching groups again on the next signal. + Returns false iff groups were not switched because G2 was empty. */ + static bool __attribute__ ((unused)) +-__condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, ++__condvar_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + unsigned int *g1index, int private) + { + unsigned int g1 = *g1index; +@@ -214,8 +213,7 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + + cond->__data.__g_size[g1 ^ 1]) == 0) + return false; + +- /* Now try to close and quiesce G1. We have to consider the following kinds +- of waiters: ++ /* We have to consider the following kinds of waiters: + * Waiters from less recent groups than G1 are not affected because + nothing will change for them apart from __g1_start getting larger. + * New waiters arriving concurrently with the group switching will all go +@@ -223,12 +221,12 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + are not affected. + * Waiters in G1 have already received a signal and been woken. */ + +- /* Update __g1_start, which finishes closing this group. The value we add +- will never be negative because old_orig_size can only be zero when we +- switch groups the first time after a condvar was initialized, in which +- case G1 will be at index 1 and we will add a value of 1. +- Relaxed MO is fine because the change comes with no additional +- constraints that others would have to observe. */ ++ /* Update __g1_start, which closes this group. The value we add will never ++ be negative because old_orig_size can only be zero when we switch groups ++ the first time after a condvar was initialized, in which case G1 will be ++ at index 1 and we will add a value of 1. Relaxed MO is fine because the ++ change comes with no additional constraints that others would have to ++ observe. */ + __condvar_add_g1_start_relaxed (cond, + (old_orig_size << 1) + (g1 == 1 ? 1 : - 1)); + +diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c +index 14800ba00b..a9bc10dcca 100644 +--- a/nptl/pthread_cond_signal.c ++++ b/nptl/pthread_cond_signal.c +@@ -69,18 +69,17 @@ ___pthread_cond_signal (pthread_cond_t *cond) + bool do_futex_wake = false; + + /* If G1 is still receiving signals, we put the signal there. If not, we +- check if G2 has waiters, and if so, quiesce and switch G1 to the former +- G2; if this results in a new G1 with waiters (G2 might have cancellations +- already, see __condvar_quiesce_and_switch_g1), we put the signal in the +- new G1. */ ++ check if G2 has waiters, and if so, switch G1 to the former G2; if this ++ results in a new G1 with waiters (G2 might have cancellations already, ++ see __condvar_switch_g1), we put the signal in the new G1. */ + if ((cond->__data.__g_size[g1] != 0) +- || __condvar_quiesce_and_switch_g1 (cond, wseq, &g1, private)) ++ || __condvar_switch_g1 (cond, wseq, &g1, private)) + { + /* Add a signal. Relaxed MO is fine because signaling does not need to +- establish a happens-before relation (see above). We do not mask the +- release-MO store when initializing a group in +- __condvar_quiesce_and_switch_g1 because we use an atomic +- read-modify-write and thus extend that store's release sequence. */ ++ establish a happens-before relation (see above). We do not mask the ++ release-MO store when initializing a group in __condvar_switch_g1 ++ because we use an atomic read-modify-write and thus extend that ++ store's release sequence. */ + atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, 2); + cond->__data.__g_size[g1]--; + /* TODO Only set it if there are indeed futex waiters. */ +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index 104ebd48ca..bb46f3605d 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -382,8 +382,7 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + because we do not need to establish any happens-before relation with + signalers (see __pthread_cond_signal); modification order alone + establishes a total order of waiters/signals. We do need acquire MO +- to synchronize with group reinitialization in +- __condvar_quiesce_and_switch_g1. */ ++ to synchronize with group reinitialization in __condvar_switch_g1. */ + uint64_t wseq = __condvar_fetch_add_wseq_acquire (cond, 2); + /* Find our group's index. We always go into what was G2 when we acquired + our position. */ +@@ -414,9 +413,9 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + { + /* Now wait until a signal is available in our group or it is closed. + Acquire MO so that if we observe (signals == lowseq) after group +- switching in __condvar_quiesce_and_switch_g1, we synchronize with that +- store and will see the prior update of __g1_start done while switching +- groups too. */ ++ switching in __condvar_switch_g1, we synchronize with that store and ++ will see the prior update of __g1_start done while switching groups ++ too. */ + unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); + uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); + unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index d3c0cbd703..af122f00fb 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -68,6 +68,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-PR25847-4.patch \ file://0026-PR25847-5.patch \ file://0026-PR25847-6.patch \ + file://0026-PR25847-7.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \ From patchwork Tue Jun 17 21:20:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 65193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FBD2C71157 for ; Tue, 17 Jun 2025 21:21:25 +0000 (UTC) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web10.31282.1750195278088123620 for ; Tue, 17 Jun 2025 14:21:18 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=SYRDLHlz; spf=softfail (domain: sakoman.com, ip: 209.85.215.181, mailfrom: steve@sakoman.com) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-b3182c6d03bso4809279a12.0 for ; Tue, 17 Jun 2025 14:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1750195277; x=1750800077; 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; bh=AU695REQAYVC5NLmzHcU6sGZI/04E7EdmnZFU7mivaM=; b=SYRDLHlzQlxAgQ0E6+itBh6OhTYzg47dpkOFZSORAvBYLY2w4svPUabtooGCZmrg4z t6MQaFT/ccYNrn3vbhYov5ukVh+BvfPMSBiip91zEZa6ofcOgMLZb/Wn/c7CNvvJk3X4 +ZowOd3zWz2M42sTxDzQ2+svak/AzmyLEevqcWG5lI7NdngZL0VOaJ7IAvQj7jIpIn8u PFohZYAqKonglnneGkpkex4nhva2AFzBya/f4fcRgeI36RmXE6LzjSQ2f0bXYKd5zxtp FmAl2WzRjVif9K4I1gsxaXXJUeFxLagzG5pFK3cBMKCyOuvaBt07xJytqFEeN/x5tQvG xJQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750195277; x=1750800077; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AU695REQAYVC5NLmzHcU6sGZI/04E7EdmnZFU7mivaM=; b=WZ2lwmgyHE7ujJ0tND9s6naOnXO7PoMKoqyeb5Et4bNmHvZIy7B0EcDn/mJEfRZAfw 6xBepmdqEeOqqMB+mwwpIswSxzmWp8uo1eJkd7YmoOrSS0oQRLNlc/wz3WQaHfmUoZ5l aA1MNUwqXz6cq7nOT7pVyXmgak6sMEUDxp20Czr3dKF9dS3gYRcCdLWqsXRVEu1SynLB bPJMDJ4Fyhva7F4LX/m/b87GvcLbwlViLw+nAdXM3vM9LFSZOZ7XONXklHyXofqAvg4r yobV1RlzFfCLxmmyDTnY7+abdb48RwOeaORoXsgaGH6lbtzh3CYRnFiukOkw1vDm/cke nD1A== X-Gm-Message-State: AOJu0YwJfeWuA4GgFYsLPDlEbwDGQi+3ddsHjOQqBjyaBnu23ng5tSQ4 D0IiM0DDMjEHrla8BzpGMNf3EPj0H5xx+nKdlvkUh9/5+sKUHZv693c/SD8rPGkBifqg9L/zT1h 0K+Hl X-Gm-Gg: ASbGncsxfQLjaMcLg41fnKzXUUyClCoO4x52ijjw46ZLlEy2WCNwWMAaucIANp+3pN2 Rq4nHcsHbi5aSp/HT9QjeKZ2sClC78/u39AVWMvcPkjvAlqtqK4fu9kGF9aQtc8oJc4RDdDdDxK pqTLC7K2nWYT9Ndmb8FiwdXrjojRBdlVFYd+wEko7cllxtA2GzUi/sJpgoW5bW2D8OQ2tnRIgE0 H4hy/UjIsfsXIpDdNdJMSq21MPO6seHOAb0mPHDYUCLEyPYFh8WXf4gbMJPIBesgdKHhjVy2zlk i+Jp36QRtgl9pRhpxgVFg8aXfhFzfaI1Zol/DGx8vv2JDWxJJBWkZw== X-Google-Smtp-Source: AGHT+IGDrwwbtNvsz6YGULnv0HT5OtkUfl+wSEbtOVRan2Dy/6G4Ip1IJvU/4WBrtKRL85c/PvZbjA== X-Received: by 2002:a05:6a20:6a20:b0:218:c51:4d75 with SMTP id adf61e73a8af0-21fbd5568c1mr24963908637.24.1750195277082; Tue, 17 Jun 2025 14:21:17 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:7ce4:2bd1:2434:c118]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffeccf1sm9720728b3a.18.2025.06.17.14.21.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 14:21:16 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 27/27] glibc: nptl Use all of g1_start and g_signals Date: Tue, 17 Jun 2025 14:20:24 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 17 Jun 2025 21:21:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/218944 From: Sunil Dora The following commits have been cherry-picked from Glibc master branch: Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=91bb902f58264a2fd50fbce8f39a9a290dd23706] Signed-off-by: Sunil Dora Signed-off-by: Steve Sakoman --- .../glibc/glibc/0026-PR25847-8.patch | 192 ++++++++++++++++++ meta/recipes-core/glibc/glibc_2.35.bb | 1 + 2 files changed, 193 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0026-PR25847-8.patch diff --git a/meta/recipes-core/glibc/glibc/0026-PR25847-8.patch b/meta/recipes-core/glibc/glibc/0026-PR25847-8.patch new file mode 100644 index 0000000000..8ea0c784ef --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0026-PR25847-8.patch @@ -0,0 +1,192 @@ +From fc074de88796eb2036fbe9bade638e00adfd5cb2 Mon Sep 17 00:00:00 2001 +From: Malte Skarupke +Date: Tue, 17 Jun 2025 02:08:36 -0700 +Subject: [PATCH] nptl: Use all of g1_start and g_signals + +The LSB of g_signals was unused. The LSB of g1_start was used to indicate +which group is G2. This was used to always go to sleep in pthread_cond_wait +if a waiter is in G2. A comment earlier in the file says that this is not +correct to do: + + "Waiters cannot determine whether they are currently in G2 or G1 -- but they + do not have to because all they are interested in is whether there are + available signals" + +I either would have had to update the comment, or get rid of the check. I +chose to get rid of the check. In fact I don't quite know why it was there. +There will never be available signals for group G2, so we didn't need the +special case. Even if there were, this would just be a spurious wake. This +might have caught some cases where the count has wrapped around, but it +wouldn't reliably do that, (and even if it did, why would you want to force a +sleep in that case?) and we don't support that many concurrent waiters +anyway. Getting rid of it allows us to use one more bit, making us more +robust to wraparound. + +The following commits have been cherry-picked from Glibc master branch: +Bug : https://sourceware.org/bugzilla/show_bug.cgi?id=25847 + +Upstream-Status: Backport +[https://sourceware.org/git/?p=glibc.git;a=commit;h=91bb902f58264a2fd50fbce8f39a9a290dd23706] + +Signed-off-by: Sunil Dora +--- + nptl/pthread_cond_broadcast.c | 4 ++-- + nptl/pthread_cond_common.c | 26 ++++++++++---------------- + nptl/pthread_cond_signal.c | 2 +- + nptl/pthread_cond_wait.c | 14 +++++--------- + 4 files changed, 18 insertions(+), 28 deletions(-) + +diff --git a/nptl/pthread_cond_broadcast.c b/nptl/pthread_cond_broadcast.c +index a07435589a..ef0943cdc5 100644 +--- a/nptl/pthread_cond_broadcast.c ++++ b/nptl/pthread_cond_broadcast.c +@@ -57,7 +57,7 @@ ___pthread_cond_broadcast (pthread_cond_t *cond) + { + /* Add as many signals as the remaining size of the group. */ + atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, +- cond->__data.__g_size[g1] << 1); ++ cond->__data.__g_size[g1]); + cond->__data.__g_size[g1] = 0; + + /* We need to wake G1 waiters before we switch G1 below. */ +@@ -73,7 +73,7 @@ ___pthread_cond_broadcast (pthread_cond_t *cond) + { + /* Step (3): Send signals to all waiters in the old G2 / new G1. */ + atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, +- cond->__data.__g_size[g1] << 1); ++ cond->__data.__g_size[g1]); + cond->__data.__g_size[g1] = 0; + /* TODO Only set it if there are indeed futex waiters. */ + do_futex_wake = true; +diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c +index 3baac4dabc..e48f914321 100644 +--- a/nptl/pthread_cond_common.c ++++ b/nptl/pthread_cond_common.c +@@ -208,9 +208,9 @@ __condvar_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + behavior. + Note that this works correctly for a zero-initialized condvar too. */ + unsigned int old_orig_size = __condvar_get_orig_size (cond); +- uint64_t old_g1_start = __condvar_load_g1_start_relaxed (cond) >> 1; +- if (((unsigned) (wseq - old_g1_start - old_orig_size) +- + cond->__data.__g_size[g1 ^ 1]) == 0) ++ uint64_t old_g1_start = __condvar_load_g1_start_relaxed (cond); ++ uint64_t new_g1_start = old_g1_start + old_orig_size; ++ if (((unsigned) (wseq - new_g1_start) + cond->__data.__g_size[g1 ^ 1]) == 0) + return false; + + /* We have to consider the following kinds of waiters: +@@ -221,16 +221,10 @@ __condvar_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + are not affected. + * Waiters in G1 have already received a signal and been woken. */ + +- /* Update __g1_start, which closes this group. The value we add will never +- be negative because old_orig_size can only be zero when we switch groups +- the first time after a condvar was initialized, in which case G1 will be +- at index 1 and we will add a value of 1. Relaxed MO is fine because the +- change comes with no additional constraints that others would have to +- observe. */ +- __condvar_add_g1_start_relaxed (cond, +- (old_orig_size << 1) + (g1 == 1 ? 1 : - 1)); +- +- unsigned int lowseq = ((old_g1_start + old_orig_size) << 1) & ~1U; ++ /* Update __g1_start, which closes this group. Relaxed MO is fine because ++ the change comes with no additional constraints that others would have ++ to observe. */ ++ __condvar_add_g1_start_relaxed (cond, old_orig_size); + + /* At this point, the old G1 is now a valid new G2 (but not in use yet). + No old waiter can neither grab a signal nor acquire a reference without +@@ -242,13 +236,13 @@ __condvar_switch_g1 (pthread_cond_t *cond, uint64_t wseq, + g1 ^= 1; + *g1index ^= 1; + +- /* Now advance the new G1 g_signals to the new lowseq, giving it ++ /* Now advance the new G1 g_signals to the new g1_start, giving it + an effective signal count of 0 to start. */ +- atomic_store_release (cond->__data.__g_signals + g1, lowseq); ++ atomic_store_release (cond->__data.__g_signals + g1, (unsigned)new_g1_start); + + /* These values are just observed by signalers, and thus protected by the + lock. */ +- unsigned int orig_size = wseq - (old_g1_start + old_orig_size); ++ unsigned int orig_size = wseq - new_g1_start; + __condvar_set_orig_size (cond, orig_size); + /* Use and addition to not loose track of cancellations in what was + previously G2. */ +diff --git a/nptl/pthread_cond_signal.c b/nptl/pthread_cond_signal.c +index a9bc10dcca..07427369aa 100644 +--- a/nptl/pthread_cond_signal.c ++++ b/nptl/pthread_cond_signal.c +@@ -80,7 +80,7 @@ ___pthread_cond_signal (pthread_cond_t *cond) + release-MO store when initializing a group in __condvar_switch_g1 + because we use an atomic read-modify-write and thus extend that + store's release sequence. */ +- atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, 2); ++ atomic_fetch_add_relaxed (cond->__data.__g_signals + g1, 1); + cond->__data.__g_size[g1]--; + /* TODO Only set it if there are indeed futex waiters. */ + do_futex_wake = true; +diff --git a/nptl/pthread_cond_wait.c b/nptl/pthread_cond_wait.c +index bb46f3605d..430cbe8a35 100644 +--- a/nptl/pthread_cond_wait.c ++++ b/nptl/pthread_cond_wait.c +@@ -84,7 +84,7 @@ __condvar_cancel_waiting (pthread_cond_t *cond, uint64_t seq, unsigned int g, + not hold a reference on the group. */ + __condvar_acquire_lock (cond, private); + +- uint64_t g1_start = __condvar_load_g1_start_relaxed (cond) >> 1; ++ uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); + if (g1_start > seq) + { + /* Our group is closed, so someone provided enough signals for it. +@@ -278,7 +278,6 @@ __condvar_cleanup_waiting (void *arg) + * Waiters fetch-add while having acquire the mutex associated with the + condvar. Signalers load it and fetch-xor it concurrently. + __g1_start: Starting position of G1 (inclusive) +- * LSB is index of current G2. + * Modified by signalers while having acquired the condvar-internal lock + and observed concurrently by waiters. + __g1_orig_size: Initial size of G1 +@@ -299,11 +298,9 @@ __condvar_cleanup_waiting (void *arg) + * Reference count used by waiters concurrently with signalers that have + acquired the condvar-internal lock. + __g_signals: The number of signals that can still be consumed, relative to +- the current g1_start. (i.e. bits 31 to 1 of __g_signals are bits +- 31 to 1 of g1_start with the signal count added) ++ the current g1_start. (i.e. g1_start with the signal count added) + * Used as a futex word by waiters. Used concurrently by waiters and + signalers. +- * LSB is currently reserved and 0. + __g_size: Waiters remaining in this group (i.e., which have not been + signaled yet. + * Accessed by signalers and waiters that cancel waiting (both do so only +@@ -418,9 +415,8 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + too. */ + unsigned int signals = atomic_load_acquire (cond->__data.__g_signals + g); + uint64_t g1_start = __condvar_load_g1_start_relaxed (cond); +- unsigned int lowseq = (g1_start & 1) == g ? signals : g1_start & ~1U; + +- if (seq < (g1_start >> 1)) ++ if (seq < g1_start) + { + /* If the group is closed already, + then this waiter originally had enough extra signals to +@@ -433,13 +429,13 @@ __pthread_cond_wait_common (pthread_cond_t *cond, pthread_mutex_t *mutex, + by now, perhaps in the process of switching back to an older + G2, but in either case we're allowed to consume the available + signal and should not block anymore. */ +- if ((int)(signals - lowseq) >= 2) ++ if ((int)(signals - (unsigned int)g1_start) > 0) + { + /* Try to grab a signal. See above for MO. (if we do another loop + iteration we need to see the correct value of g1_start) */ + if (atomic_compare_exchange_weak_acquire ( + cond->__data.__g_signals + g, +- &signals, signals - 2)) ++ &signals, signals - 1)) + break; + else + continue; +-- +2.49.0 + diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index af122f00fb..3023e9c1ed 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb @@ -69,6 +69,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-PR25847-5.patch \ file://0026-PR25847-6.patch \ file://0026-PR25847-7.patch \ + file://0026-PR25847-8.patch \ \ file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ file://0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch \