CVE-2015-5238: Stack overflow in libtre5
A buffer overflow in the tre_parse() function of libtre5 occurs when parsing a wide-character literal with more than 32 hex digits, leading to a stack overflow. An attacker can cause a denial of service by supplying a crafted regular expression pattern.
amlw.dev
Published on amlw.dev
Software: libtre5 Website: http://laurikari.net/tre/
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could cause a denial of service by crashing the application; arbitrary code execution is difficult because only hex characters are copied.
What the attacker needed
Ability to supply a regex pattern
How it was found
- Write a C program that calls regcomp with a pattern containing a wide-character literal with more than 32 hex digits.
- Compile the program linking against libtre5.
- Run the program, causing a segmentation fault.
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 write-up has not been written yet. The Original tab links to the source.
This is a bug in a library that handles regular expressions (patterns used to search text). When the library tries to read a special pattern that describes a character using many hexadecimal digits, it writes past the end of a small buffer, crashing the program. An attacker can use this to make a service unavailable.
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.