Bug 2158791 (CVE-2022-31631)

Summary: CVE-2022-31631 php: PDO::quote() may return unquoted string due to an integer overflow
Product: [Other] Security Response Reporter: Sandipan Roy <saroy>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: hhorak, jorton, rcollet
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in PHP. This issue occurs due to an uncaught integer overflow in PDO::quote() of PDO_SQLite returning an improperly quoted string. With the implementation of sqlite3_snprintf(), it is possible to force the function to return a single apostrophe if the function is called on user-supplied input without any length restrictions in place.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-17 02:34:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2158798, 2158799, 2158800, 2158801, 2158802, 2158803, 2161672, 2161673    
Bug Blocks: 2158745    

Comment 1 Sandipan Roy 2023-01-06 16:05:24 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 2158798]

Comment 3 Remi Collet 2023-01-09 07:31:34 UTC
Notice: This issue (again) needs a >2GB string to be exploited

So any reasonable memory_limit will protect from it (default value is 128MB)

Comment 4 errata-xmlrpc 2023-02-21 09:31:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:0848 https://access.redhat.com/errata/RHSA-2023:0848

Comment 5 errata-xmlrpc 2023-02-28 08:20:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:0965 https://access.redhat.com/errata/RHSA-2023:0965

Comment 6 errata-xmlrpc 2023-05-09 07:45:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:2417 https://access.redhat.com/errata/RHSA-2023:2417

Comment 7 errata-xmlrpc 2023-05-16 08:26:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2903 https://access.redhat.com/errata/RHSA-2023:2903

Comment 8 Product Security DevOps Team 2023-05-17 02:34:23 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-31631