Buildroot package hash checking data integrity vulnerabilities
Buildroot's package hash checking can be bypassed because some packages lack a .hash file, and the default backup site uses HTTP, allowing a man-in-the-middle attacker to supply a malicious source package. This leads to arbitrary command execution in the builder.
Originally disclosed on Cisco Talos
Multiple data integrity vulnerabilities exist in the package hash checking functionality of Buildroot 2023.08.1 and Buildroot dev commit 622698d7847. A specially crafted man-in-the-middle attack can lead to arbitrary command execution in the builder.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
A man-in-the-middle attacker could execute arbitrary commands in the builder and tamper with any generated files.
What the attacker needed
Man-in-the-middle network position; Buildroot uses default backup site (HTTP); target package lacks a .hash file
How it was found
- Set up a man-in-the-middle position on the network.
- Drop HTTPS requests to the primary download site to force fallback to the HTTP backup site.
- Serve a malicious source package when Buildroot requests the package.
- Buildroot downloads the package and skips hash verification because no .hash file exists.
- The malicious package's Makefile or patch executes arbitrary commands during the build.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Buildroot is a tool that builds Linux systems for embedded devices. It downloads source code for packages and checks their integrity using hash files. If a package has no hash file, Buildroot skips the check, so an attacker who can intercept network traffic could replace the download with a malicious version and run commands on the build machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.