android_kernel_xiaomi_sm8450/arch/s390/boot
Sven Schnelle b5e0b3d742 s390/ipl: add missing intersection check to ipl_report handling
commit a52e5cdbe8016d4e3e6322fd93d71afddb9a5af9 upstream.

The code which handles the ipl report is searching for a free location
in memory where it could copy the component and certificate entries to.
It checks for intersection between the sections required for the kernel
and the component/certificate data area, but fails to check whether
the data structures linking these data areas together intersect.

This might cause the iplreport copy code to overwrite the iplreport
itself. Fix this by adding two addtional intersection checks.

Cc: <stable@vger.kernel.org>
Fixes: 9641b8cc73 ("s390/ipl: read IPL report at early boot")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:30:05 +01:00
..
compressed s390/decompressor: specify __decompress() buf len to avoid overflow 2023-02-22 12:55:53 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
als.c s390: simplify disabled_wait 2019-05-02 13:54:11 +02:00
boot.h s390 updates for the 5.4 merge window 2019-09-17 14:04:43 -07:00
cmdline.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ctype.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
ebcdic.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
head_kdump.S s390/boot: make head.S and als.c be part of the decompressor only 2018-06-25 10:14:38 +02:00
head.S s390/startup: avoid save_area_sync overflow 2020-09-29 15:00:59 +02:00
install.sh s390/arch: install kernels with their proper version ID 2020-02-19 17:27:24 +01:00
ipl_parm.c s390/ipl_parm: fix program check new psw handling 2021-07-20 16:05:44 +02:00
ipl_report.c s390/ipl: add missing intersection check to ipl_report handling 2023-03-22 13:30:05 +01:00
ipl_vmparm.c s390: move ipl block and cmd line handling to early boot phase 2018-10-09 11:21:14 +02:00
kaslr.c s390/kaslr: correct and explain randomization base generation 2020-09-29 15:00:58 +02:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
Makefile s390/boot: enable .bss section for compressed kernel 2020-09-16 14:08:47 +02:00
mem_detect.c s390/mem_detect: fix tprot() program check new psw handling 2021-07-20 16:05:44 +02:00
mem.S s390/decompressor: reuse lib/mem.S for mem functions 2018-06-25 10:14:39 +02:00
pgm_check_info.c s390/startup: correct early pgm check info formatting 2020-10-02 14:40:49 +02:00
sclp_early_core.c s390/decompressor: avoid reusing uncompressed image objects 2018-06-25 10:14:39 +02:00
startup.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
string.c s390/kasan: improve string/memory functions checks 2019-01-18 09:34:18 +01:00
text_dma.S s390/boot: fix use of expolines in the DMA code 2021-07-28 14:35:42 +02:00
uv.c s390: mm: Fix secure storage access exception handling 2021-07-14 16:55:43 +02:00
version.c s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00