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

Yifan YF325 httpd manage_request stack-based buffer overflow vulnerability

The router's request-parsing function copies a URL path beginning with tmp/sd into a fixed-size stack buffer without checking its length. An unauthenticated attacker could send a crafted network request to overflow that buffer, potentially leading to code execution.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

A stack-based buffer overflow vulnerability exists in the httpd managerequest functionality of Yifan YF325 v1.020221108. A specially crafted network request can lead to stack-based buffer overflow.

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 code uses sprintf to prepend a slash to the URL path and store it in a fixed 0x80-byte stack buffer without validating the path length.

Impact

An unauthenticated remote attacker could trigger a stack buffer overflow, with high impact on confidentiality, integrity and availability, potentially leading to code execution.

What the attacker needed

Network access to the router's web interface; no authentication needed

The fix

The vendor released a patch; the code should also bound-check the URL path length before copying it into the fixed buffer.

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.

A buffer is a small reserved area of memory. The router copies part of the web address you request into a fixed-size area without checking how long it is, so a very long address spills over into neighbouring memory. This can crash the device or let an attacker run their own code, and it happens before any login is required.

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.