Skip to content
RCE Advisory Intermediate CVE-2023-45841CVE-2023-45842CVE-2023-45838CVE-2023-45839CVE-2023-45840

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.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.1 View original

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.

Claudio Bozzato and Francesco Benvenuto, on Cisco Talos

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

  1. Set up a man-in-the-middle position on the network.
  2. Drop HTTPS requests to the primary download site to force fallback to the HTTP backup site.
  3. Serve a malicious source package when Buildroot requests the package.
  4. Buildroot downloads the package and skips hash verification because no .hash file exists.
  5. 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.

More by Claudio Bozzato

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.