|
| 1 | +.. SPDX-License-Identifier: CC-BY-4.0 |
| 2 | +
|
| 3 | +.. _chapter-appendix: |
| 4 | + |
| 5 | +Appendix |
| 6 | +======== |
| 7 | + |
| 8 | +External SBOM Metadata |
| 9 | +---------------------- |
| 10 | + |
| 11 | +This document strongly encourages vendors to embed the SBOM metadata into the respective binaries, but there are two situations where externally referenced SBOM metadata would be allowed: |
| 12 | + |
| 13 | +- Where the binary is loaded onto critically space-constrained devices, for example microcode that is loaded into the processor itself. |
| 14 | +- Where only later newer versions of the component have embedded SBOM metadata, and backwards compatibility is required with older revisions. |
| 15 | + |
| 16 | +In these cases, the *component vendor* **MUST** provide “detached metadata” from the same source (or in the same archive file) as is used to distribute the immutable blob. |
| 17 | + |
| 18 | +As the SBOM metadata is detached, vendors **MUST** ensure that the files do not get “out of sync” and are updated at the same time in the firmware source tree. |
| 19 | +Detached metadata **MUST** `always contain the SHA256 hash value of the binary <https://github.com/hughsie/python-uswid/#use-cases>`_ as evidence to allow validation and **MAY** be signed using a detached signature if the archive is not already signed. |
| 20 | +The public key **SHOULD** be distributed on a keyserver or company website for verification. |
| 21 | + |
| 22 | + |
| 23 | +Wasted Space Concerns |
| 24 | +--------------------- |
| 25 | + |
| 26 | +Some vendors have expressed concerns about “wasted” space from including the SBOM data in the binary image. |
| 27 | +For source components such as CPU microcode, a single *component* and vendor *entity* would use an additional ~350 bytes (zlib compressed coSWID), compared to 48kB for the average EFI binary and 25kb for a typical vendor BGRT “splash” logo. |
| 28 | + |
| 29 | +The ``uswid`` command can automatically `generate <https://github.com/hughsie/python-uswid#generating-test-data>`_ a complete “worst case” platform SBOM with 1,000 plausible components. |
| 30 | +This SBOM requires an additional 140kB of SPI flash space (uncompressed coSWID), or 60kB when compressed with LZMA. |
| 31 | +For reference, the average free space in an Intel Flash ROM BIOS partition is 5.26Mb, where “free space” is defined as a greater than 100KiB stream of consecutive 0xFF’s after the first detected EFI file volume. |
| 32 | +Adding the SBOM as embedded metadata would use 1.1% of the available free space. |
| 33 | +Other firmware ecosystems such as Coreboot also `now include SBOM generation <https://doc.coreboot.org/sbom/sbom.html>`_ as part of the monolithic image. |
| 34 | + |
| 35 | + |
| 36 | +Getting the Runtime SBOM |
| 37 | +------------------------ |
| 38 | + |
| 39 | +The ACPI ``SBOM`` ACPI table may be used in the future to return the coSWID formatted binary SBOM data from any device exporting an ACPI callable interface. |
| 40 | +Further details will be provided when the SBOM table has been implemented. |
| 41 | + |
| 42 | +If the platform allows direct access to the system SPI device, then the entire firmware image can be dumped to a local file and analyzed by tools such as ``uswid``. |
| 43 | + |
| 44 | +Converting the SBOM |
| 45 | +------------------- |
| 46 | + |
| 47 | +The embedded SBOM **SHOULD** be converted it into one or more SBOM export formats before publication. |
| 48 | + |
| 49 | +This can be achieved easily using tools such as ``uswid``. |
| 50 | +For example, this can be used to produce two JSON files in CycloneDX and SPDX formats from the platform image: |
| 51 | + |
| 52 | +:: |
| 53 | + |
| 54 | + $ uswid --load rom.bin --save cyclonedx-bom.json |
| 55 | + $ uswid --load rom.bin --save spdx.json |
| 56 | + |
| 57 | +Signing the SBOM |
| 58 | +---------------- |
| 59 | + |
| 60 | +The embedded SBOM **MAY** be signed, and **MAY** also be included in the firmware checksum. |
| 61 | +If the firmware component is signed then the SBOM **SHOULD** be included in to the signature. |
| 62 | +The signing step is optional because a malicious silicon provider can typically do much worse things (e.g. adding or replacing a DXE binary) than modify the SBOM metadata. |
| 63 | + |
| 64 | +Using the LVFS |
| 65 | +-------------- |
| 66 | + |
| 67 | +When firmware is uploaded to the LVFS it automatically extracts all available SBOM metadata and generates `a HTML page <https://fwupd.org/lvfs/devices/component/64327/swid>`_ with SPDX, SWID and CycloneDX download links that can be used for compliance purposes. |
| 68 | +The LVFS **MAY** allow vendors to upload firmware or platform SBOMs without uploading the firmware binary. |
| 69 | +Other services like Windows Update may offer this service in the future. |
| 70 | + |
| 71 | +The VEX "trusted neutral entity" **MAY** also be the LVFS, even for firmware updates not distributed by the LVFS. |
| 72 | +Uploading VEX data requires vendors to register `for a LVFS vendor account <https://lvfs.readthedocs.io/en/latest/apply.html>`_ which is available at no cost. |
0 commit comments