On Thu, Aug 19, 2021 at 10:35 AM Shreyansh Chouhan
[off-list ref] wrote:
If we get a ip gre packet with TUNNEL_CSUM set, an invalid csum_start
value causes skb->csum_start offset to be less than the offset for
skb->data after we pull the ip header from the packet during the
ipgre_xmit call.
This patch adds a sanity check to gre_handle_offloads, which checks the
validity of skb->csum_start after we have pulled the ip header from the
packet in the ipgre_xmit call.
Reported-by: syzbot+ff8e1b9f2f36481e2efc@syzkaller.appspotmail.com
Signed-off-by: Shreyansh Chouhan <redacted>
For the ipv4 portion:
Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
For the ipv6 portion:
Fixes: b05229f44228 ("gre6: Cleanup GREv6 transmit path, call common
GRE functions")
It's possible that a similar bug exists before those, but the patch
wouldn't apply anyway.
Technically, for backporting purposes, the patch needs to be split
into two, each with their own Fixes tag. And target [PATCH net]