diff options
author | Shigeru Yoshida <syoshida@redhat.com> | 2023-12-03 01:14:41 +0900 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-12-06 10:08:05 +0100 |
commit | 80d875cfc9d3711a029f234ef7d680db79e8fa4b (patch) | |
tree | 97a08fefbda89deee425d59f547b9b063075380a /kernel/rseq.c | |
parent | efd563ff1a7e692408c9d44bec3d90949f7a9557 (diff) |
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 <syoshida@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Suman Ghosh <sumang@marvell.com>
Link: https://lore.kernel.org/r/20231202161441.221135-1-syoshida@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'kernel/rseq.c')
0 files changed, 0 insertions, 0 deletions