From patchwork Fri May 24 12:14:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44136 X-Patchwork-Delegate: steve@sakoman.com 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 08F89C25B7A for ; Fri, 24 May 2024 12:14:41 +0000 (UTC) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mx.groups.io with SMTP id smtpd.web11.14310.1716552875006590435 for ; Fri, 24 May 2024 05:14:35 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Mwi+FWnJ; spf=softfail (domain: sakoman.com, ip: 209.85.214.180, mailfrom: steve@sakoman.com) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1f332528c1aso19889785ad.2 for ; Fri, 24 May 2024 05:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552874; x=1717157674; 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=9jhEEo6EQQKr5b1N59XdtBMTk5f2s9+y6R4sQBL6hLQ=; b=Mwi+FWnJ4oi4pZk18uqEAVVSU7LvWbc69OtFz0hHsLguFwj0LPTSCVAOXQuph+aeiF GuCXj3bBXC4AWpieHZSuRh45MdM76wEjhi8AbIfowQMTdIIxbXqp/AAhjEHTmlhQdon/ 9Hsgg0JSP+YRr+GnCMI4Qkj9C5wJHIAlNd55/xID+ouRYE0dFPw5hu6sHMuU8mJYaY6C vHCyrLiViSHrweCE/AunET+kigitvsODyr9GynpAiP+EgQTYA3cpgKofR8jTemII9vMP OCHQe9PEBxCC4vVh9w7xOgrlOksJNYNkd98LRAi9HfNG9wZK2kGjNzIeeIiQArlg1NF+ nFFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552874; x=1717157674; 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=9jhEEo6EQQKr5b1N59XdtBMTk5f2s9+y6R4sQBL6hLQ=; b=TWt/5UJZxbOg9XGmssQVia9wnTA/UGTPSmE5k5tbd+3JG9GrUoUdVNggFkVGXgw3F6 E7ACqinPW08hCK2l8zZ3REyTn8igiXbF6NOXoxdTVPqDIps6buxDW7Xc/RfxCRI0/MAk 9IcVJmHR+f/dbBWoG/Y9nrxQwW13J2FY6WukIy+g+Y6iRbwPIUurmdtjAdQztB5It1fm Sig7f+xhVHmZdjmRSojdMr3dGG/7UZDrpLecQ51mzun4D0qABhNA8a3BlB6sAiA0xJcW FNQ+oQNKVYG6wDBx0SleKlVE4P+SGyjtpTw/qF3HM0WoJijuHYR2TffBp5TndMwC+ugW JhYw== X-Gm-Message-State: AOJu0YykvhutmCnUqmAeSse4EDRKLFV6z9q7PZUhiPUVTw6NT3QPonuY Y8yTJkFqi/i1F0/d49nEqcNMvTJe1rhRHWEIM00zgoZbaY3cciRBiL8agJDYstMf+xdDctfsaSh T X-Google-Smtp-Source: AGHT+IGTFAWjPzNclp2ltQeteBI0A9Wv+4uUMthNmB+w/WrQlbzWtteym0KyHV53fbKlexQjYtpIsQ== X-Received: by 2002:a17:902:f54d:b0:1f3:11bc:20b5 with SMTP id d9443c01a7336-1f44874038emr22552965ad.23.1716552874197; Fri, 24 May 2024 05:14:34 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:33 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 1/8] libarchive: fix CVE-2024-26256 Date: Fri, 24 May 2024 05:14:17 -0700 Message-Id: <1ee5ba41cab2ce490fa0ddf67b83f57af1206c35.1716552687.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199843 From: Yogita Urade libarchive Remote Code Execution Vulnerability References: https://nvd.nist.gov/vuln/detail/CVE-2024-26256 https://bugzilla.suse.com/show_bug.cgi?id=CVE-2024-26256 Signed-off-by: Yogita Urade Signed-off-by: Steve Sakoman --- .../libarchive/CVE-2024-26256.patch | 29 +++++++++++++++++++ .../libarchive/libarchive_3.6.2.bb | 5 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch new file mode 100644 index 0000000000..717a31f0e1 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/CVE-2024-26256.patch @@ -0,0 +1,29 @@ +From eb7939b24a681a04648a59cdebd386b1e9dc9237 Mon Sep 17 00:00:00 2001 +From: Wei-Cheng Pan +Date: Tue, 14 May 2024 08:50:44 +0000 +Subject: [PATCH] fix: OOB in rar e8 filter (#2135) This patch fixes an + out-of-bound error in rar e8 filter. + +CVE: CVE-2024-26256 +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/eb7939b24a681a04648a59cdebd386b1e9dc9237] + +Signed-off-by: Yogita Urade +--- + libarchive/archive_read_support_format_rar.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c +index 793e8e9..b8397d0 100644 +--- a/libarchive/archive_read_support_format_rar.c ++++ b/libarchive/archive_read_support_format_rar.c +@@ -3624,7 +3624,7 @@ execute_filter_e8(struct rar_filter *filter, struct rar_virtual_machine *vm, siz + uint32_t filesize = 0x1000000; + uint32_t i; + +- if (length > PROGRAM_WORK_SIZE || length < 4) ++ if (length > PROGRAM_WORK_SIZE || length <= 4) + return 0; + + for (i = 0; i <= length - 5; i++) +-- +2.40.0 diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb index 7d328a0060..c83eec9b1a 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.2.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.2.bb @@ -29,8 +29,9 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," EXTRA_OECONF += "--enable-largefile --without-iconv" SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ - file://0001-pax-writer-fix-multiple-security-vulnerabilities.patch \ -" + file://0001-pax-writer-fix-multiple-security-vulnerabilities.patch \ + file://CVE-2024-26256.patch \ + " UPSTREAM_CHECK_URI = "http://libarchive.org/" SRC_URI[sha256sum] = "ba6d02f15ba04aba9c23fd5f236bb234eab9d5209e95d1c4df85c44d5f19b9b3" From patchwork Fri May 24 12:14:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44137 X-Patchwork-Delegate: steve@sakoman.com 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 22C59C41513 for ; Fri, 24 May 2024 12:14:41 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web10.14251.1716552876859869731 for ; Fri, 24 May 2024 05:14:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=HmEwOHY/; spf=softfail (domain: sakoman.com, ip: 209.85.214.172, mailfrom: steve@sakoman.com) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1f44b4404dfso5469575ad.0 for ; Fri, 24 May 2024 05:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552876; x=1717157676; 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=XTeyqO21MX6PRI5KU1YX/BWGt+sp3rm2F35GLeyfFHs=; b=HmEwOHY/0l1EvlcmGmJL6vFPZ7fz+JAytwV54jr4P9fhh3S9uYB2TIhvvYhdVGyf0y lqll2FWVgTY2/v6kj6toSD5OQb1Sy4Yjg94iMNmy8v8eIJK6WpaNYTfGkz2cnmS9n9Sr TMY3ZTanBuP4Lbote6mkXo58LFNyoZI89BFjEa8Zqw8Y9mfu/IegpuAstf0Al49KPsZE uYZWDVdydAiEimdt9y+JWZxirNIgcMo9gAq29lfNuNDZGqXw+EAUBmHfH54phbKF0+Mz s+PiDR2Pr22xNAkypdNrbfsSfLjzsYmbflqbG98ZhKuWPTJ1dlxECx/MjMr51QpFdMrh A6qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552876; x=1717157676; 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=XTeyqO21MX6PRI5KU1YX/BWGt+sp3rm2F35GLeyfFHs=; b=wGqliiEPOaHpEW7umwAqIALi9aFCfbSEAvJLWwDeZNP5qxyOM9zORx8RAXrhZrAnXn TKwxF2Wm1zl0Qj5k9YI8VU+RQ5LgPKSkiOgBUjKoic45cUQT+gPsh/ylw/CHXmiSPNvh xPtDpxAAWeKPtUwS/yD6hVsvEgWhI4b10kYrGqtEUTrmeLfagDe8cRt2jC7ISpAzLD4n fqhRzeZDonAedhVkjGdAIWUGmpff8ASbdbUTHGgh8d58SbPGUm00odEcMY1URhP6UEuA QgE6QBff/tB9g+/2C9A3W23xK1urtlofubEfypVLkZiFzplOfmA4KutzIhKNSUOuf8Ef eKPA== X-Gm-Message-State: AOJu0YxtE3NgjYjbZFthK3Pj+rCFUQD/UUbZExW4iHb0KBB+doK7ZvtM arCDpOqERFh/47AM9T/ZatJn4iwgT1Vik3m962kU2Xtypu2XCxrQXjH+9mCGlmHqECIdz6PbBXA T X-Google-Smtp-Source: AGHT+IEfyk2KdRq5dHYJyGfM/KHSIgIYIERj84WtPKEUg+IXzRjg2leUtZeyqW29gmdpjGsQKHvczA== X-Received: by 2002:a17:903:228e:b0:1f3:b0:f9ef with SMTP id d9443c01a7336-1f4497df645mr19775305ad.43.1716552876030; Fri, 24 May 2024 05:14:36 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:35 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 2/8] openssl: patch CVE-2024-4603 Date: Fri, 24 May 2024 05:14:18 -0700 Message-Id: <601b81350c0f8487439885a576c4d7d883619a6d.1716552687.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199844 From: Peter Marko Advisory: https://github.com/advisories/GHSA-85xr-ghj6-6m46 Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- .../openssl/openssl/CVE-2024-4603.patch | 180 ++++++++++++++++++ .../openssl/openssl_3.0.13.bb | 1 + 2 files changed, 181 insertions(+) create mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch diff --git a/meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch b/meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch new file mode 100644 index 0000000000..b8e0b9fb7d --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch @@ -0,0 +1,180 @@ +From 3559e868e58005d15c6013a0c1fd832e51c73397 Mon Sep 17 00:00:00 2001 +From: Tomas Mraz +Date: Wed, 8 May 2024 15:23:45 +0200 +Subject: [PATCH] Check DSA parameters for excessive sizes before validating + +This avoids overly long computation of various validation +checks. + +Fixes CVE-2024-4603 + +Reviewed-by: Paul Dale +Reviewed-by: Matt Caswell +Reviewed-by: Neil Horman +Reviewed-by: Shane Lontis +(Merged from https://github.com/openssl/openssl/pull/24346) + +(cherry picked from commit 85ccbab216da245cf9a6503dd327072f21950d9b) + + + +CVE: CVE-2024-4603 +Upstream-Status: Backport [https://github.com/openssl/openssl/commit/3559e868e58005d15c6013a0c1fd832e51c73397] +Signed-off-by: Peter Marko +--- + crypto/dsa/dsa_check.c | 44 ++++++++++++-- + .../invalid/p10240_q256_too_big.pem | 57 +++++++++++++++++++ + 2 files changed, 97 insertions(+), 4 deletions(-) + create mode 100644 test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem + +diff --git a/crypto/dsa/dsa_check.c b/crypto/dsa/dsa_check.c +index fb0e9129a2..122449a7bf 100644 +--- a/crypto/dsa/dsa_check.c ++++ b/crypto/dsa/dsa_check.c +@@ -19,8 +19,34 @@ + #include "dsa_local.h" + #include "crypto/dsa.h" + ++static int dsa_precheck_params(const DSA *dsa, int *ret) ++{ ++ if (dsa->params.p == NULL || dsa->params.q == NULL) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_BAD_FFC_PARAMETERS); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ if (BN_num_bits(dsa->params.p) > OPENSSL_DSA_MAX_MODULUS_BITS) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_MODULUS_TOO_LARGE); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ if (BN_num_bits(dsa->params.q) >= BN_num_bits(dsa->params.p)) { ++ ERR_raise(ERR_LIB_DSA, DSA_R_BAD_Q_VALUE); ++ *ret = FFC_CHECK_INVALID_PQ; ++ return 0; ++ } ++ ++ return 1; ++} ++ + int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + if (checktype == OSSL_KEYMGMT_VALIDATE_QUICK_CHECK) + return ossl_ffc_params_simple_validate(dsa->libctx, &dsa->params, + FFC_PARAM_TYPE_DSA, ret); +@@ -39,6 +65,9 @@ int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) + */ + int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret) + && *ret == 0; + } +@@ -50,6 +79,9 @@ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) + */ + int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) + { ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ + return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) + && *ret == 0; + } +@@ -58,8 +90,10 @@ int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) + { + *ret = 0; + +- return (dsa->params.q != NULL +- && ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret)); ++ if (!dsa_precheck_params(dsa, ret)) ++ return 0; ++ ++ return ossl_ffc_validate_private_key(dsa->params.q, priv_key, ret); + } + + /* +@@ -72,8 +106,10 @@ int ossl_dsa_check_pairwise(const DSA *dsa) + BN_CTX *ctx = NULL; + BIGNUM *pub_key = NULL; + +- if (dsa->params.p == NULL +- || dsa->params.g == NULL ++ if (!dsa_precheck_params(dsa, &ret)) ++ return 0; ++ ++ if (dsa->params.g == NULL + || dsa->priv_key == NULL + || dsa->pub_key == NULL) + return 0; +diff --git a/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem b/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem +new file mode 100644 +index 0000000000..e85e2953b7 +--- /dev/null ++++ b/test/recipes/15-test_dsaparam_data/invalid/p10240_q256_too_big.pem +@@ -0,0 +1,57 @@ ++-----BEGIN DSA PARAMETERS----- ++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 ++vKuje86bePD6kD/LH3wmkA== ++-----END DSA PARAMETERS----- +-- +2.30.2 + diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.13.bb b/meta/recipes-connectivity/openssl/openssl_3.0.13.bb index 3b253ddde0..87ab4047d9 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.0.13.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.0.13.bb @@ -13,6 +13,7 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ file://CVE-2024-2511.patch \ + file://CVE-2024-4603.patch \ " SRC_URI:append:class-nativesdk = " \ From patchwork Fri May 24 12:14:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44135 X-Patchwork-Delegate: steve@sakoman.com 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 20BBAC25B7D for ; Fri, 24 May 2024 12:14:41 +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.web10.14252.1716552878218746899 for ; Fri, 24 May 2024 05:14:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=yThMVOJl; 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-6f8ecafd661so739046b3a.3 for ; Fri, 24 May 2024 05:14:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552877; x=1717157677; 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=1F/JBzWNYkJtO560N4Ama8VTv2jmvpxRMRBWqXqT3jw=; b=yThMVOJlYt5ptYcOtbnFCgx/HvrY000xViYSxQ1cZPqvkAnS8PrpZc5DQ3lGhIGq9O oc3NTgrkDosFUOH/U50PYwTuRc54xe6cLe+Ib6HCTbZStrcDeFH/HiV6uJ2oxFxAn4By FeOMGJJmEcUzPqANbUdK5sIVdslYCPyQJNe76N1Uo5eFKnVAAhuJ1suhnSyrBGmaS3wx 4/ZIQ403ayqatKNvDwFT3e+pyLNBv3UAsKIqYfJAMLeEw5eu6/90Y+77fUYksgxlGzuV qGTDLjeXHUw/xeAo0qZMiftYHpM9bquTy4XAYeHd+RyMvfgXk9o3Hfr5oRpbq4EnBncQ 4WZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552877; x=1717157677; 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=1F/JBzWNYkJtO560N4Ama8VTv2jmvpxRMRBWqXqT3jw=; b=fU7FflnVirnyRV5ddr1TdMlrVijvhNMSRrHX7mEXYRo57EPjTpFCt20xL2MUpViM5Y 57s1IFhPYzcY9nesKUDJevf5gpELMPLFjdQlV2DVM/MYgbiZoX3J7gJCQ4IzLzhO6pxx COuGFzmQxkfskjMHozp8Uhu8iMYvf0Tf/soGA2jabuIUc5rZErN+ub6Z7noI3eTFU/20 Z1l+Q4GTplwiUiSvyw3cq7/SW/6xL+cUlKpu889FXIB+UOdWvHeZLzIYTtdGan9zKGe7 ovGVyiNM47fLN9x2KqZBGnGV0AZbJ9axgTMnv7pCI3YtUTgxBoseXGahdyAcBslnozJD MCDQ== X-Gm-Message-State: AOJu0Yw69NavVmR8XmjUwCa7B/J207yVmqn/qg5tdoVf7FlVgOPtvZSb 1Ruldnh2HgVBOLCThH7sMyt9ZoA5CdkawQNDGrgmEu+grTRgnc8q3WUAX8E7yuv1B2Usi1MAPXE 3 X-Google-Smtp-Source: AGHT+IG34Sco5QpOMoZmLfdMGldZqb9NJpQ9jA6F9glqP34weyPO3SG7sFelg8FaETYiYbfUC3yr4A== X-Received: by 2002:a05:6a20:1002:b0:1af:9a04:24bf with SMTP id adf61e73a8af0-1b212d461b1mr1963752637.34.1716552877494; Fri, 24 May 2024 05:14:37 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:37 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 3/8] binutils: Rename CVE-2022-38126 patch to CVE-2022-35205 Date: Fri, 24 May 2024 05:14:19 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:41 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199845 From: Vijay Anusuri CVE-2022-38126 has been marked "REJECT" in the CVE List by NVD. Reference: https://nvd.nist.gov/vuln/detail/CVE-2022-38126 As commit changes in 0016-CVE-2022-38126.patch fixes CVE-2022-35205. Hence renamed the patch. Link: https://ubuntu.com/security/CVE-2022-35205 Signed-off-by: Vijay Anusuri Signed-off-by: Steve Sakoman --- meta/recipes-devtools/binutils/binutils-2.38.inc | 2 +- .../{0016-CVE-2022-38126.patch => 0016-CVE-2022-35205.patch} | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) rename meta/recipes-devtools/binutils/binutils/{0016-CVE-2022-38126.patch => 0016-CVE-2022-35205.patch} (94%) diff --git a/meta/recipes-devtools/binutils/binutils-2.38.inc b/meta/recipes-devtools/binutils/binutils-2.38.inc index bbe7bb57b2..4a8831b534 100644 --- a/meta/recipes-devtools/binutils/binutils-2.38.inc +++ b/meta/recipes-devtools/binutils/binutils-2.38.inc @@ -34,7 +34,7 @@ SRC_URI = "\ file://0013-Avoid-as-info-race-condition.patch \ file://0014-CVE-2019-1010204.patch \ file://0015-CVE-2022-38533.patch \ - file://0016-CVE-2022-38126.patch \ + file://0016-CVE-2022-35205.patch \ file://0017-CVE-2022-38127-1.patch \ file://0017-CVE-2022-38127-2.patch \ file://0017-CVE-2022-38127-3.patch \ diff --git a/meta/recipes-devtools/binutils/binutils/0016-CVE-2022-38126.patch b/meta/recipes-devtools/binutils/binutils/0016-CVE-2022-35205.patch similarity index 94% rename from meta/recipes-devtools/binutils/binutils/0016-CVE-2022-38126.patch rename to meta/recipes-devtools/binutils/binutils/0016-CVE-2022-35205.patch index 8200e28a81..a582df4466 100644 --- a/meta/recipes-devtools/binutils/binutils/0016-CVE-2022-38126.patch +++ b/meta/recipes-devtools/binutils/binutils/0016-CVE-2022-35205.patch @@ -9,8 +9,9 @@ Subject: [PATCH] Replace a run-time assertion failure with a warning message message. Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3e5ae049371a27fd1737aba946fe26d06e029b5] - +CVE: CVE-2022-35205 Signed-off-by: Pgowda +Signed-off-by: Vijay Anusuri --- binutils/dwarf.c | 7 ++++++- From patchwork Fri May 24 12:14:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44133 X-Patchwork-Delegate: steve@sakoman.com 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 EA657C25B7C for ; Fri, 24 May 2024 12:14:40 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web10.14255.1716552879810624796 for ; Fri, 24 May 2024 05:14:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=SUrtqf27; spf=softfail (domain: sakoman.com, ip: 209.85.214.182, mailfrom: steve@sakoman.com) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1f3310a21d8so19959405ad.1 for ; Fri, 24 May 2024 05:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552879; x=1717157679; 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=KOiQp1PGE/5hCXs+J4IwXp2IbxpcdWerOCReSzrqNaM=; b=SUrtqf27sRiAvGn2ynwJbHt088QMjmhCnsepCgb+meAG7KDksnfbNMdBrEmPC846zj dmbuZ9ieO8aNhBzh2oQuDOJvNBr/KyCKAdmY9uyPGBH+7LLZGbW6OPS9qyk4s/or+pga YqIl6OcD9DGSYBHlfHPTBmaX+vAeOppBX2Mi43pPGc1+fRmxPr2Q3GayLytX1frt2mm/ l1o4T9yBrmHcAP6NIYSTEL9BfPcMuHGrW0+2YdKRpL7SC+LRm3xWWT4zojmJlo/lZbhx 2VoFwVXJXS8oIF3SRYNEJ/Nrq/OrPyiovVeRamJJjrCNW301NpHZNr1DqQzk84tGzEmU 0P+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552879; x=1717157679; 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=KOiQp1PGE/5hCXs+J4IwXp2IbxpcdWerOCReSzrqNaM=; b=RmU12FYGScdD5Coo/nX5Ms1BXlcXCdJBmQd1s+e2OBQvIYiuWUOpPeLb8yBmCFkQ+V UkLsVWHWVrzmCgEklYY4qzkGIAmWgXhV0pzwiZR9GVw8MCmW8DL501RfrZNxGBg8JDmu HA0svAMp/vNrYMywz/948BRxLSlK7Fz01L5JcTqgAI8HB/Pomtls5JcpsDBwSudEN2TO HnfgLDW20k0+mapOFOBydXYtvLlbUl/53itIyxbF0OphM45IHk1npeZC95h306XmdPSP z83vgHYq7ihL5LJspXk/wN4dvRj/iDm9yv2QRIgDj1eXYrCKv3sVL5H0gBaoFbdgRTxP UJDA== X-Gm-Message-State: AOJu0YwccRU1SpCH6nCvYZM4lbxzA8/RxBFAhVNQ76kM2XcJCi/r0N57 BTKN0V463qxvl/U+LsMjO5qkJnEea7IfTFo8+HfTnPVd+zfck+1bv1Z8KQ1LXY+zDyo7KLBqPHU Z X-Google-Smtp-Source: AGHT+IEjqee+zM+1JwUSTsT9CneB5X3DHS7PiVzcXEShJWWRaOzCLoaNnB9ZOa1jiVzFYeKqZk0FtA== X-Received: by 2002:a17:902:d4c8:b0:1f3:4bd3:4443 with SMTP id d9443c01a7336-1f4483f046amr23281385ad.0.1716552878997; Fri, 24 May 2024 05:14:38 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:38 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 4/8] go: Always pass interpreter to linker Date: Fri, 24 May 2024 05:14:20 -0700 Message-Id: <69128ca66991b13358f2552fcd5a7cfa6dda4952.1716552687.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199846 From: Joerg Vehlow When gos internal linker is used, it uses hardcoded paths to the interpreter (dynamic linker). For x86_64 this hardcoded path is /lib64/ld-linux-x86-64.so.2, but yocto's default dynamic linker path is /lib64/ld-linux-x86-64.so.2. Most of the time, the internal linker is not used and binutils linker sets the correct path, but sometimes the internal linker is used and the resulting binary will not work on x86_64. To ensure the path is always correct, pass it to the linker. Signed-off-by: Joerg Vehlow Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit 6b54215074d7f3dbba07f096f16b9c0acf51527c) Signed-off-by: Jose Quaresma Signed-off-by: Steve Sakoman --- meta/classes/go.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index d944722309..55f9d8f230 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -1,4 +1,5 @@ inherit goarch +inherit linuxloader GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" @@ -44,7 +45,7 @@ GO_LINKMODE ?= "" GO_LINKMODE:class-nativesdk = "--linkmode=external" GO_LINKMODE:class-native = "--linkmode=external" GO_EXTRA_LDFLAGS ?= "" -GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' +GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -I ${@get_linuxloader(d)} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" From patchwork Fri May 24 12:14:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44139 X-Patchwork-Delegate: steve@sakoman.com 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 11226C25B74 for ; Fri, 24 May 2024 12:14:51 +0000 (UTC) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mx.groups.io with SMTP id smtpd.web10.14256.1716552881573603528 for ; Fri, 24 May 2024 05:14:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=CiV1r4OW; spf=softfail (domain: sakoman.com, ip: 209.85.214.176, mailfrom: steve@sakoman.com) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1f34b5f1964so12404855ad.2 for ; Fri, 24 May 2024 05:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552881; x=1717157681; 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=zoqpsjNqlM44F+/PKaI3j5G6wDcMgV3sfGmEDLQNFf8=; b=CiV1r4OWugu2BzTT6MdCzXgbAfBv5y0EoZl0NzjW0u4ZDT798DN9UFDFA+kjM0MJfl 4A6oOTzAcfQgLVr927IzXCGlx7x2fGnFwWGSMREBd9MKAqNB2ukHxnZ/HiHFh6YxVlSU t3/mMdh2ZyRTYhAs55vOap7swg3QKs6oKMUQHy5ttXbXt6HKkCsseTeX9uKBnRLU6lCm xsw5ru6G1gksFf3u53X8LNxW229RExugTk4wF3Exq2tcwYKnr6lr8xZhcSAuN93w4Jsv cgIELwWj35kulpqHJLOawO1OUIe9pYuwZS4jyUNmpipmKx3nbDigpmpsBVY8lcYfme7L GbXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552881; x=1717157681; 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=zoqpsjNqlM44F+/PKaI3j5G6wDcMgV3sfGmEDLQNFf8=; b=oqNe7Mamd/cVqrT/lNHCrdHjmkgu2n5MCLGhaSLZYMeVLREsEI2zRcsr6gM2bFWFW3 q+OujrtGye8kl3Gq75pHYxzLDUKkNDdjkcPJEaSrW2dyuyB7o8VUPaQ9gyxecm9YQRie mVjlw4lQc1AwcxaNNhRZyl+jg2r/qUpn9DHgssUIhuBcpzoC9JFNiZxLN6zQAm6P3pYL LOV741d5IOgUhoP7dWTDo/TXFUdaRSBjLEe1f8Ln5ZrdkwED+/QJfPubS2U4pHlswqF1 WoLbEoi0sQPhTSBUabJdTm68ebtn/PIiiVb6Z2f5UucxcBkBTSpBSv2NDGcGwyILXRgy MVLQ== X-Gm-Message-State: AOJu0YyXJ8pFhHeUgnW0j1glljX67PsPS5/xPxpnjJfAwUSVRNMqzO5o xPQhcgvbbMAmZr7CbhAmQ5R0eU6/0gvwCPoneXItqSdLWzVkEDEZW9HGbV0bAfwOmtxQ7zcAd/+ 2 X-Google-Smtp-Source: AGHT+IEWWefrif93XYcKGgMFLxuyxwWq8NsNZqyYce5hRHGR8A7VIXP9DXB2vQ3H8DsSxYP0yOInfg== X-Received: by 2002:a17:902:da8d:b0:1f3:35d9:432b with SMTP id d9443c01a7336-1f4486bd0f3mr21556555ad.10.1716552880822; Fri, 24 May 2024 05:14:40 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:40 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 5/8] go.bbclass: fix path to linker in native Go builds Date: Fri, 24 May 2024 05:14:21 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199847 From: Dmitry Baryshkov Building native Go tools results in the tool pointing to the wrong location of dynamic linker (see below). The linker is looked up in the temporary dir, which can be removed if rm_work is inherited. This results in being unable to execute the program with the 'No such file or directory' error. Override linker specificiation for native recipes (and let Go build environment to pick up a correct one on it's own). The error is observed in case the distro doesn't use uninative.bbclass. If uninative.bbclass is used, the binary will be patched automatically to use the uninative loader instead of the system one. Without this patch: $ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffe945ec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3a7490e000) /home/lumag/Projects/RPB/build-rpb/tmp-rpb-glibc/work/x86_64-linux/go-md2man-native/1.0.10+gitAUTOINC+f79a8a8ca6-r0/recipe-sysroot-native/usr/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f3a74d13000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help -bash: tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: No such file or directory With the patch $ ldd tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man linux-vdso.so.1 (0x00007ffd19dbf000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d44181000) /lib64/ld-linux-x86-64.so.2 (0x00007f2d44586000) $ tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man --help Usage of tmp-rpb-glibc/sysroots-components/x86_64/go-md2man-native/usr/bin/go-md2man: -in string Path to file to be processed (default: stdin) -out string Path to output processed file (default: stdout) Signed-off-by: Dmitry Baryshkov Signed-off-by: Richard Purdie (cherry picked from commit 44b397daa68b4d0a461225fe9ff7db8b5fcfdb7b) Signed-off-by: Jose Quaresma Signed-off-by: Steve Sakoman --- meta/classes/go.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index 55f9d8f230..97366779e3 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -45,7 +45,10 @@ GO_LINKMODE ?= "" GO_LINKMODE:class-nativesdk = "--linkmode=external" GO_LINKMODE:class-native = "--linkmode=external" GO_EXTRA_LDFLAGS ?= "" -GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -I ${@get_linuxloader(d)} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' +GO_LINUXLOADER ?= "-I ${@get_linuxloader(d)}" +# Use system loader. If uninative is used, the uninative loader will be patched automatically +GO_LINUXLOADER:class-native = "" +GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} ${GO_LINUXLOADER} ${GO_EXTRA_LDFLAGS} -extldflags '${GO_EXTLDFLAGS}'"' export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" From patchwork Fri May 24 12:14:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44138 X-Patchwork-Delegate: steve@sakoman.com 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 1D662C25B7C for ; Fri, 24 May 2024 12:14:51 +0000 (UTC) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web11.14311.1716552883171568707 for ; Fri, 24 May 2024 05:14:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=a3XQDLKn; spf=softfail (domain: sakoman.com, ip: 209.85.214.182, mailfrom: steve@sakoman.com) Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1f44b5ba445so6366145ad.3 for ; Fri, 24 May 2024 05:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552882; x=1717157682; 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=OG1xLXf675T5Ty12UNyC+0pqPt883OH0JuFYbrSiwhk=; b=a3XQDLKnznLA0m4EWiA+dZsT0FaLLtdxlMZCYyIfY8Ju4cnmBjXexzCeZL7ZHGIO0f osmQ732TrhkwyXnfEDxWarlk+kOmAnAN8oJnktYlgo1pbVRlyQ+kirL8Pxg0GVdB+BOY m68I24TY3cVxXJCy4rDdaRycnm0+c0tKmqK3A5dmD78VkP3BXsB/P6om0BzEnvUyiECm lNc67weR5dP+yi5WWlo+SQWdg8A/plKKUr4grxe/53EQ/X1NIV0gwzPAJ2OIOlSCjFqI tcuAlbCoe2l1akTmrTFDHPLPS3h3zaGDeyoLzd9xEMi3nX90YPYjtEmnpdWKZ3mgLdk4 BSzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552882; x=1717157682; 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=OG1xLXf675T5Ty12UNyC+0pqPt883OH0JuFYbrSiwhk=; b=pgdLPvzusnds1d15fFIjbSB7dXDer2UN0nvfZaptFrb7y2DnFjjLN8gXxvlP1RoA3/ 1JeX89esmATrayI9TuKF5dkxSChnlZlwT0Lj3ZZxZ32pUmDOn3vhoAiEIBraZY8zS9Uv DALeCpgxJ5Gdg3OPCgfPHQzshPhPKVx/OtfQALSeUJ/o7KBnflUut7sXPYEmMM6Thr/2 FGVD7vDeQPH21mLH8sKddGfw17hxLt8r8uJ6csMuhGKYdcn5TuyFx4dk2cQlKQXYQxTE 4QMb+T3cgw/7y/QXi4DkwA13kYFqskd589n02Bbnj6OViFVKgcvFtPt3SKD5BCoGKeiG Ds0w== X-Gm-Message-State: AOJu0Yz5KzFFEkw6M7k8r3OxpGYTrDnfHBbhVJL2+oOifX9QNedEnzE/ 4+bh8ccgnTmK1Px21wIkf4QIcjroY+uOwFzqlcagjBWL2e7mLOvwLwa8oAJtIl8FwTFlnQtgAJN A X-Google-Smtp-Source: AGHT+IHvuXnqXEqEOvSH7ZLHx4JKhg+Q/hnt2FP/LQTJp+7rG/FoUr8KF+NaFpvwzjLeg30vehVwAw== X-Received: by 2002:a17:903:228e:b0:1e4:6519:816d with SMTP id d9443c01a7336-1f4497df620mr20038635ad.48.1716552882439; Fri, 24 May 2024 05:14:42 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:42 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 6/8] classes: go-mod: do not pack go mod cache Date: Fri, 24 May 2024 05:14:22 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199848 From: Stefan Herbrechtsmeier Clean go module cache from builddir to prevent it of beeing packed. Signed-off-by: Stefan Herbrechtsmeier Signed-off-by: Lukas Funke Signed-off-by: Alexandre Belloni (cherry picked from commit 328bea56dec8f83b5c118f567e122510f9243087) Signed-off-by: Jose Quaresma Signed-off-by: Steve Sakoman --- meta/classes/go-mod.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/go-mod.bbclass b/meta/classes/go-mod.bbclass index 674d2434e0..1ad782a304 100644 --- a/meta/classes/go-mod.bbclass +++ b/meta/classes/go-mod.bbclass @@ -18,3 +18,7 @@ inherit go GO_WORKDIR ?= "${GO_IMPORT}" do_compile[dirs] += "${B}/src/${GO_WORKDIR}" + +export GOMODCACHE = "${B}/.mod" + +do_compile[cleandirs] += "${B}/.mod" From patchwork Fri May 24 12:14:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44141 X-Patchwork-Delegate: steve@sakoman.com 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 1D68FC41513 for ; Fri, 24 May 2024 12:14:51 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web11.14312.1716552884450134893 for ; Fri, 24 May 2024 05:14:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=WCidDYWu; spf=softfail (domain: sakoman.com, ip: 209.85.214.169, mailfrom: steve@sakoman.com) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1f304533064so22327295ad.0 for ; Fri, 24 May 2024 05:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552884; x=1717157684; 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=CEINDDztw8Iplm+SYiB/I2IXWLeO4jrpkrxNAqdmNTA=; b=WCidDYWuA4CJeQomUoGHV2bAX1bJjHzLmC9TYCT8NAqcOnuezyioZL/anasKazSx1Z 4x3O1JNxh3ItyXmd2XZcvQtSDkoWzKZpiAjyy8HW6hH423i96YGJezbqmiRY8KJ9wHGQ 99lkV/hUWyCA4SisC3RHlLUr0Lvm2lt/yDIbpqT4xcQsJMO9BvcCtwcougXE4Kb0Ddpw +oxsPS2d7XNSwLvCCtuEY5kt97t1JYmhbqNl4zvA8nv+L2WJKmQcjmtTkNlHPG5mX3qO 3y1HXVqceMox3mWGf7mwF+Zgl1EXgc9FZOPOcukqdYiZHESqr/vfqIbzyA7wQQ5E3xn9 11Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552884; x=1717157684; 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=CEINDDztw8Iplm+SYiB/I2IXWLeO4jrpkrxNAqdmNTA=; b=KGnGXjZBo+kpUOKAPA4QEOWydrd2gDkX4T6h0pPB6gpLcui+66Puoq+C8n9UXFp2kd t4mtbX8ZoWAl7k3bpTatiTKGYbO+nnJSfqecwvXWWXT+U8VpwzJI6Q0UtqjewVvj4Z4E gB3ubxUU9BV92+S3RJ4TAtwc3ItTDZNEIErDnYB7K6Q35EslpA6hEXOSIGHOQ/cGEJjb qRsQ4+P2L7j+AWOXEai9/76ey2jBsXPoQDP7K+gzatLaHxttwkTOjfvNMTR1wqXsbthL DDQDVefVZPkTO6OnEJAPOzoD2mn+CUeyPjxQI8dDDtXpY9sZuGoIP1TM4SDr92jiPiY1 SLbw== X-Gm-Message-State: AOJu0YxQxuyGT7Z9yQyKQXrWTo4eiIWeSs4Uu0/ZmGFSwDt6NxKX/Wbg 3v2kwbBopz5Vh72Z4p5IW0+pCdfKsJ/+EILIMBwVZfs6c6eq0GG6vUGPe4MucCjvZx3j+zTx/B4 1 X-Google-Smtp-Source: AGHT+IGi41heG0x9At84GuC8FiNsnJlwiVP/hV9n2lz121Wj3UfxkkNbCx5A0iHKj6S8gkgFh0O6lA== X-Received: by 2002:a17:903:2451:b0:1f3:a41:92fb with SMTP id d9443c01a7336-1f339ef1437mr75164945ad.4.1716552883732; Fri, 24 May 2024 05:14:43 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:43 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 7/8] systemd-systemctl: Fix WantedBy processing Date: Fri, 24 May 2024 05:14:23 -0700 Message-Id: <9e3a2e143ef2aaab335439ddbe1ab976aeeed35d.1716552687.git.steve@sakoman.com> X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199849 From: Bob Henz An empty string assignment to WantedBy should clear all prior WantedBy settings. This matches behavior of the current systemd implementation. (From OE-Core rev: 8ede0083c28fadf1e83c9256618190b931edd306) Signed-off-by: Bob Henz Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie (cherry picked from commit c653bfc68b06bfd4fa07ba18322599a130b1c59a) Signed-off-by: Ranjitsinh Rathod Signed-off-by: Steve Sakoman --- meta/recipes-core/systemd/systemd-systemctl/systemctl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meta/recipes-core/systemd/systemd-systemctl/systemctl b/meta/recipes-core/systemd/systemd-systemctl/systemctl index 0fd7e24085..7fe751b397 100755 --- a/meta/recipes-core/systemd/systemd-systemctl/systemctl +++ b/meta/recipes-core/systemd/systemd-systemctl/systemctl @@ -26,6 +26,9 @@ locations = list() class SystemdFile(): """Class representing a single systemd configuration file""" + + _clearable_keys = ['WantedBy'] + def __init__(self, root, path, instance_unit_name): self.sections = dict() self._parse(root, path) @@ -80,6 +83,14 @@ class SystemdFile(): v = m.group('value') if k not in section: section[k] = list() + + # If we come across a "key=" line for a "clearable key", then + # forget all preceding assignments. This works because we are + # processing files in correct parse order. + if k in self._clearable_keys and not v: + del section[k] + continue + section[k].extend(v.split()) def get(self, section, prop): From patchwork Fri May 24 12:14:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 44140 X-Patchwork-Delegate: steve@sakoman.com 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 299C3C25B7A for ; Fri, 24 May 2024 12:14:51 +0000 (UTC) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mx.groups.io with SMTP id smtpd.web11.14314.1716552886185298628 for ; Fri, 24 May 2024 05:14:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=q0DG2S8H; spf=softfail (domain: sakoman.com, ip: 209.85.214.179, mailfrom: steve@sakoman.com) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1f05b669b6cso28305415ad.3 for ; Fri, 24 May 2024 05:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1716552885; x=1717157685; 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=agVonJemaQkKIEHyBcp5LBjh+Cu+JBvNqj3tnJa8qHE=; b=q0DG2S8HAhEhSdaBgTLupsO23f9IDxJXy6VRt/+0tMh+edS46BjprHOh4Lt7OLtUwh CwQAVDeyJ61+O4F79p7cu+s3Xz+uzQJWNXzx9Yl0vDTVFZJk59CuJzoCm6VrVG2Lb1bo ADqMhyALDLbPblPj8J7idw0HcU/I7N85l0leKRwgt25ZByZcbz0vtHEYICtyLhslVamo MS6bWk6ku22a4OU6eX7fS2FI8mC6GpYTYu92xfo4uNCX2aFTbHqTRj/Gsd41uMMKhM0r UGNt0a5PrRjLRE30I7hjtP2hr5qLapnfVXKNNuIFM4ahPbA1shN3epAKMZdUqluknd8F jvgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716552885; x=1717157685; 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=agVonJemaQkKIEHyBcp5LBjh+Cu+JBvNqj3tnJa8qHE=; b=rEopvcJydrj+ZbkMzzFjZn/A/RRkP+dvHCv29r0cZgmhI9nIwjPerxM843TOcXaouV dbEyfJrkGW/cLJGmsswteB/hmIbkchU8uqRac54Ntms1QUpoZOrKubLY4/Ic3upB7J9j REyl6P+OLXNDqp8bBl3dJEJb9E0WzOH3mUaPm1tYe4Io51ZbazsdtPqe8NPDjgrzf8Fa 30lGOVprZoooqyNuEZIGmSlyog1MLKOBuSWYiMWH0j+Dr/wfjPohq2wMm/rZmDdnQm9v Lv1H9P8PW0dEp2C/L+YoEbEFZIEWbxEz/aTcRPpnEOuSqPs/ekEqmi+55LNKa5JVbLcq 7qKg== X-Gm-Message-State: AOJu0YzhEraHNctCvV68qjxOomxgJxpzXIx8tc/rukKXGft73ezc4EKX HRyZrpwRuvX2j2fOtGpo5L+gLOO8pcYihBdhE0SQhsbmu3KY3FLkbb9UHnG6M5i00bq90jP3O4b h X-Google-Smtp-Source: AGHT+IGnLKqLWnlkA9R8Xj2G/NpZMA1/sfAHgnB/oEUXkXnEgYZIcVflnk53biBDAwy8ivVKJsn5Kg== X-Received: by 2002:a17:903:41ce:b0:1e2:4c85:82ea with SMTP id d9443c01a7336-1f4486f23c2mr25984395ad.24.1716552885435; Fri, 24 May 2024 05:14:45 -0700 (PDT) Received: from hexa.. ([98.142.47.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a5388sm12592845ad.220.2024.05.24.05.14.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 05:14:45 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][kirkstone 8/8] initscripts: Add custom mount args for /var/lib Date: Fri, 24 May 2024 05:14:24 -0700 Message-Id: X-Mailer: git-send-email 2.34.1 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 ; Fri, 24 May 2024 12:14:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/199850 From: Colin McAllister Adds bitbake variable to set additional mount flags for the /var/lib overlayfs or bind mount when using a read-only root filesystem. This can be used to set additional options like "-o nodev". (From OE-Core rev: c3109e40e2c2c881996dd3fcc95fca74f098646d) Signed-off-by: Colin McAllister Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- .../initscripts/initscripts-1.0/read-only-rootfs-hook.sh | 4 ++-- meta/recipes-core/initscripts/initscripts_1.0.bb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh index 6706a117f7..a29773647f 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh @@ -37,9 +37,9 @@ if [ "$1" = "start" ] ; then mkdir -p /var/volatile/.lib-work # Try to mount using overlay, which is much faster than copying # files. If that fails, fallback to the slower copy - if ! mount -t overlay overlay -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then + if ! mount -t overlay overlay SED_VARLIBMOUNTARGS -olowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work /var/lib > /dev/null 2>&1; then cp -a /var/lib/* /var/volatile/lib - mount --bind /var/volatile/lib /var/lib + mount SED_VARLIBMOUNTARGS --bind /var/volatile/lib /var/lib fi fi fi diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb index 7c9d9ca4f1..e28d8c6b72 100644 --- a/meta/recipes-core/initscripts/initscripts_1.0.bb +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb @@ -59,10 +59,12 @@ FILES:${PN}-functions = "${sysconfdir}/init.d/functions*" FILES:${PN}-sushell = "${base_sbindir}/sushell" HALTARGS ?= "-d -f" +VARLIBMOUNTARGS ?= "" do_configure() { sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/halt sed -i -e "s:SED_HALTARGS:${HALTARGS}:g" ${WORKDIR}/reboot + sed -i -e "s:SED_VARLIBMOUNTARGS:${VARLIBMOUNTARGS}:g" ${WORKDIR}/read-only-rootfs-hook.sh } do_install () {