Repository navigation
Bootloaders barebox
U-Boot alternative with a Linux-like driver model.
| Type | Monolithic bootloader (type3) |
| Upstream | https://github.com/barebox/barebox |
| CVEs attributed | 13 |
| Vulnerability-fixing commits | 6 naming a CVE, 265 keyword-matched |
| CVEs with a linked fix | 0 |
Initialises the board from reset and boots a kernel, with a shell and a filesystem-like device model.
Type 3: hardware bring-up and OS launch in one image.
See Boot-Stages for the eight-stage model these phases map onto.
- PBL (pre-bootloader) -- A small compressed prologue that runs from SRAM, sets up DRAM, and decompresses barebox proper into it.
- barebox proper -- Full initialisation: driver model, filesystem layer, network stack, and the shell.
- bootentry discovery -- Boot entries are collected from bootloader spec files, scripts in /env/boot, or the device tree.
- boot -- The chosen entry loads a kernel, device tree and initrd, and starts it.
barebox follows U-Boot's role but borrows the kernel's design: a POSIX- like filesystem layer where devices, variables and configuration all appear as files, so a boot script manipulates /env/ and /dev/ with ordinary shell commands. State the PBL gathers before DRAM exists is passed to the main image in handoff data. The state that matters most across reboots is the bootchooser's: per-slot priority and remaining- attempts counters, stored in persistent storage and decremented on each try, so a failed update rolls back automatically.
The kernel is entered with the device tree barebox assembled and fixed up, following the same ARM/RISC-V protocol U-Boot uses. barebox also implements enough of UEFI to start an EFI stub kernel, and can run as an EFI application itself.
| Surface | CVEs | |
|---|---|---|
SAS1 |
Remote access (software) | 4 |
SAS2 |
Persistent data source (software) | 3 |
HAS2 |
External hardware (hardware) | 2 |
| CWE | CVEs |
|---|---|
| CWE-190 | 3 |
| CWE-125 | 2 |
| CWE-345 | 1 |
| CWE-835 | 1 |
| CWE-346 | 1 |
Detected in its build configuration and source:
- encryption
- fortify
- measured boot
- rollback protection
- secure boot
- signature verification
- stack protector
See Security-Mechanisms for how these are detected and what a detection does and does not prove.
git -C oss-bootloaders submodule update --init type3/barebox
./scripts/analysis/run-tool.sh codeql bareboxSee Tools for what each tool applies to.