Linux: s390/pci: Fix leak of uninitialized kernel data in SCLP report
What fixes it
- 126a7c227d8543e13903dd5622640c1f0fcc5a16LinuxCVE List
- 8ac60ae2a307a50b599bf5d300b448d638f3ba29LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
s390/pci: Fix leak of uninitialized kernel data in SCLP report
While report_error_write() checks that the provided buffer is at least as large as the header struct, but not that it is large enough to contain the report with the length claimed by report->length. If user-space provides a short buffer, meaning a larger report->length than the actually written payload, up to around 4K of kernel data from past the kmalloc(len + 1) sized buffer allocated in kernfs_fop_write_iter() will leak into the SCLP report.
However, as the entity processing the SCLP is privileged and able to access at least the page including the report, this does not leak data that entity could not access but it is still an out of bounds read and a malformed error report that should be rejected.
Text from CVE List
Affected versions 8
- Linuxaffected: 368704a65be8620df795ccbeb44e025dafbc3e1f before ba5001db9bb23ff7d2ea328c405c287ffb07786fCVE List
- Linuxaffected: 368704a65be8620df795ccbeb44e025dafbc3e1f before 126a7c227d8543e13903dd5622640c1f0fcc5a16CVE List
- Linuxaffected: 368704a65be8620df795ccbeb44e025dafbc3e1f before 8ac60ae2a307a50b599bf5d300b448d638f3ba29CVE List
- Linuxaffected: 4.7CVE List
- Linuxunaffected: all versions before 4.7CVE List
- Linuxunaffected: 6.18.59 through 6.18.*CVE List
- Linuxunaffected: 7.2.13 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List