Bug #75934 [Asn]: Out of Bound in sodium_pad

From: Date: Sat, 28 Apr 2018 00:52:11 +0000
Subject: Bug #75934 [Asn]: Out of Bound in sodium_pad
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214960@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75934&edit=1

 ID:                 75934
 User updated by:    zhihua dot yao at dbappsecurity dot com dot cn
 Reported by:        zhihua dot yao at dbappsecurity dot com dot cn
 Summary:            Out of Bound in sodium_pad
 Status:             Assigned
 Type:               Bug
 Package:            Reproducible crash
 PHP Version:        7.2.2
 Assigned To:        jedisct1
 Block user comment: N
 Private report:     N

 New Comment:

However, I was using the latest version. When I compiled the sodium, this poc would cause a
crash.Maybe it has been fixed?


Previous Comments:
------------------------------------------------------------------------
[2018-04-27 14:34:31] jedisct1@php.net

Weird, the memory allocation should have failed. There are no ways to allocate close to 4 Gb on
Linux/i386.

Tried on a Linux system and the memory allocation failed as expected.

Where did you find a PHP 7 binary for such an old distribution?

------------------------------------------------------------------------
[2018-04-27 14:26:59] zhihua dot yao at dbappsecurity dot com dot cn

Yes,Ubuntu 14.04 x86

------------------------------------------------------------------------
[2018-04-27 13:43:14] jedisct1@php.net

What system is that on? Is it a 32 bit system?

------------------------------------------------------------------------
[2018-04-27 12:05:17] cmb@php.net

On a quick glance, the check blocksize > SIZE_MAX[1] looks
fishy. Frank, could you please have a look at this issue?

[1] <https://github.com/php/php-src/blob/PHP-7.2.2/ext/sodium/libsodium.c#L3386>

------------------------------------------------------------------------
[2018-04-27 02:41:36] zhihua dot yao at dbappsecurity dot com dot cn

Any update?Security Issue?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

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


--
Edit this bug report at https://bugs.php.net/bug.php?id=75934&edit=1


Thread (16 messages)

« previous php.bugs (#214960) next »