Skip to contentSkip to conversation

Support "resolved_with_pedigree" vulnerability status

PATCH Applied Thomas Perale via buildroot 2 participants 7 messages Oct 30, 2025 – Dec 18, 2025

lore
Share & tools
lore
#0 lore raw

cover Support "resolved_with_pedigree" vulnerability status

Hi,

The CycloneDX specification for vulnerabilities defines four analysis states ([1]) for cases where a vulnerability does not affect a component:

* 'resolved'
* 'resolved_with_pedigree'
* 'not_affected'
* 'false_positive'

Currently, the metadatas present in Buildroot does not allow an accurate mapping of ignored CVEs to the appropriate CycloneDX vulnerability categories. As a result, all ignored CVEs are currently marked as 'in_triage' by default.

This default analysis was was established during the introduction of the 'generate-cyclonedx' script.
The reasoning at the time was that SBOM consumers might want to re-evaluate ignored vulnerabilities, as the Buildroot infrastructure could not reliably determine their actual state.

To improve the association between patches and the vulnerabilities they address, I proposed during the Amsterdam Buildroot Dev Meeting to introduce a new 'CVE:' tag in the patch header, referencing the vulnerability the patch address. This approach is similar to what Yocto currently implements.

Further details are provided in the individual commit messages.

One of the challenges of this work was correctly splitting the patch header from the patch content. I believe the implementation now supports the various patch formats found in the Buildroot tree, but please let me know if I missed any cases.

If this series is accepted, I plan to submit a follow-up series adding 'CVE:' tags to patches that address known vulnerabilities.

[1] https://cyclonedx.org/docs/1.6/json/#vulnerabilities_items_analysis_state

Thomas Perale (2):
utils/generate-cyclonedx: add support for 'resolved_with_pedigree' docs/manual: mention CVE trailer

 docs/manual/adding-packages-generic.adoc |   6 +-
 docs/manual/patch-policy.adoc            |  13 ++-
 utils/generate-cyclonedx                 | 137 +++++++++++++++++++----
 3 files changed, 133 insertions(+), 23 deletions(-)
Signature · 6 lines
2.51.0

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

PATCH 1/2 utils/generate-cyclonedx: add support for 'resolved_with_pedigree'

The CycloneDX specification for vulnerabilities defines four analysis states ([1]) for cases where a vulnerability does not affect a component:

* 'resolved'
* 'resolved_with_pedigree'
* 'not_affected'
* 'false_positive'

Currently, the metadatas present in Buildroot does not allow an accurate mapping of ignored CVEs to the appropriate CycloneDX vulnerability categories. As a result, all ignored CVEs are currently marked as 'in_triage' by default.

This default analysis was was established during the introduction of the 'generate-cyclonedx' script. The reasoning at the time was that SBOM consumers might want to re-evaluate ignored vulnerabilities, as the Buildroot infrastructure could not reliably determine their actual state.

This patch adds support for automatically marking vulnerabilities as 'resolved_with_pedigree' when a Buildroot patch includes a 'CVE:'' tag in its header referencing the CVE identifier.

The 'CVE:' tag appears alongside the already required 'Upstream:', if the patch address a security vulnerability and may be repeated if a patch addresses multiple vulnerabilities.

If a vulnerability is addressed by multiple patch, each patch will need to reference the vulnerability identifier.

For details on how CycloneDX handles 'resolved_with_pedigree', see [1][2].

As an example, the CVE-2025-3198 from the binutils package will result in the following pedigree for the binutils component:

```
{
    "type": "unofficial",
    "diff": {
        "text": {
            "content": "..."
        }
    },
    "resolves": [
        {
            "type": "security",
            "name": "CVE-2025-3198"
        }
    ]
},
```

The resolves property is an array of issue the pedigree resolves. If multiple are adressed by the same patch, the multiple identifier will be present in this array.

In the listed vulnerabilities the entry for the CVE-2025-3198 looks like this:

```
{
    "id": "CVE-2025-3198",
    "analysis": {
        "state": "resolved_with_pedigree",
        "detail": "The CVE 'CVE-2025-3198' has been marked as ignored by Buildroot"
    },
    "affects": [
        {
            "ref": "binutils"
        }
    ]
}
```

[1] https://cyclonedx.org/docs/1.6/json/#vulnerabilities_items_analysis_state
[2] https://cyclonedx.org/docs/1.6/json/#components_items_pedigree_patches_items_resolves

---
 utils/generate-cyclonedx | 137 +++++++++++++++++++++++++++++++++------
 1 file changed, 118 insertions(+), 19 deletions(-)
utils/generate-cyclonedx +118 -19
index 60983ac1ea..eade36db6b 100755
@@ -17,6 +17,8 @@ from pathlib import Path
 import urllib.request
 import subprocess
 import sys
+import re
+
 
 CYCLONEDX_VERSION = "1.6"
 SPDX_SCHEMA_URL = f"https://raw.githubusercontent.com/CycloneDX/specification/{CYCLONEDX_VERSION}/schema/spdx.schema.json"
@@ -34,6 +36,11 @@ BR2_VERSION_FULL = (
     .strip()
 )
 
+# Set of vulnerabilities that were addressed by a patch present in buildroot
+# tree. This set is used to set the analysis of the ignored CVEs to
+# 'resolved_with_pedigree'.
+VULN_WITH_PEDIGREE = set()
+
 SPDX_LICENSES = []
 
 if not SPDX_SCHEMA_PATH.exists():
@@ -111,12 +118,91 @@ def cyclonedx_licenses(lic_list):
     }
 
 
-def cyclonedx_patches(patch_list):
+def extract_cves_from_header(header: str) -> list[str]:
+    """Extract CVE identifiers from the patch header.
+
+    Args:
+        header (str): Content of the header of a patch.
+
+    Returns:
+        list: Array of CVE identifier present in a patch header passed as
+        argument.
+    """
+    PATCH_CVE_HEADER = "CVE: "
+    return [
+        line.partition(PATCH_CVE_HEADER)[2].strip()
+        for line in header.splitlines()
+        if line.startswith(PATCH_CVE_HEADER)
+    ]
+
+
+def patch_retrieve_header(content: str) -> str:
+    """Read the content of a patch and split the header from the content.
+
+    Args:
+        content (str): Patch content.
+
+    Returns:
+        str: Patch header content.
+    """
+    DIFF_LINE_REGEX = re.compile(r"^diff\s+(?:--git|-[-\w]+)\s+(\S+)\s+(\S+)$")
+    INDEX_LINE_REGEX = re.compile(r"^Index:\s+(\S+)$")
+
+    lines = content.split('\n')
+
+    header = []
+    for i, line in enumerate(lines):
+        if DIFF_LINE_REGEX.match(line):
+            # diff --git a/configure.ac b/configure.ac
+            # index 1234..1234 100644
+            # --- a/configure.ac
+            # +++ b/configure.ac
+            break
+        elif INDEX_LINE_REGEX.match(line):
+            # Index: <filename>
+            # --- <filename>
+            # +++ <filename>
+            if i < len(lines) - 2 and lines[i + 1].startswith("===") and lines[i + 2].startswith("---"):
+                break
+        elif line.startswith("---"):
+            # Some patches don't have a 'diff' tag just the --- +++ tuple.
+            # Check next line is starting with '+++'
+            # ex: package/berkeleydb/0001-cwd-db_config.patch
+            if i < len(lines) - 2 and lines[i + 1].startswith("+++") and lines[i + 2].startswith("@@"):
+                break
+        else:
+            header.append(line)
+
+    return '\n'.join(header)
+
+
+def read_patch_file(patch_path: Path) -> str:
+    """Read the content of a patch file, handling compression.
+
+    Args:
+        patch_path (Path): Patch path.
+
+    Returns:
+        str: Patch content.
+    """
+    if patch_path.suffix == ".gz":
+        f = gzip.open(patch_path, mode="rt")
+    elif patch_path.suffix == ".bz":
+        f = bz2.open(patch_path, mode="rt")
+    else:
+        f = open(patch_path)
+
+    content = f.read()
+    f.close()
+    return content
+
+
+def cyclonedx_patches(patch_list: list[str]):
     """Translate a list of patches from the show-info JSON to a list of
     patches in CycloneDX format.
 
     Args:
-        patch_list (dict): Information about the patches as a Python dictionary.
+        patch_list (list): Array of patch relative path for a given component.
 
     Returns:
         dict: Patch information in CycloneDX format.
@@ -125,38 +211,51 @@ def cyclonedx_patches(patch_list):
     for patch in patch_list:
         patch_path = brpath / patch
         if patch_path.exists():
-            f = None
-            if patch.endswith('.gz'):
-                f = gzip.open(patch_path, mode="rt")
-            elif patch.endswith('.bz'):
-                f = bz2.open(patch_path, mode="rt")
-            else:
-                f = open(patch_path)
-
             try:
-                patch_contents.append({
-                    "text": {
-                        "content": f.read()
-                    }
-                })
+                content = read_patch_file(patch_path)
             except Exception:
                 # If the patch can't be read it won't be added to
                 # the resulting SBOM.
                 print(f"Failed to handle patch: {patch}", file=sys.stderr)
+                continue
+
+            header = patch_retrieve_header(content)
+
+            issue = {}
+            cves = extract_cves_from_header(header)
+            if cves:
+                VULN_WITH_PEDIGREE.update(cves)
+                issue = {
+                    "resolves": [
+                        {
+                            "type": "security",
+                            "name": cve
+                        } for cve in cves
+                    ]
+                }
 
-            f.close()
+            patch_contents.append({
+                "diff": {
+                    "text": {
+                        "content": content
+                    }
+                },
+                **issue
+            })
         else:
             # If the patch is not a file it's a tarball or diff url passed
             # through the `<pkg-name>_PATCH` variable.
             patch_contents.append({
-                "url": patch
+                "diff": {
+                    "url": patch
+                }
             })
 
     return {
         "pedigree": {
             "patches": [{
                 "type": "unofficial",
-                "diff": content
+                **content
             } for content in patch_contents]
         },
     }
@@ -229,7 +328,7 @@ def cyclonedx_vulnerabilities(show_info_dict):
     return [{
         "id": cve,
         "analysis": {
-            "state": "in_triage",
+            "state": "resolved_with_pedigree" if cve in VULN_WITH_PEDIGREE else "in_triage",
             "detail": f"The CVE '{cve}' has been marked as ignored by Buildroot"
         },
         "affects": [
Signature · 6 lines
2.51.0

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

Re: [Buildroot] [PATCH 1/2] utils/generate-cyclonedx: add support for 'resolved_with_pedigree'

Quoted 62 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Perale via buildroot <[email protected]> writes:

The CycloneDX specification for vulnerabilities defines four analysis states ([1]) for cases where a vulnerability does not affect a component:

* 'resolved'
* 'resolved_with_pedigree'
* 'not_affected'
* 'false_positive'

Currently, the metadatas present in Buildroot does not allow an accurate mapping of ignored CVEs to the appropriate CycloneDX vulnerability categories. As a result, all ignored CVEs are currently marked as 'in_triage' by default.

This default analysis was was established during the introduction of the 'generate-cyclonedx' script. The reasoning at the time was that SBOM consumers might want to re-evaluate ignored vulnerabilities, as the Buildroot infrastructure could not reliably determine their actual state.

This patch adds support for automatically marking vulnerabilities as 'resolved_with_pedigree' when a Buildroot patch includes a 'CVE:'' tag in its header referencing the CVE identifier.

The 'CVE:' tag appears alongside the already required 'Upstream:', if the patch address a security vulnerability and may be repeated if a patch addresses multiple vulnerabilities.

If a vulnerability is addressed by multiple patch, each patch will need to reference the vulnerability identifier.

For details on how CycloneDX handles 'resolved_with_pedigree', see [1][2].

As an example, the CVE-2025-3198 from the binutils package will result in the following pedigree for the binutils component:

```
{
    "type": "unofficial",
    "diff": {
        "text": {
            "content": "..."
        }
    },
    "resolves": [
        {
            "type": "security",
            "name": "CVE-2025-3198"
        }
    ]
},
```

The resolves property is an array of issue the pedigree resolves. If multiple are adressed by the same patch, the multiple identifier will be present in this array.

In the listed vulnerabilities the entry for the CVE-2025-3198 looks like this:

Quoted 6 lines

```

{
    "id": "CVE-2025-3198",
    "analysis": {
        "state": "resolved_with_pedigree",
        "detail": "The CVE 'CVE-2025-3198' has been marked as ignored by Buildroot"

Maybe the wording should then also be stronger for that case, E.G. "marked as resolved"?

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

Re: [Buildroot] [PATCH 1/2] utils/generate-cyclonedx: add support for 'resolved_with_pedigree'

In reply to Thomas Perale via buildroot

In reply of:

Quoted 75 lines

The CycloneDX specification for vulnerabilities defines four analysis states ([1]) for cases where a vulnerability does not affect a component:

* 'resolved'
* 'resolved_with_pedigree'
* 'not_affected'
* 'false_positive'

Currently, the metadatas present in Buildroot does not allow an accurate mapping of ignored CVEs to the appropriate CycloneDX vulnerability categories. As a result, all ignored CVEs are currently marked as 'in_triage' by default.

This default analysis was was established during the introduction of the 'generate-cyclonedx' script. The reasoning at the time was that SBOM consumers might want to re-evaluate ignored vulnerabilities, as the Buildroot infrastructure could not reliably determine their actual state.

This patch adds support for automatically marking vulnerabilities as 'resolved_with_pedigree' when a Buildroot patch includes a 'CVE:'' tag in its header referencing the CVE identifier.

The 'CVE:' tag appears alongside the already required 'Upstream:', if the patch address a security vulnerability and may be repeated if a patch addresses multiple vulnerabilities.

If a vulnerability is addressed by multiple patch, each patch will need to reference the vulnerability identifier.

For details on how CycloneDX handles 'resolved_with_pedigree', see [1][2].

As an example, the CVE-2025-3198 from the binutils package will result in the following pedigree for the binutils component:

```
{
    "type": "unofficial",
    "diff": {
        "text": {
            "content": "..."
        }
    },
    "resolves": [
        {
            "type": "security",
            "name": "CVE-2025-3198"
        }
    ]
},
```

The resolves property is an array of issue the pedigree resolves. If multiple are adressed by the same patch, the multiple identifier will be present in this array.

In the listed vulnerabilities the entry for the CVE-2025-3198 looks like this:

```
{
    "id": "CVE-2025-3198",
    "analysis": {
        "state": "resolved_with_pedigree",
        "detail": "The CVE 'CVE-2025-3198' has been marked as ignored by Buildroot"
    },
    "affects": [
        {
            "ref": "binutils"
        }
    ]
}
```
Quoted 4 lines

[1] https://cyclonedx.org/docs/1.6/json/#vulnerabilities_items_analysis_state
[2] https://cyclonedx.org/docs/1.6/json/#components_items_pedigree_patches_items_resolves

Applied to 2025.02.x and 2025.11.x. Thanks

Quoted 207 lines
---
 utils/generate-cyclonedx | 137 +++++++++++++++++++++++++++++++++------
 1 file changed, 118 insertions(+), 19 deletions(-)
utils/generate-cyclonedx +118 -19
index 60983ac1ea..eade36db6b 100755
@@ -17,6 +17,8 @@ from pathlib import Path
 import urllib.request
 import subprocess
 import sys
+import re
+
 
 CYCLONEDX_VERSION = "1.6"
 SPDX_SCHEMA_URL = f"https://raw.githubusercontent.com/CycloneDX/specification/{CYCLONEDX_VERSION}/schema/spdx.schema.json"
@@ -34,6 +36,11 @@ BR2_VERSION_FULL = (
     .strip()
 )
 
+# Set of vulnerabilities that were addressed by a patch present in buildroot
+# tree. This set is used to set the analysis of the ignored CVEs to
+# 'resolved_with_pedigree'.
+VULN_WITH_PEDIGREE = set()
+
 SPDX_LICENSES = []
 
 if not SPDX_SCHEMA_PATH.exists():
@@ -111,12 +118,91 @@ def cyclonedx_licenses(lic_list):
     }
 
 
-def cyclonedx_patches(patch_list):
+def extract_cves_from_header(header: str) -> list[str]:
+    """Extract CVE identifiers from the patch header.
+
+    Args:
+        header (str): Content of the header of a patch.
+
+    Returns:
+        list: Array of CVE identifier present in a patch header passed as
+        argument.
+    """
+    PATCH_CVE_HEADER = "CVE: "
+    return [
+        line.partition(PATCH_CVE_HEADER)[2].strip()
+        for line in header.splitlines()
+        if line.startswith(PATCH_CVE_HEADER)
+    ]
+
+
+def patch_retrieve_header(content: str) -> str:
+    """Read the content of a patch and split the header from the content.
+
+    Args:
+        content (str): Patch content.
+
+    Returns:
+        str: Patch header content.
+    """
+    DIFF_LINE_REGEX = re.compile(r"^diff\s+(?:--git|-[-\w]+)\s+(\S+)\s+(\S+)$")
+    INDEX_LINE_REGEX = re.compile(r"^Index:\s+(\S+)$")
+
+    lines = content.split('\n')
+
+    header = []
+    for i, line in enumerate(lines):
+        if DIFF_LINE_REGEX.match(line):
+            # diff --git a/configure.ac b/configure.ac
+            # index 1234..1234 100644
+            # --- a/configure.ac
+            # +++ b/configure.ac
+            break
+        elif INDEX_LINE_REGEX.match(line):
+            # Index: <filename>
+            # --- <filename>
+            # +++ <filename>
+            if i < len(lines) - 2 and lines[i + 1].startswith("===") and lines[i + 2].startswith("---"):
+                break
+        elif line.startswith("---"):
+            # Some patches don't have a 'diff' tag just the --- +++ tuple.
+            # Check next line is starting with '+++'
+            # ex: package/berkeleydb/0001-cwd-db_config.patch
+            if i < len(lines) - 2 and lines[i + 1].startswith("+++") and lines[i + 2].startswith("@@"):
+                break
+        else:
+            header.append(line)
+
+    return '\n'.join(header)
+
+
+def read_patch_file(patch_path: Path) -> str:
+    """Read the content of a patch file, handling compression.
+
+    Args:
+        patch_path (Path): Patch path.
+
+    Returns:
+        str: Patch content.
+    """
+    if patch_path.suffix == ".gz":
+        f = gzip.open(patch_path, mode="rt")
+    elif patch_path.suffix == ".bz":
+        f = bz2.open(patch_path, mode="rt")
+    else:
+        f = open(patch_path)
+
+    content = f.read()
+    f.close()
+    return content
+
+
+def cyclonedx_patches(patch_list: list[str]):
     """Translate a list of patches from the show-info JSON to a list of
     patches in CycloneDX format.
 
     Args:
-        patch_list (dict): Information about the patches as a Python dictionary.
+        patch_list (list): Array of patch relative path for a given component.
 
     Returns:
         dict: Patch information in CycloneDX format.
@@ -125,38 +211,51 @@ def cyclonedx_patches(patch_list):
     for patch in patch_list:
         patch_path = brpath / patch
         if patch_path.exists():
-            f = None
-            if patch.endswith('.gz'):
-                f = gzip.open(patch_path, mode="rt")
-            elif patch.endswith('.bz'):
-                f = bz2.open(patch_path, mode="rt")
-            else:
-                f = open(patch_path)
-
             try:
-                patch_contents.append({
-                    "text": {
-                        "content": f.read()
-                    }
-                })
+                content = read_patch_file(patch_path)
             except Exception:
                 # If the patch can't be read it won't be added to
                 # the resulting SBOM.
                 print(f"Failed to handle patch: {patch}", file=sys.stderr)
+                continue
+
+            header = patch_retrieve_header(content)
+
+            issue = {}
+            cves = extract_cves_from_header(header)
+            if cves:
+                VULN_WITH_PEDIGREE.update(cves)
+                issue = {
+                    "resolves": [
+                        {
+                            "type": "security",
+                            "name": cve
+                        } for cve in cves
+                    ]
+                }
 
-            f.close()
+            patch_contents.append({
+                "diff": {
+                    "text": {
+                        "content": content
+                    }
+                },
+                **issue
+            })
         else:
             # If the patch is not a file it's a tarball or diff url passed
             # through the `<pkg-name>_PATCH` variable.
             patch_contents.append({
-                "url": patch
+                "diff": {
+                    "url": patch
+                }
             })
 
     return {
         "pedigree": {
             "patches": [{
                 "type": "unofficial",
-                "diff": content
+                **content
             } for content in patch_contents]
         },
     }
@@ -229,7 +328,7 @@ def cyclonedx_vulnerabilities(show_info_dict):
     return [{
         "id": cve,
         "analysis": {
-            "state": "in_triage",
+            "state": "resolved_with_pedigree" if cve in VULN_WITH_PEDIGREE else "in_triage",
             "detail": f"The CVE '{cve}' has been marked as ignored by Buildroot"
         },
         "affects": [
Signature · 6 lines
2.51.0

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

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

#4 lore raw

PATCH 2/2 docs/manual: mention CVE trailer

In reply to Thomas Perale via buildroot

Adds documentation about adding a patch that address a vulnerability.

The patch-policy file now explain mention that patches that address a vulnerability needs to include a CVE: trailer with the reference of that vulnerability.

Until now only adding the reference to the _IGNORE_CVES variable was necessary, so the documentation of this entry is modified as well to point to the patch policy.

---
 docs/manual/adding-packages-generic.adoc |  6 +++---
 docs/manual/patch-policy.adoc            | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 4 deletions(-)
docs/manual/adding-packages-generic.adoc +3 -3
index 6827b9975e..e7547460fd 100644
@@ -509,9 +509,9 @@ not and can not work as people would expect it should:
 * +LIBFOO_IGNORE_CVES+ is a space-separated list of CVEs that tells
   Buildroot CVE tracking tools which CVEs should be ignored for this
   package. This is typically used when the CVE is fixed by a patch in
-  the package, or when the CVE for some reason does not affect the
-  Buildroot package. A Makefile comment must always precede the
-  addition of a CVE to this variable. Example:
+  the package (see xref:additional-patch-documentation[]), or when the CVE for
+  some reason does not affect the Buildroot package. A Makefile comment must
+  always precede the addition of a CVE to this variable. Example:
 +
 ----
 # 0001-fix-cve-2020-12345.patch
docs/manual/patch-policy.adoc +12 -1
index a4bc5f391a..7a707a33d0 100644
@@ -144,6 +144,7 @@ AC_PROG_MAKE_SET
 +AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
 ----
 
+[[additional-patch-documentation]]
 === Additional patch documentation
 
 Ideally, all patches should document an upstream patch or patch submission, when
@@ -177,4 +178,14 @@ Upstream: N/A <additional information about why patch is Buildroot specific>
 ----
 
 Adding this documentation helps streamline the patch review process during
-package version updates.
\ No newline at end of file
+package version updates.
+
+If the patch addresses one or multiple vulnerabilities, list each identifier on
+a separate line with a +CVE+ trailer.
+
+----
+CVE: <vulnerability identifier>
+----
+
+If multiple patches address the same vulnerability, reference the vulnerability
+on every patches.
Signature · 6 lines
2.51.0

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

Re: [Buildroot] [PATCH 2/2] docs/manual: mention CVE trailer

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Perale via buildroot <[email protected]> writes:

Adds documentation about adding a patch that address a vulnerability. The patch-policy file now explain mention that patches that address a vulnerability needs to include a CVE: trailer with the reference of that vulnerability.

Until now only adding the reference to the _IGNORE_CVES variable was necessary, so the documentation of this entry is modified as well to point to the patch policy.

Maybe we could extend ./utils/check-package to detect when it is forgotten?

docs/manual/patch-policy.adoc Upstream: N/A <additional information about why patch is Buildroot specific> · line 191

Quoted 6 lines

+----

docs/manual/patch-policy.adoc +5 -0
+CVE: <vulnerability identifier>
+----
+
+If multiple patches address the same vulnerability, reference the vulnerability
+on every patches.

I reworded this to "in every patch." and committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 2/2] docs/manual: mention CVE trailer

In reply to Thomas Perale via buildroot

In reply of:

Quoted 11 lines

Adds documentation about adding a patch that address a vulnerability.

The patch-policy file now explain mention that patches that address a vulnerability needs to include a CVE: trailer with the reference of that vulnerability.

Until now only adding the reference to the _IGNORE_CVES variable was necessary, so the documentation of this entry is modified as well to point to the patch policy.

Applied to 2025.02.x and 2025.11.x. Thanks

Quoted 58 lines
---
 docs/manual/adding-packages-generic.adoc |  6 +++---
 docs/manual/patch-policy.adoc            | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 4 deletions(-)
docs/manual/adding-packages-generic.adoc +3 -3
index 6827b9975e..e7547460fd 100644
@@ -509,9 +509,9 @@ not and can not work as people would expect it should:
 * +LIBFOO_IGNORE_CVES+ is a space-separated list of CVEs that tells
   Buildroot CVE tracking tools which CVEs should be ignored for this
   package. This is typically used when the CVE is fixed by a patch in
-  the package, or when the CVE for some reason does not affect the
-  Buildroot package. A Makefile comment must always precede the
-  addition of a CVE to this variable. Example:
+  the package (see xref:additional-patch-documentation[]), or when the CVE for
+  some reason does not affect the Buildroot package. A Makefile comment must
+  always precede the addition of a CVE to this variable. Example:
 +
 ----
 # 0001-fix-cve-2020-12345.patch
docs/manual/patch-policy.adoc +12 -1
index a4bc5f391a..7a707a33d0 100644
@@ -144,6 +144,7 @@ AC_PROG_MAKE_SET
 +AM_CONDITIONAL([CXX_WORKS], [test "x$rw_cv_prog_cxx_works" = "xyes"])
 ----
 
+[[additional-patch-documentation]]
 === Additional patch documentation
 
 Ideally, all patches should document an upstream patch or patch submission, when
@@ -177,4 +178,14 @@ Upstream: N/A <additional information about why patch is Buildroot specific>
 ----
 
 Adding this documentation helps streamline the patch review process during
-package version updates.
\ No newline at end of file
+package version updates.
+
+If the patch addresses one or multiple vulnerabilities, list each identifier on
+a separate line with a +CVE+ trailer.
+
+----
+CVE: <vulnerability identifier>
+----
+
+If multiple patches address the same vulnerability, reference the vulnerability
+on every patches.
Signature · 6 lines
2.51.0

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

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