php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80363 TypeError with nullable types with JIT enabled
Submitted: 2020-11-13 17:12 UTC Modified: 2020-12-06 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: security at paragonie dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 8.0.0RC4 OS: N/A
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-11-13 17:12 UTC] security at paragonie dot com
Description:
------------
https://github.com/paragonie/constant_time_encoding/issues/26

This was reported in PHP-8.0-RC3 and there is nothing in the NEWS file to indicate it's fixed in RC4.

https://github.com/php/php-src/blob/f5be0e5110ff816d2ce168c154cb3575d08e3cad/NEWS

Test script:
---------------
See Github issue.

Expected result:
----------------
No TypeError

Actual result:
--------------
TypeError: mb_substr(): Argument #3 ($length) must be of type ?int, null given
#34 /vendor/paragonie/constant_time_encoding/src/Binary.php(76): mb_substr
#33 /vendor/paragonie/constant_time_encoding/src/Binary.php(76): ParagonIE\ConstantTime\Binary::safeSubstr
#32 /vendor/paragonie/hidden-string/src/HiddenString.php(173): ParagonIE\HiddenString\HiddenString::safeStrcpy
#31 /vendor/paragonie/hidden-string/src/HiddenString.php(56): ParagonIE\HiddenString\HiddenString::__construct
#30 /vendor/paragonie/halite/src/Symmetric/Crypto.php(208): ParagonIE\Halite\Symmetric\Crypto::decryptWithAd
#29 /vendor/paragonie/halite/src/Symmetric/Crypto.php(105): ParagonIE\Halite\Symmetric\Crypto::decrypt
#28 /vendor/philetaylor/doctrine-encrypt/Encryptors/HaliteEncryptor.php(82): Philetaylor\DoctrineEncryptBundle\Encryptors\HaliteEncryptor::decrypt

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-17 09:41 UTC] nikic@php.net
I can't reproduce this when running the constant_time_encoding tests (with JIT) at least. From the issue, it's not really clear how this is supposed to be reproduced.
 [2020-11-24 11:50 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2020-11-24 11:50 UTC] nikic@php.net
If someone can reproduce this with RC5 or the GA release, please tell me.
 [2020-12-06 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC