summaryrefslogtreecommitdiff
path: root/net/bridge/br_stp.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-10-27 09:45:34 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-29 11:18:48 +0900
commit8108a77515126f6db4374e8593956e20430307c0 (patch)
tree0c6e1ae0c05ad353f1fa675edcdaad6cf9b333b3 /net/bridge/br_stp.c
parentdea6e19f4ef746aa18b4c33d1a7fed54356796ed (diff)
bpf: bpf_compute_data uses incorrect cb structure
SK_SKB program types use bpf_compute_data to store the end of the packet data. However, bpf_compute_data assumes the cb is stored in the qdisc layer format. But, for SK_SKB this is the wrong layer of the stack for this type. It happens to work (sort of!) because in most cases nothing happens to be overwritten today. This is very fragile and error prone. Fortunately, we have another hole in tcp_skb_cb we can use so lets put the data_end value there. Note, SK_SKB program types do not use data_meta, they are failed by sk_skb_is_valid_access(). Signed-off-by: John Fastabend <john.fastabend@gmail.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp.c')
0 files changed, 0 insertions, 0 deletions