]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/pti: Check the return value of pti_user_pagetable_walk_p4d()
authorJiang Biao <jiang.biao2@zte.com.cn>
Fri, 20 Jul 2018 00:06:31 +0000 (08:06 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Apr 2019 12:37:29 +0000 (14:37 +0200)
commit25e7c8eaa864a18b2816e7d9449bbd4f35537fae
tree5adc61d0ebd9cedc42692338bef39fd518260698
parentfc15656dac90c4c17dfe78c7250fd429a5bd5716
x86/pti: Check the return value of pti_user_pagetable_walk_p4d()

CVE-2017-5754

pti_user_pagetable_walk_p4d() can return NULL, so the return value should
be checked to prevent a NULL pointer dereference.

Add the check and a warning when the P4D allocation fails.

Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@linux.intel.com
Cc: luto@kernel.org
Cc: hpa@zytor.com
Cc: albcamus@gmail.com
Cc: zhong.weidong@zte.com.cn
Link: https://lkml.kernel.org/r/1532045192-49622-1-git-send-email-jiang.biao2@zte.com.cn
(cherry picked from commit b2b7d986a89b6c94b1331a909de1217214fb08c1)
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/mm/pti.c