Commit b3701e78 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Yongqiang Liu
Browse files

prlimit: do_prlimit needs to have a speculation check

stable inclusion
from stable-v4.19.271
commit d3ee91e50a6b3c5a45398e3dcb912a8a264f575c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6DPF8


CVE: NA

--------------------------------

commit 73979060 upstream.

do_prlimit() adds the user-controlled resource value to a pointer that
will subsequently be dereferenced.  In order to help prevent this
codepath from being used as a spectre "gadget" a barrier needs to be
added after checking the range.

Reported-by: default avatarJordy Zomer <jordyzomer@google.com>
Tested-by: default avatarJordy Zomer <jordyzomer@google.com>
Suggested-by: default avatarLinus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 89d288a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment