Re: [PHP-DEV] Unserialize security policy

2017-08-17 Thread Andrea Faulds
Hi, Stanislav Malyshev wrote: Hi! The two main points are: 1. While it's true that if you're using unserialize() on untrusted input you are most likely going to be vulnerable due to object injection, it may be quite hard for an attacker to exploit this for closed source Objects are not the p

Re: [PHP-DEV] Unserialize security policy

2017-08-15 Thread Stanislav Malyshev
Hi! > The two main points are: > 1. While it's true that if you're using unserialize() on untrusted input > you are most likely going to be vulnerable due to object injection, it may > be quite hard for an attacker to exploit this for closed source Objects are not the problem (unless it's interna

Re: [PHP-DEV] Unserialize security policy

2017-08-15 Thread Christoph M. Becker
On 15.08.2017 at 23:56, Christoph M. Becker wrote: > What about references? Consider, for instance, the following code: > > > $_POST['untrusted_input'] = 'a:1:{i:0;a:1:{i:0;R:2;}}'; > > function flatten($array) > { > if (is_array($array)) { > $result = [];

Re: [PHP-DEV] Unserialize security policy

2017-08-15 Thread Christoph M. Becker
On 11.08.2017 at 12:55, Nikita Popov wrote: > I think it might also be useful to make a distinction based on > allowed_classes here. I think there is a reasonable expectation that if > allowed_classes is empty (and as such any object injection vectors are > excluded), unserialize() should be safe.

Re: [PHP-DEV] Unserialize security policy

2017-08-15 Thread Nikita Popov
On Fri, Aug 11, 2017 at 12:55 PM, Nikita Popov wrote: > On Thu, Aug 10, 2017 at 10:49 AM, Nikita Popov > wrote: > >> On Sun, Aug 6, 2017 at 12:49 AM, Stanislav Malyshev >> wrote: >> >>> Hi! >>> >>> > https://bugs.php.net/bug.php?id=75006 has been marked as a >>> non-security >>> > bug, with the

Re: [PHP-DEV] Unserialize security policy

2017-08-11 Thread Nikita Popov
On Thu, Aug 10, 2017 at 10:49 AM, Nikita Popov wrote: > On Sun, Aug 6, 2017 at 12:49 AM, Stanislav Malyshev > wrote: > >> Hi! >> >> > https://bugs.php.net/bug.php?id=75006 has been marked as a non-security >> > bug, with the justification that unserialize() should not be fed >> untrusted >> > in

Re: [PHP-DEV] Unserialize security policy

2017-08-10 Thread Nikita Popov
On Sun, Aug 6, 2017 at 12:49 AM, Stanislav Malyshev wrote: > Hi! > > > https://bugs.php.net/bug.php?id=75006 has been marked as a non-security > > bug, with the justification that unserialize() should not be fed > untrusted > > input. While we do document that unserialize() shouldn't be used on >

Re: [PHP-DEV] Unserialize security policy

2017-08-05 Thread Remi Collet
Le 06/08/2017 à 00:49, Stanislav Malyshev a écrit : > Hi! > >> https://bugs.php.net/bug.php?id=75006 has been marked as a non-security >> bug, with the justification that unserialize() should not be fed untrusted >> input. While we do document that unserialize() shouldn't be used on >> untrusted i

Re: [PHP-DEV] Unserialize security policy

2017-08-05 Thread Stanislav Malyshev
Hi! > https://bugs.php.net/bug.php?id=75006 has been marked as a non-security > bug, with the justification that unserialize() should not be fed untrusted > input. While we do document that unserialize() shouldn't be used on > untrusted input, we have always treated these as security bugs in the p

Re: [PHP-DEV] Unserialize security policy

2017-08-02 Thread Zeev Suraski
> On 2 Aug 2017, at 23:03, Nikita Popov wrote: > > Hi, > > https://bugs.php.net/bug.php?id=75006 has been marked as a non-security > bug, with the justification that unserialize() should not be fed untrusted > input. While we do document that unserialize() shouldn't be used on > untrusted input