Segmentation fault while printing backtrace
A malformed Ruby script causes a segmentation fault in the mruby sandbox when it attempts to print a backtrace. The crash does not occur in mirb, and the root cause is still under investigation.
- Triaged in 18 hours
- Fixed in 36 days
- Paid in 36 days
- Disclosed after 36 days
The code below crashes the sandbox/mruby as it tries to print the backtrace. Incidentally, it does not crash mirb.
def foo(n)
return '\'
if n \n' ensure %
if:n != if n == -1110
else foo(n-1).%
end
end %foo(0)
We are still examining the bug and hope to produce a detailed analysis and a fix this week.
Thank you, Dinko Galetic Denis Kasak
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 a bug in mruby's backtrace printing code that mishandles this malformed input, but the text does not state the cause.
Impact
A crafted script can crash the mruby sandbox while it prints a backtrace; the text claims no further impact.
What the attacker needed
Ability to run a script in mruby sandbox
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 segmentation fault is a crash that happens when a program tries to access memory it shouldn't. Here, a strange-looking Ruby script makes the mruby interpreter crash while it is trying to show an error backtrace, but the same script does not crash the interactive mirb tool.
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.