Yifan YF325 httpd manage_post stack-based buffer overflow vulnerabilities
The Yifan YF325 router's manage_post function allocates memory based on an unchecked Content-Length value, leading to an integer overflow when adding 1. An attacker can send a crafted network request to trigger a heap buffer overflow, potentially leading to remote code execution.
Originally disclosed on Cisco Talos
Two heap-based buffer overflow vulnerabilities exist in the httpd managepost functionality of Yifan YF325 v1.020221108. A specially crafted network request can lead to a heap buffer overflow.
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
An attacker could send a network request to trigger a heap buffer overflow, potentially leading to remote code execution with high confidentiality, integrity, and availability impact.
What the attacker needed
Network access to the router's web interface
The fix
The Content-Length value should be validated to prevent integer overflow before allocating memory.
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 flaw in a router's web server. When the router receives a request with a very large size value, it tries to reserve memory but the calculation overflows, causing it to reserve too little. Later, when it copies the request data into that small memory area, it overflows the buffer, 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.