Skip to content
RCE Advisory Advanced CVE-2023-43608

Buildroot BR_NO_CHECK_HASH_FOR data integrity vulnerability

Buildroot's hash-checking can be bypassed when a package is listed in BR_NO_CHECK_HASH_FOR, allowing a man-in-the-middle attacker to serve a malicious source archive over HTTP that is not integrity-checked. This can lead to arbitrary command execution in the builder.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 8.1 View original

A data integrity vulnerability exists in the BRNOCHECKHASHFOR functionality of Buildroot 2023.08.1 and 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

Root cause

Likely the BR_NO_CHECK_HASH_FOR mechanism allows skipping hash verification for packages, and the fallback download over plain HTTP does not enforce integrity checks, so a network attacker can substitute a malicious archive.

Impact

An attacker could execute arbitrary commands in the builder and tamper with any file generated for Buildroot's targets and hosts.

What the attacker needed

Man-in-the-middle network position; Buildroot configured with a package in BR_NO_CHECK_HASH_FOR; ability to drop connections to the primary source

The fix

The vendor released a patch, but the text does not describe the fix details.

How it was found

  1. Configure Buildroot with a custom Linux kernel git repository and enable the latest version option.
  2. The attacker drops connections to the custom repository, causing the download to fall back to the backup site over HTTP.
  3. The attacker serves a malicious tar.gz file from the backup site.
  4. Buildroot downloads the file without hash verification and uses it in the build, executing injected commands.

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 from the internet and normally checks a fingerprint (hash) to make sure the files are genuine. Here, a setting that skips that check for certain packages let an attacker who can intercept network traffic replace the download with a malicious file, and because build files can run commands, the attacker could run their own 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.