Skip to content
Memory corruption Disclosed report Advanced

Buffer underflow in sprintf

A buffer underflow was found in mruby's sprintf, and the reporter notes a patch landed upstream in Ruby.

haquaman Follow

Originally disclosed on HackerOne

  • Fixed in 47 days
  • Paid in 47 days
  • Disclosed after 3 months

Hi,

So I found this in mruby as part of the shopify-scripts program, and I notice that my patch also landed upstream in ruby as well. Shame on me for not checking ruby as well!

Wondered if it counted for a bounty here as well?

https://github.com/mruby/mruby/issues/3347 <- issue that shopify guys opened on my behalf. https://github.com/ruby/ruby/commit/0854193a684acc2b3a13ab28091a4397000c8822 <- commit landed upstream.

https://hackerone.com/reports/191328 (still open so not public) is the original report of mine.

Let me know if you need anything more.

Cheers,

Hugh

The original report as published on HackerOne, by haquaman. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

What the attacker needed

Access to mruby sprintf function

The fix

A patch landed upstream in Ruby; the text does not say whether mruby was fixed.

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 underflow is a memory bug where a program writes before the start of an allocated area. The sprintf function in mruby had such a flaw.

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 haquaman

View all

28 more disclosed reports, best first.

More from Ruby

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.