feat(sbom): FreeRTOS+TCP and FatFs in firmware trees, matched in NVD (#375) #393

Merged
sharang merged 1 commits from feat/sbom-tcp-fatfs into main 2026-09-25 11:07:08 +00:00
Owner

Closes #375.

The firmware SBOM now detects FreeRTOS+TCP and FatFs, two libraries common in STM32 projects, and matches them against NVD.

What NVD has (checked 2026-09-25)

  • FreeRTOS+TCP:
    • The TCP/IP stack's own CVEs are filed under cpe:2.3:a:amazon:freertos-plus-tcp, with plain versions: CVE-2024-38373, CVE-2025-11616…11618 and CVE-2026-7422…7426, all in the 4.x line.
    • The 2018 AMNESIA-era TCP CVEs (CVE-2018-16522…16603) are filed under the kernel, amazon:freertos "up to V10.0.1 (with FreeRTOS+TCP)", which the FreeRTOS detection already matches.
  • FatFs: filed under cpe:2.3:a:elm-chan:fatfs, with revisions written r0.16: CVE-2026-6682…6688, "R0.16 and earlier".

Changes

  • embedded_versions.rs:
    • FreeRTOS+TCP from FreeRTOS_IP.h (ipFR_TCP_VERSION_NUMBER "V4.1.0", recorded as 4.1.0).
    • FatFs from the banner at the top of ff.h ("FatFs - Generic FAT Filesystem module R0.14b"), recorded as NVD writes it, r0.14b. The header has no version macro, since FF_DEFINED is a revision id. An ff.h without that banner is ignored.
  • nvd_cpe.rs: version comparison ignores a leading r/v, and compares a letter suffix after the number (r0.14 < r0.14b < r0.16). Existing dotted versions compare exactly as before.

Nightly

fw-embedded-libs gains FreeRTOS-Plus-TCP V4.0.0 and FatFs R0.14b under Middlewares/Third_Party/. Its baseline adds both SBOM entries and their 15 CVEs.

Note: Firmwerk's own firmware detection also adds SBOM entries (library:FreeRTOS@). If it reports something extra for the new folder, the first nightly will show it, and I'll bless that line.

Checked

  • cargo fmt --all --check.
  • clippy with the CI flags for compliance-agent.
  • Agent tests: 448. New tests cover reading both versions (and an unrelated ff.h), detection in a Cube layout, FatFs revisions against an NVD range of the real CVE's shape, and the comparison rules.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Closes #375. The firmware SBOM now detects **FreeRTOS+TCP** and **FatFs**, two libraries common in STM32 projects, and matches them against NVD. ## What NVD has (checked 2026-09-25) - **FreeRTOS+TCP:** - The TCP/IP stack's own CVEs are filed under `cpe:2.3:a:amazon:freertos-plus-tcp`, with plain versions: CVE-2024-38373, CVE-2025-11616…11618 and CVE-2026-7422…7426, all in the 4.x line. - The 2018 AMNESIA-era TCP CVEs (CVE-2018-16522…16603) are filed under the kernel, `amazon:freertos` "up to V10.0.1 (with FreeRTOS+TCP)", which the FreeRTOS detection already matches. - **FatFs:** filed under `cpe:2.3:a:elm-chan:fatfs`, with revisions written `r0.16`: CVE-2026-6682…6688, "R0.16 and earlier". ## Changes - **`embedded_versions.rs`:** - FreeRTOS+TCP from `FreeRTOS_IP.h` (`ipFR_TCP_VERSION_NUMBER "V4.1.0"`, recorded as `4.1.0`). - FatFs from the banner at the top of `ff.h` ("FatFs - Generic FAT Filesystem module R0.14b"), recorded as NVD writes it, `r0.14b`. The header has no version macro, since `FF_DEFINED` is a revision id. An `ff.h` without that banner is ignored. - **`nvd_cpe.rs`:** version comparison ignores a leading `r`/`v`, and compares a letter suffix after the number (`r0.14` < `r0.14b` < `r0.16`). Existing dotted versions compare exactly as before. ## Nightly `fw-embedded-libs` gains `FreeRTOS-Plus-TCP` V4.0.0 and `FatFs` R0.14b under `Middlewares/Third_Party/`. Its baseline adds both SBOM entries and their 15 CVEs. **Note:** Firmwerk's own firmware detection also adds SBOM entries (`library:FreeRTOS@`). If it reports something extra for the new folder, the first nightly will show it, and I'll bless that line. ## Checked - `cargo fmt --all --check`. - clippy with the CI flags for compliance-agent. - Agent tests: 448. New tests cover reading both versions (and an unrelated `ff.h`), detection in a Cube layout, FatFs revisions against an NVD range of the real CVE's shape, and the comparison rules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-25 10:55:45 +00:00
feat(sbom): FreeRTOS+TCP and FatFs in firmware trees, matched in NVD (#375)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 8m25s
6fcf0042ad
FreeRTOS+TCP is read from FreeRTOS_IP.h and matched as
amazon:freertos-plus-tcp; FatFs from the banner of ff.h, as NVD writes
its revisions (r0.14b), and matched as elm-chan:fatfs. Version
comparison handles the r prefix and letter suffixes. The nightly
embedded-libs fixture carries both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit 827b7196b5 into main 2026-09-25 11:07:08 +00:00
Sign in to join this conversation.