linux-stable/arch/s390/boot
Sven Schnelle d2130f37a4 s390/ipl: add missing intersection check to ipl_report handling
commit a52e5cdbe8 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:28:09 +01:00
..
compressed s390/decompressor: specify __decompress() buf len to avoid overflow 2023-02-22 12:50:34 +01:00
.gitignore
Makefile s390: make 'install' not depend on vmlinux 2020-03-12 13:00:13 +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
head.S s390/startup: avoid save_area_sync overflow 2020-11-05 11:43:14 +01:00
head_kdump.S
install.sh
ipl_parm.c s390/ipl_parm: fix program check new psw handling 2021-07-20 16:10:44 +02:00
ipl_report.c s390/ipl: add missing intersection check to ipl_report handling 2023-03-22 13:28:09 +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: Fix casts in get_random 2020-02-28 17:22:28 +01:00
machine_kexec_reloc.c s390/kernel: build a relocatable kernel 2019-04-29 10:47:10 +02:00
mem.S
mem_detect.c s390/mem_detect: fix tprot() program check new psw handling 2021-07-20 16:10:45 +02:00
pgm_check_info.c s390/startup: add pgm check info printing 2019-09-13 12:17:37 +02:00
sclp_early_core.c
startup.c s390/kaslr: store KASLR offset for early dumps 2019-12-17 19:56:51 +01: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 13:30:58 +02:00
uv.c s390/uv: Fix handling of length extensions 2020-02-19 19:53:04 +01:00
version.c s390: enable detection of kernel version from bzImage 2019-07-23 10:43:50 +02:00