diff options
| author | Shigeru Yoshida <[email protected]> | 2023-12-02 16:14:41 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2023-12-06 09:08:05 +0000 |
| commit | 80d875cfc9d3711a029f234ef7d680db79e8fa4b (patch) | |
| tree | 97a08fefbda89deee425d59f547b9b063075380a /net/ipv6/tcp_ipv6.c | |
| parent | Merge branch 'ionic-small-driver-fixes' (diff) | |
| download | kernel-80d875cfc9d3711a029f234ef7d680db79e8fa4b.tar.gz kernel-80d875cfc9d3711a029f234ef7d680db79e8fa4b.zip | |
ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
In ipgre_xmit(), skb_pull() may fail even if pskb_inet_may_pull() returns
true. For example, applications can use PF_PACKET to create a malformed
packet with no IP header. This type of packet causes a problem such as
uninit-value access.
This patch ensures that skb_pull() can pull the required size by checking
the skb with pskb_network_may_pull() before skb_pull().
Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Signed-off-by: Shigeru Yoshida <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Reviewed-by: Suman Ghosh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
0 files changed, 0 insertions, 0 deletions
