Skip to content
Memory corruption Disclosed report Advanced

Negative size parameter (-1) in memcpy mbfl_strcut

A negative size parameter in memcpy within mbstring's mbfl_strcut caused memory corruption in PHP.

fms Follow

Originally disclosed on HackerOne

Bounty$1,000 View original
  • Fixed in 30 days
  • Paid in 30 days
  • Disclosed after 3.5 years

https://bugs.php.net/bug.php?id=71906

Memory corruption issue on mbstring extension, issue reported to PHP developers on 2016-03-26, fixed 2016-03-29 and released at 2016-03-31, affected PHP 5.5 , PHP 5.6 and PHP 7.

http://php.net/ChangeLog-5.php#5.5.34 http://php.net/ChangeLog-5.php#5.6.20 http://php.net/ChangeLog-7.php#7.0.5

The original report as published on HackerOne, by fms. 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

Impact

Could lead to memory corruption.

What the attacker needed

None

The fix

It was fixed in PHP 5.5.34, 5.6.20, and 7.0.5.

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 memory copy function was given a negative size, which is invalid and can corrupt memory.

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 fms

View all

33 more disclosed reports, best first.

More from Internet Bug Bounty

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.