Re: [PATCH] bpf: prevent memory disambiguation attack

2018-05-21 Thread Daniel Borkmann
On 05/21/2018 11:17 PM, Alexei Starovoitov wrote: > Detect code patterns where malicious 'speculative store bypass' can be used > and sanitize such patterns. > > 39: (bf) r3 = r10 > 40: (07) r3 += -216 > 41: (79) r8 = *(u64 *)(r7 +0) // slow read > 42: (7a) *(u64 *)(r10 -72) = 0 // verifier

[PATCH] bpf: prevent memory disambiguation attack

2018-05-21 Thread Alexei Starovoitov
Detect code patterns where malicious 'speculative store bypass' can be used and sanitize such patterns. 39: (bf) r3 = r10 40: (07) r3 += -216 41: (79) r8 = *(u64 *)(r7 +0) // slow read 42: (7a) *(u64 *)(r10 -72) = 0 // verifier inserts this instruction 43: (7b) *(u64 *)(r8 +0) = r3 // th