From 7a5817137bfc57317adfdbd11e540c3a0dcd1c98 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Fri, 29 May 2026 17:06:31 +0200 Subject: [PATCH] package/pkg-generic.mk: replicate IGNORE_CVES to host packages For host packages, this commit adds the same `ignore_cves` list as their target counterpart and make it available from the `show-info` output. When generating a CycloneDX SBOM with `make show-info-all | utils/generate-cyclonedx` and running an analysis over it with `support/script/cve-check`, multiple vulnerabilities entries would be created with different analysis for packages that have both a host and target variant that include IGNORE_CVES entries. This is the case for the grub2 package that include ignored vulnerabilities that patch both the target and host package but aren't declared as ignored for the host package. This resulted in vulnerabilities marked as 'exploitable' for the host variant while it is patched. Signed-off-by: Thomas Perale Signed-off-by: Thomas Petazzoni --- package/pkg-generic.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 83f3506913..09d6e5b20b 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -745,6 +745,13 @@ ifeq ($$($(2)_CPE_ID_VALID),YES) $(2)_CPE_ID = $$($(2)_CPE_ID_PREFIX):$$($(2)_CPE_ID_VENDOR):$$($(2)_CPE_ID_PRODUCT):$$($(2)_CPE_ID_VERSION):$$($(2)_CPE_ID_UPDATE):*:*:*:*:*:* endif # ifeq ($$($(2)_CPE_ID_VALID),YES) +# replicate the target '_IGNORE_CVES' to the host variant +ifndef $(2)_IGNORE_CVES + ifdef $(3)_IGNORE_CVES + $(2)_IGNORE_CVES = $$($(3)_IGNORE_CVES) + endif +endif + # When a target package is a toolchain dependency set this variable to # 'NO' so the 'toolchain' dependency is not added to prevent a circular # dependency.