From patchwork Tue Dec 1 10:02:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "P. Tatrai" X-Patchwork-Id: 3263 Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net [185.136.65.225]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.7719.1796119356300405382 for ; Tue, 01 Dec 2026 02:02:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.tatrai.ext@siemens.com header.s=fm1 header.b=fUHPckMT; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.225, mailfrom: fm-1328017-20261201100232325684bccf00020703-9uxbfc@rts-flowmailer.siemens.com) Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20261201100232325684bccf00020703 for ; Tue, 01 Dec 2026 11:02:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.tatrai.ext@siemens.com; h=from:from:sender:to:to:cc:subject:subject:content-type:content-transfer-encoding:content-transfer-encoding:Date:Message-ID:MIME-Version; bh=XSUnx00NxSXfG5kQtt/gmDeisyQujzH50N6ya1E1aVs=; b=fUHPckMTvgxgmtzrqj1tw8Z8z1y68KRewuXHCU51tu7t5KSiXj2mhft2Nxu6gfJzAXFaeA BYuAX+O62uvDPYcRpCEriMPXsuxxjEEyFhYblF+oY5J4GelGytgW1xlyogrc10YZ2y9izOj8 BThpk56HIh4psOI7RzQpt4tiqeE/AayiXZKgRdifU19nPs3KdDKmjlX626bvrnVuSugkG3uM aFPbVR5qoOMSe57RJxWbeEjphmKOskHlLHIPys1/VVDG7wZU6bk0STZxgLdMWyBvVJ8Fy52c SuHOITy8VoeZ4RRZvoqK3HMnXd/JcBoiNgiJkznac+6+bZR2z8mEgS6A==; From: "P. Tatrai" To: openembedded-core@lists.openembedded.org Subject: [scarthgap][PATCH v2 0/8] Scope global CVE exclusions by product Date: Tue, 1 Dec 2026 11:02:23 +0100 Message-Id: <20261201100231.3119168-1-peter.tatrai.ext@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1328017:519-21489:flowmailer List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 10:02:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251708 From: Peter Tatrai This series backports product-scoped CVE_STATUS entries ("detail: cpe:vendor:product:description") from master. Without it, scarthgap applies every entry in cve-extra-exclusions.inc to every recipe, so e.g. a Berkeley DB CVE is reported as Ignored for zlib in SPDX/VEX. Before/after, CVE_STATUS[CVE-2020-2981] (berkeley_db) in SPDX: recipe before after db Ignored / upstream-wontfix Ignored / upstream-wontfix zlib Ignored / upstream-wontfix not reported Changes since v1 [1]: - The two squashed commits are split into separate backports of abca80a716 (patch 1) and 452e605b55 (patch 2). The parser and has_cve_product_match() are taken verbatim from master; the commit messages list what is not picked and why. - The master follow-up fixes to the parser are picked as separate cherry-picks (patches 3-5), together with the master selftest test_product_match (patch 6), instead of being folded in. - Scarthgap callers (cve-check, vex.bbclass, spdx30_tasks) still use the (status, detail, description) tuple API, so the master caller hunks are not backported. decode_cve_status() keeps that API and applies product matching. One documented difference from master: unscoped entries still apply when CVE_PRODUCT is empty, where master drops them. - The "Skipping ... missing or unknown CVE status" bb.warn lines in vex.bbclass and spdx30_tasks.py are removed in patch 2, with the reason explained in the commit message. - No release names in code comments. - Patch 8 explains how it was checked that no fixed CVE is reopened. Bisect note: patches 1-2 bring master's parser as it was first merged. Until patch 4, a description containing ':' is truncated (for example a URL); until patch 5, an invalid detail raises NameError instead of a warning. I kept this order so that every patch can be compared with its master commit. Testing: "oe-selftest -r cve_check" passes on scarthgap with this series (9 tests, including test_image_json and the test_recipe_report_json* builds). For patch 8, the old and new cve-extra-exclusions.inc were run through the cve-check and SPDX helpers for the eight named products: all 43 CVE IDs keep their status, detail and description. Against a local NVD snapshot, 42 are Ignored before and after, and none becomes Unpatched. CVE-2011-0640 is listed under udev, not linux_kernel, in NVD, so cve-check does not report it for the kernel either before or after. This comparison used the helper functions directly, not an image build. [1] https://lists.openembedded.org/g/openembedded-core/topic/122363978 Colin McAllister (1): cve-check: Fix errors in log lines Marta Rybczynska (2): selftest: add test_product_match cve-extra-inclusions: encode CPEs of affected packages Peter Marko (2): cve-check: do not skip cve status description after : cve-check: fix malformed cve status description with : characters Peter Tatrai (3): cve-check: decode product and vendor in CVE_STATUS cve-check: only apply CVE_STATUS to matching products selftest: test scoped CVE_STATUS on scarthgap meta/classes/vex.bbclass | 1 - .../distro/include/cve-extra-exclusions.inc | 24 ++--- meta/lib/oe/cve_check.py | 75 +++++++++++-- meta/lib/oe/spdx30_tasks.py | 1 - meta/lib/oeqa/selftest/cases/cve_check.py | 102 ++++++++++++++++++ 5 files changed, 181 insertions(+), 22 deletions(-)