Re: [PATCH net 1/2] selftests/bpf: subtraction bounds test

2017-07-21 Thread Daniel Borkmann
On 07/21/2017 03:36 PM, Edward Cree wrote: There is a bug in the verifier's handling of BPF_SUB: [a,b] - [c,d] yields was [a-c, b-d] rather than the correct [a-d, b-c]. So here is a test which, with the bogus handling, will produce ranges of [0,0] and thus allowed accesses; whereas the

Re: [PATCH net 1/2] selftests/bpf: subtraction bounds test

2017-07-21 Thread Daniel Borkmann
On 07/21/2017 03:36 PM, Edward Cree wrote: There is a bug in the verifier's handling of BPF_SUB: [a,b] - [c,d] yields was [a-c, b-d] rather than the correct [a-d, b-c]. So here is a test which, with the bogus handling, will produce ranges of [0,0] and thus allowed accesses; whereas the

[PATCH net 1/2] selftests/bpf: subtraction bounds test

2017-07-21 Thread Edward Cree
There is a bug in the verifier's handling of BPF_SUB: [a,b] - [c,d] yields was [a-c, b-d] rather than the correct [a-d, b-c]. So here is a test which, with the bogus handling, will produce ranges of [0,0] and thus allowed accesses; whereas the correct handling will give a range of [-255, 255]

[PATCH net 1/2] selftests/bpf: subtraction bounds test

2017-07-21 Thread Edward Cree
There is a bug in the verifier's handling of BPF_SUB: [a,b] - [c,d] yields was [a-c, b-d] rather than the correct [a-d, b-c]. So here is a test which, with the bogus handling, will produce ranges of [0,0] and thus allowed accesses; whereas the correct handling will give a range of [-255, 255]