aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-02-04 23:18:55 -0800
committerMister Oyster <oysterized@gmail.com>2017-04-16 15:03:44 +0200
commitd30927e95ba09729cbc18ec08f85711a2bf0c7dd (patch)
treee62d5928e35f15dd8f1aa0dea4eef4b857afcfed /include/linux/fs.h
parentdc9e83cd8b989e546734402ac7dbcfa09edf54b2 (diff)
ip6_gre: fix ip6gre_err() invalid reads
Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct gre_base_hdr *greh" pointer to make this code more readable. p[1] becomes greh->protocol. grhlen is the GRE header length. Fixes: c12b395a4664 ("gre: Support GRE over IPv6") Change-Id: I53521c4c78af847e1ba5381199213fa0c5a01e5c Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/fs.h')
0 files changed, 0 insertions, 0 deletions