android_kernel_motorola_sm6375/arch/ia64
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sergei Trofimovich 44d96d2dc0 ia64: module: fix symbolizer crash on fdescr
[ Upstream commit 99e729bd40fb3272fa4b0140839d5e957b58588a ]

Noticed failure as a crash on ia64 when tried to symbolize all backtraces
collected by page_owner=on:

    $ cat /sys/kernel/debug/page_owner
    <oops>

    CPU: 1 PID: 2074 Comm: cat Not tainted 5.12.0-rc4 #226
    Hardware name: hp server rx3600, BIOS 04.03 04/08/2008
    ip is at dereference_module_function_descriptor+0x41/0x100

Crash happens at dereference_module_function_descriptor() due to
use-after-free when dereferencing ".opd" section header.

All section headers are already freed after module is laoded successfully.

To keep symbolizer working the change stores ".opd" address and size after
module is relocated to a new place and before section headers are
discarded.

To make similar errors less obscure module_finalize() now zeroes out all
variables relevant to module loading only.

Link: https://lkml.kernel.org/r/20210403074803.3309096-1-slyfox@gentoo.org
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:24 +02:00
..
configs
hp/common
include ia64: module: fix symbolizer crash on fdescr 2021-05-19 10:08:24 +02:00
kernel ia64: module: fix symbolizer crash on fdescr 2021-05-19 10:08:24 +02:00
lib
mm ia64: fix discontig.c section mismatches 2021-04-28 13:19:16 +02:00
oprofile
pci
scripts
uv
install.sh
Kconfig
Kconfig.debug
Makefile kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables 2020-09-03 11:27:10 +02:00
module.lds