From: Jakub Kicinski <jakub.kicin...@netronome.com> Date: Tue, 2 Aug 2016 16:12:14 +0100
> Using per-register incrementing ID can lead to > find_good_pkt_pointers() confusing registers which > have completely different values. Consider example: ... > We need to get a UNKNOWN_VALUE with imm to force id > generation so lines 0-5 make r7 a valid packet pointer. > We then read two different bytes from the packet and > add them to copies of the constructed packet pointer. > r8 (line 9) and r9 (line 11) will get the same id of 1, > independently. When either of them is validated (line > 13) - find_good_pkt_pointers() will also mark the other > as safe. This leads to access on line 14 being mistakenly > considered safe. > > Fixes: 969bf05eb3ce ("bpf: direct packet access") > Signed-off-by: Jakub Kicinski <jakub.kicin...@netronome.com> Applied and queued up for -stable, thanks.