Files
android_kernel_motorola_sm6225/kernel
Sami Tolvanen 89aed473c5 ANDROID: bpf: validate bpf_func when BPF_JIT is enabled with CFI
With CONFIG_BPF_JIT, the kernel makes indirect calls to dynamically
generated code, which the compile-time Control-Flow Integrity (CFI)
checking cannot validate. This change adds basic sanity checking to
ensure we are jumping to a valid location, which narrows down the
attack surface on the stored pointer.

In addition, this change adds a weak arch_bpf_jit_check_func function,
which architectures that implement BPF JIT can override to perform
additional validation, such as verifying that the pointer points to
the correct memory region.

Bug: 140377409
Change-Id: I8ebac6637ab6bd9db44716b1c742add267298669
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
(cherry picked from commit 9a11e8da57)
2019-10-08 09:21:03 -07:00
..
2019-08-09 18:07:27 +02:00
…
2019-08-16 11:27:54 +02:00
…
2019-06-11 12:39:33 +02:00
2019-10-06 11:28:58 +02:00
2019-09-06 12:00:15 +02:00
…
…
…
2019-05-31 06:46:17 -07:00
…
…
…
…
…
2019-07-22 14:43:54 +02:00
…
…
…
2019-08-04 09:36:43 +02:00
…
…
…
2019-09-21 07:56:42 +02:00
…
…
…
…
2019-06-19 10:11:02 +02:00
2019-09-19 09:19:11 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-06-15 17:41:59 +02:00
2019-06-15 17:41:59 +02:00
…
…
…
…
…
…
…
2019-03-06 15:59:21 +00:00
…
2019-05-02 10:14:00 +02:00