alp@vilnius: ~ up since 2019 · Vilnius Download cv.pdf

← ALP-OS

alp ~ $ work security

3,505 files compiled, 597 shipped

Our firmware needed a software bill of materials for the EU Cyber Resilience Act, but standard tools couldn’t read the image. Working from the linked ELF, I found that only 597 of 3,505 compiled files ship. I also reworked unlock, updates and TLS.

597/3,505compiled files that really ship

Tracker firmware needed stronger device security, a modern TLS stack and a software bill of materials (SBOM) for the EU Cyber Resilience Act. This page covers the design only. The details stay private.

Which files actually ship?

Standard SBOM tools can’t read this kind of RTOS firmware image, so I worked from the linked ELF instead. Most of what the compiler sees never ends up in the image, and listing all of it would make the SBOM longer and less accurate.

Files in the build

I compared four ways of counting the same build. The compiler saw 3,505 files. The linker’s “unused” list was misleading. File symbols in the ELF over-count by about 2x. Counting only files that own a sized symbol in a loaded section gives 597, and that’s what the SBOM lists. The CI pipeline handles the scanner’s rate limit and uploads to Dependency-Track with CPE identifiers.

Counting only the files that put code in the image Standard SBOM tools cannot read this RTOS firmware image, so the component list is built from the linked ELF of the release. Four tests for which files of the same build ship were compared. Files seen by the compiler: 3,505, but most of them put no code into the image. The linker's "unused" list: misleading. File symbols in the ELF: they over-report by about 2x. A file counts only if it owns a sized symbol in a loaded section: 597 files, and this is the count the SBOM uses. In CI, every release build runs five steps: the linked ELF of the release, the sized-symbol filter that keeps only files with code in the image, an inventory with a validator, a SCANOSS code scan, and an upload to Dependency-Track with CPE identifiers. If SCANOSS hits its rate limit, a manual retry step runs and the release driver is notified. Dependency-Track keeps one collection and version per release. WHICH FILES SHIP · four tests on the same build seen by the compiler 3,505 · most add no code to the image linker “unused” list misleading file symbols in the ELF over-report by about 2x owns a sized symbol in a loaded section 597 · the count the SBOM uses Standard SBOM tools cannot read this RTOS image, so the evidence comes from the linked ELF. IN CI · every release build linked ELF of the release sized-symbol file filter inventory + validator SCANOSS code scan Dependency-Track CPE identifiers On a rate limit, a manual retry step runs and the release driver is notified. One collection and version per release.
Counting only the files that put code in the image

Unlock and passwords

Unlocking is challenge-response, and the device verifies a signature. Passwords are stored only as salted PBKDF2 hashes and compared in constant time. Attempt counters survive a power cut. If the lock’s record gets damaged, the lock stays closed.

Updates and TLS

Firmware updates got downgrade and tamper protection, designed together with five new unit-test suites. I shipped it as release owner.

I moved TLS to the library’s current long-term-support line, with TLS 1.3. MD5, SHA-1, DES, renegotiation and DTLS are off. Only AEAD and ECDHE cipher suites are left.

Conclusion

Fail-first unit tests, with fakes for crypto and storage, caught 12 of 12 deliberate mutations. I also ran bench loops with reboots and power cuts.

For security code, a test suite that has never failed doesn’t prove much.

Tags security tls release