HexBrain

Internet Bug Bounty · Report #476178

Negative size parameter in mb_split

Validstatus
criticalseverity
$1,500bounty
2upvotes
9 Nov 2020disclosed

How it was found

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

mb_split doesn't correctly detect the length when the $string has an unfinished multibyte character at the end of the string. This causes a crash due to a negative parameter to add_next_index_stringl, which calls zend_string_init and memcpy.

Could reproduce on master.

Impact

This could be used to cause memory corruption/leakage.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original