net: remove two BUG() from skb_checksum_help()
authorEric Dumazet <edumazet@google.com>
Tue, 10 May 2022 03:57:40 +0000 (20:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:36 +0000 (10:22 +0200)
commit6320ae1b5876c30bf98203b6a5abe8b5c45e6a04
tree9f1caf747b223d4913900f0991397768e4372f31
parentdb6da340d66b8392dcecca0daa45051a8c1e4963
net: remove two BUG() from skb_checksum_help()

[ Upstream commit d7ea0d9df2a6265b2b180d17ebc64b38105968fc ]

I have a syzbot report that managed to get a crash in skb_checksum_help()

If syzbot can trigger these BUG(), it makes sense to replace
them with more friendly WARN_ON_ONCE() since skb_checksum_help()
can instead return an error code.

Note that syzbot will still crash there, until real bug is fixed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/dev.c