Skip to contentSkip to conversation

package/pkg-generic.mk: use more sensible default value for <pkg>_CPE_ID_UPDATE

PATCH Applied Thomas Petazzoni via buildroot 1 participant 4 messages Aug 28, 2025 – Nov 17, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-generic.mk: use more sensible default value for <pkg>_CPE_ID_UPDATE

Setting the "update" field in the CPE ID to * doesn't actually make much sense, as * is a wildcard. Instead, this field should really reflect the "subrelease" / "update" of the package, which unless specified explicitly by the package .mk file, is empty.

Using a wildcard causes a few CVEs to be incorrectly identified as affecting some of our packages.

For example https://nvd.nist.gov/vuln/detail/CVE-2013-1428 has a CPE configuration that goes like this:

cpe:2.3:a:tinc-vpn:tinc:*:pre6:*:*:*:*:*:* up to including 1.1

and this CPE configuration is currently identified as affecting our package. This isn't correct as our package is using 1.0.36, not a "pre6" version. But because the CPE ID generated by Buildroot uses * as the "update" field, and * is the wildcard, it does match with this CPE configuration.

After this change, two CVEs are no longer identified as affecting Buildroot packages:

https://nvd.nist.gov/vuln/detail/CVE-2013-1428
https://nvd.nist.gov/vuln/detail/CVE-2017-9454

and in both cases they are indeed CVEs not affecting our package.

---
 package/pkg-generic.mk | 2 --
 1 file changed, 2 deletions(-)
package/pkg-generic.mk +0 -2
index 95ff9135bd..cf55101265 100644
@@ -727,8 +727,6 @@ ifeq ($$($(2)_CPE_ID_VALID),YES)
  ifndef $(2)_CPE_ID_UPDATE
   ifdef $(3)_CPE_ID_UPDATE
    $(2)_CPE_ID_UPDATE = $$($(3)_CPE_ID_UPDATE)
-  else
-   $(2)_CPE_ID_UPDATE = *
   endif
  endif
 
Signature · 6 lines
2.50.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author Reviewed-by Titouan Christophe on v1 1/1
#1 lore raw

Hello Thomas and all,

Quoted 25 lines · Thomas Petazzoni

Setting the "update" field in the CPE ID to * doesn't actually make much sense, as * is a wildcard. Instead, this field should really reflect the "subrelease" / "update" of the package, which unless specified explicitly by the package .mk file, is empty.

Using a wildcard causes a few CVEs to be incorrectly identified as affecting some of our packages.

For example https://nvd.nist.gov/vuln/detail/CVE-2013-1428 has a CPE configuration that goes like this:

cpe:2.3:a:tinc-vpn:tinc:*:pre6:*:*:*:*:*:* up to including 1.1

and this CPE configuration is currently identified as affecting our package. This isn't correct as our package is using 1.0.36, not a "pre6" version. But because the CPE ID generated by Buildroot uses * as the "update" field, and * is the wildcard, it does match with this CPE configuration.

After this change, two CVEs are no longer identified as affecting Buildroot packages:

   https://nvd.nist.gov/vuln/detail/CVE-2013-1428
   https://nvd.nist.gov/vuln/detail/CVE-2017-9454
Quoted 6 lines

and in both cases they are indeed CVEs not affecting our package.

Looks good to me !

Quoted 9 lines
---
  package/pkg-generic.mk | 2 --
  1 file changed, 2 deletions(-)
package/pkg-generic.mk +0 -0
index 95ff9135bd..cf55101265 100644

package/pkg-generic.mk ifeq ($$($(2)_CPE_ID_VALID),YES) · line 732

Quoted 8 lines
package/pkg-generic.mk +0 -2
@@ -727,8 +727,6 @@ ifeq ($$($(2)_CPE_ID_VALID),YES)
   ifndef $(2)_CPE_ID_UPDATE
    ifdef $(3)_CPE_ID_UPDATE
     $(2)_CPE_ID_UPDATE = $$($(3)_CPE_ID_UPDATE)
-  else
-   $(2)_CPE_ID_UPDATE = *
    endif
   endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 25 lines · Thomas Petazzoni via buildroot

Setting the "update" field in the CPE ID to * doesn't actually make much sense, as * is a wildcard. Instead, this field should really reflect the "subrelease" / "update" of the package, which unless specified explicitly by the package .mk file, is empty.

Using a wildcard causes a few CVEs to be incorrectly identified as affecting some of our packages.

For example https://nvd.nist.gov/vuln/detail/CVE-2013-1428 has a CPE configuration that goes like this:

cpe:2.3:a:tinc-vpn:tinc:*:pre6:*:*:*:*:*:* up to including 1.1

and this CPE configuration is currently identified as affecting our package. This isn't correct as our package is using 1.0.36, not a "pre6" version. But because the CPE ID generated by Buildroot uses * as the "update" field, and * is the wildcard, it does match with this CPE configuration.

After this change, two CVEs are no longer identified as affecting Buildroot packages:

   https://nvd.nist.gov/vuln/detail/CVE-2013-1428
   https://nvd.nist.gov/vuln/detail/CVE-2017-9454
Quoted 6 lines

and in both cases they are indeed CVEs not affecting our package.

Applied to master, thanks.

Regards,
Arnout

Quoted 9 lines
---
  package/pkg-generic.mk | 2 --
  1 file changed, 2 deletions(-)
package/pkg-generic.mk +0 -0
index 95ff9135bd..cf55101265 100644

package/pkg-generic.mk ifeq ($$($(2)_CPE_ID_VALID),YES) · line 732

Quoted 8 lines
package/pkg-generic.mk +0 -2
@@ -727,8 +727,6 @@ ifeq ($$($(2)_CPE_ID_VALID),YES)
   ifndef $(2)_CPE_ID_UPDATE
    ifdef $(3)_CPE_ID_UPDATE
     $(2)_CPE_ID_UPDATE = $$($(3)_CPE_ID_UPDATE)
-  else
-   $(2)_CPE_ID_UPDATE = *
    endif
   endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Thomas Petazzoni via buildroot
Quoted 25 lines · Thomas Petazzoni via buildroot

Setting the "update" field in the CPE ID to * doesn't actually make much sense, as * is a wildcard. Instead, this field should really reflect the "subrelease" / "update" of the package, which unless specified explicitly by the package .mk file, is empty.

Using a wildcard causes a few CVEs to be incorrectly identified as affecting some of our packages.

For example https://nvd.nist.gov/vuln/detail/CVE-2013-1428 has a CPE configuration that goes like this:

cpe:2.3:a:tinc-vpn:tinc:*:pre6:*:*:*:*:*:* up to including 1.1

and this CPE configuration is currently identified as affecting our package. This isn't correct as our package is using 1.0.36, not a "pre6" version. But because the CPE ID generated by Buildroot uses * as the "update" field, and * is the wildcard, it does match with this CPE configuration.

After this change, two CVEs are no longer identified as affecting Buildroot packages:

   https://nvd.nist.gov/vuln/detail/CVE-2013-1428
   https://nvd.nist.gov/vuln/detail/CVE-2017-9454
Quoted 6 lines

and in both cases they are indeed CVEs not affecting our package.

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 9 lines
---
  package/pkg-generic.mk | 2 --
  1 file changed, 2 deletions(-)
package/pkg-generic.mk +0 -0
index 95ff9135bd..cf55101265 100644

package/pkg-generic.mk ifeq ($$($(2)_CPE_ID_VALID),YES) · line 732

Quoted 8 lines
package/pkg-generic.mk +0 -2
@@ -727,8 +727,6 @@ ifeq ($$($(2)_CPE_ID_VALID),YES)
   ifndef $(2)_CPE_ID_UPDATE
    ifdef $(3)_CPE_ID_UPDATE
     $(2)_CPE_ID_UPDATE = $$($(3)_CPE_ID_UPDATE)
-  else
-   $(2)_CPE_ID_UPDATE = *
    endif
   endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot