]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: __show_regs: Only resolve kernel symbols when running at EL1
authorWill Deacon <will.deacon@arm.com>
Mon, 19 Feb 2018 16:46:57 +0000 (16:46 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 28 Feb 2018 14:47:38 +0000 (08:47 -0600)
commit0100e759ef6edeb7087b1d7743ee4874702a60ed
tree30a18a672b780f59fb01e2e5e8f0b44dedb97bd0
parent2e05d8bb735d0b5d88b0f5bde4b08cc8ad8a631e
arm64: __show_regs: Only resolve kernel symbols when running at EL1

BugLink: https://bugs.launchpad.net/bugs/1752317
commit a06f818a70de21b4b3b4186816094208fc7accf9 upstream.

__show_regs pretty prints PC and LR by attempting to map them to kernel
function names to improve the utility of crash reports. Unfortunately,
this mapping is applied even when the pt_regs corresponds to user mode,
resulting in a KASLR oracle.

Avoid this issue by only looking up the function symbols when the register
state indicates that we're actually running at EL1.

Cc: <stable@vger.kernel.org>
Reported-by: NCSC Security <security@ncsc.gov.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/arm64/kernel/process.c