Interger overflow in eval trigger write out of bound
An integer overflow in Perl's eval function caused a crash when a variable used a 32-bit signed type instead of the full line type, leading to negative array indexes. An attacker could trigger a crash, but the text does not claim memory corruption or code execution.
- Disclosed after 2 months
Hi security team,
i reported some samples triggered crash in eval funtion in perl.
The bug come because variable start and items used type I32 which takes half the range of line_t and folds it into negative numbers, leading to trying to store the lines at negative indexes.
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 variables start and items were declared as 32-bit signed integers (I32) while the line count type line_t is wider, so large values overflowed into negative numbers and were used as array indexes.
Impact
An attacker could cause a crash (denial of service) by triggering the overflow, but the text does not show memory corruption or code execution.
What the attacker needed
Ability to run Perl code with eval
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.
Perl is a programming language. The eval function runs a small piece of code. A number used to count lines was stored in a smaller box than needed, so very large counts wrapped around to negative numbers. That made the program try to write to a negative position in a list, which crashed it.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.