Thread (1 message) 1 message, 1 author, 2018-01-05

Re: [PATCH bpf] bpf: prevent out-of-bounds speculation

From: Mark Rutland <mark.rutland@arm.com>
Date: 2018-01-05 17:54:21

Hi Alexei,

On Thu, Jan 04, 2018 at 08:28:11PM -0800, Alexei Starovoitov wrote:
From: Alexei Starovoitov <ast@kernel.org>

Under speculation, CPUs may mis-predict branches in bounds checks. Thus,
memory accesses under a bounds check may be speculated even if the
bounds check fails, providing a primitive for building a side channel.

To avoid leaking kernel data round up array-based maps and mask the index
after bounds check, so speculated load with out of bounds index will load
either valid value from the array or zero from the padded area.
This is on my radar, and I'll try to review / test this next week.

Thanks,
Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help