Bug 1219719 (CVE-2023-46159)

Summary: VUL-0: CVE-2023-46159: ceph: RGW crash upon misconfigured CORS rule
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: E-Mail List <ceph-bugs>
Status: NEW --- QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: carlos.lopez
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/392830/
Whiteboard: CVSSv3.1:SUSE:CVE-2023-46159:5.5:(AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-02-08 08:51:07 UTC
In certain cases, where a user misconfigures a CORS rule, the entirety of the string can be token characters (or, at least, the string before and after a given token is all token characters), but != "*". If the misconfigured string includes "*" we'll try to split the string and we assume that we can pop the list of string elements when "*" isn't first/last, but get_str_list() won't return anything for token-only substrings and thus 'ssplit' will have fewer elements than would be expected for a correct rule. In the case of an empty list, front() has undefined behaviour; in our experience, it often results in a huge allocation attempt because the code tries to copy the string into a
local variable 'sl'.

An example of this misconfiguration (and thus a reproduction case) is configuring an origin of " *".

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2023-46159
https://www.cve.org/CVERecord?id=CVE-2023-46159
https://bugzilla.redhat.com/show_bug.cgi?id=2215374
https://exchange.xforce.ibmcloud.com/vulnerabilities/268906
http://www.ibm.com/support/pages/node/7112263