Files
kernel_arpi/kernel
Sami Tolvanen 788bbf4f26 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: 145210207
Change-Id: I1a90c70cdcef25673a870d3c4f2586a829c0d32e
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2019-11-26 13:27:46 -08:00
..
2019-09-15 21:37:13 +02:00
2019-11-25 09:57:21 +01:00
2019-05-28 17:46:43 -04:00
2019-07-25 08:36:29 -07:00
2019-05-24 20:16:01 +02:00
2019-11-25 19:40:58 +00:00
2019-10-26 19:24:41 +02:00
2019-07-23 16:21:59 -07:00