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

Realtek rtl819x Jungle SDK boa getInfo stack-based buffer overflow vulnerability

A stack-based buffer overflow exists in the boa getInfo function of Realtek rtl819x Jungle SDK when handling the pskValueUnmask parameter, because the translate_control_code function expands certain characters and can overflow a 200-byte stack buffer. An attacker could send a series of HTTP requests to trigger the overflow and potentially achieve remote code execution.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 7.2 View original

A stack-based buffer overflow vulnerability exists in the boa getInfo functionality of Realtek rtl819x Jungle SDK v3.4.11. A specially crafted series of HTTP requests can lead to remote 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 translate_control_code function uses a fixed-size stack buffer (200 bytes) to hold the expanded output, but certain input characters expand to multiple bytes, so a long enough input can overflow that buffer.

What the attacker needed

Authentication as admin (PR:H); ability to set WPA-PSK; send HTTP requests to router

The fix

The text does not state a specific fix, but the vendor (Realtek) has provided updated software to their customers; LevelOne declined to patch.

How it was found

  1. Set the WPA-PSK value to a string containing many characters that expand during URL-encoding, such as '<'.
  2. Send an HTTP request to a page that calls getInfo("pskValueUnmask"), causing the stored PSK to be processed by translate_control_code.
  3. The expansion overflows the tmpBuf stack buffer, leading to a crash or potential code execution.

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.

This report describes a memory corruption bug in a web server used by some routers. When the router displays a setting, it converts special characters into longer codes, and if the setting is long enough, the conversion writes past the end of a small buffer on the stack, which can crash the router or let an attacker run their own code.

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.