Skip to content
Memory corruption Advisory Advanced CVE-2023-45742

Realtek rtl819x Jungle SDK boa updateConfigIntoFlash integer overflow vulnerability

The boa web server in the Realtek rtl819x Jungle SDK multiplies two attacker-controlled values from an uploaded configuration file to size a heap allocation without checking for overflow. A crafted upload can therefore allocate too little memory and overflow the heap during decompression, potentially leading to arbitrary code execution.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 7.2 View original

An integer overflow vulnerability exists in the boa updateConfigIntoFlash functionality of Realtek rtl819x Jungle SDK v3.4.11. A specially crafted series of HTTP requests can lead to arbitrary code execution.

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

The product of the file-supplied compression length and compression rate is used as a malloc size without any overflow check before decompression writes into the buffer.

Impact

An attacker with authenticated access to the router's web interface could achieve arbitrary code execution on the device.

What the attacker needed

Authenticated access to the web interface; ability to upload a configuration file

The fix

Realtek provided updated software to its customers, but LevelOne declined to patch the affected router.

How it was found

  1. Send an HTTP request to the configuration upload endpoint with a file whose header contains the expected magic value.
  2. Set the compression length and compression rate fields in the header so their product overflows to a small allocation size.
  3. Let the server decompress the file into the undersized buffer, overflowing the heap.

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.

The router's web server accepts a configuration file and uses two numbers inside it to decide how much memory to reserve. If those numbers are chosen so their product wraps around to a small value, the router reserves too little space and then writes more data than fits, corrupting memory. An attacker who can log in to the router could use this to run their own code on it.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Francesco Benvenuto

View all

152 more disclosed reports, 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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.