Bug 2355477 (CVE-2023-52990)

Summary: CVE-2023-52990 kernel: s390: workaround invalid gcc-11 out of bounds read warning
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerability-draftAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
[REJECTED CVE] A vulnerability was initially suspected in the Linux kernel's s390 architecture code due to a misleading out-of-bounds read warning generated by GCC 11.1/11.2. However, this was a false positive caused by compiler misinterpretation of memcpy() usage in performance-critical lowcore operations. No actual memory corruption or security risk was present. An attacker could not exploit this issue, as the underlying code behavior remained safe and correct; the fix simply replaced memcpy() with a loop to silence the erroneous warning.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-03-27 17:03:23 UTC
In the Linux kernel, the following vulnerability has been resolved:

s390: workaround invalid gcc-11 out of bounds read warning

GCC 11.1.0 and 11.2.0 generate a wrong warning when compiling the
kernel e.g. with allmodconfig:

arch/s390/kernel/setup.c: In function ‘setup_lowcore_dat_on’:
./include/linux/fortify-string.h:57:33: error: ‘__builtin_memcpy’ reading 128 bytes from a region of size 0 [-Werror=stringop-overread]
...
arch/s390/kernel/setup.c:526:9: note: in expansion of macro ‘memcpy’
  526 |         memcpy(abs_lc->cregs_save_area, S390_lowcore.cregs_save_area,
      |         ^~~~~~

This could be addressed by using absolute_pointer() with the
S390_lowcore macro, but this is not a good idea since this generates
worse code for performance critical paths.

Therefore simply use a for loop to copy the array in question and get
rid of the warning.

Comment 3 TEJ RATHI 2025-05-15 08:07:18 UTC
This CVE has been rejected upstream: https://lore.kernel.org/linux-cve-announce/2025040115-REJECTED-4ce0@gregkh/