Eric Dumazet
cec9867ee5
erspan: do not assume transport header is always set
...
[ Upstream commit 301bd140ed0b24f0da660874c7e8a47dad8c8222 ]
Rewrite tests in ip6erspan_tunnel_xmit() and
erspan_fb_xmit() to not assume transport header is set.
syzbot reported:
WARNING: CPU: 0 PID: 1350 at include/linux/skbuff.h:2911 skb_transport_header include/linux/skbuff.h:2911 [inline]
WARNING: CPU: 0 PID: 1350 at include/linux/skbuff.h:2911 ip6erspan_tunnel_xmit+0x15af/0x2eb0 net/ipv6/ip6_gre.c:963
Modules linked in:
CPU: 0 PID: 1350 Comm: aoe_tx0 Not tainted 5.19.0-rc2-syzkaller-00160-g274295c6e53f #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:skb_transport_header include/linux/skbuff.h:2911 [inline]
RIP: 0010:ip6erspan_tunnel_xmit+0x15af/0x2eb0 net/ipv6/ip6_gre.c:963
Code: 0f 47 f0 40 88 b5 7f fe ff ff e8 8c 16 4b f9 89 de bf ff ff ff ff e8 a0 12 4b f9 66 83 fb ff 0f 85 1d f1 ff ff e8 71 16 4b f9 <0f> 0b e9 43 f0 ff ff e8 65 16 4b f9 48 8d 85 30 ff ff ff ba 60 00
RSP: 0018:ffffc90005daf910 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 000000000000ffff RCX: 0000000000000000
RDX: ffff88801f032100 RSI: ffffffff882e8d3f RDI: 0000000000000003
RBP: ffffc90005dafab8 R08: 0000000000000003 R09: 000000000000ffff
R10: 000000000000ffff R11: 0000000000000000 R12: ffff888024f21d40
R13: 000000000000a288 R14: 00000000000000b0 R15: ffff888025a2e000
FS: 0000000000000000(0000) GS:ffff88802c800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e425000 CR3: 000000006d099000 CR4: 0000000000152ef0
Call Trace:
<TASK>
__netdev_start_xmit include/linux/netdevice.h:4805 [inline]
netdev_start_xmit include/linux/netdevice.h:4819 [inline]
xmit_one net/core/dev.c:3588 [inline]
dev_hard_start_xmit+0x188/0x880 net/core/dev.c:3604
sch_direct_xmit+0x19f/0xbe0 net/sched/sch_generic.c:342
__dev_xmit_skb net/core/dev.c:3815 [inline]
__dev_queue_xmit+0x14a1/0x3900 net/core/dev.c:4219
dev_queue_xmit include/linux/netdevice.h:2994 [inline]
tx+0x6a/0xc0 drivers/block/aoe/aoenet.c:63
kthread+0x1e7/0x3b0 drivers/block/aoe/aoecmd.c:1229
kthread+0x2e9/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:302
</TASK>
Fixes: d5db21a3e697 ("erspan: auto detect truncated ipv6 packets.")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-29 08:59:48 +02:00
..
2020-08-10 12:06:44 -07:00
2022-06-29 08:59:46 +02:00
2022-03-02 11:42:49 +01:00
2021-04-14 08:42:05 +02:00
2022-04-13 21:00:57 +02:00
2020-09-25 13:58:01 -07:00
2021-06-23 14:42:41 +02:00
2019-11-01 14:57:52 -07:00
2021-12-08 09:03:18 +01:00
2022-03-16 14:15:57 +01:00
2022-04-27 13:53:48 +02:00
2022-04-13 21:00:57 +02:00
2020-03-29 22:30:57 -07:00
2019-10-04 11:10:56 -07:00
2021-12-08 09:03:26 +01:00
2022-04-13 21:01:04 +02:00
2020-08-26 15:58:48 -07:00
2020-10-02 19:11:11 -07:00
2021-01-12 20:18:12 +01:00
2020-08-03 15:29:44 -07:00
2022-06-09 10:21:09 +02:00
2022-05-12 12:25:43 +02:00
2022-06-09 10:21:09 +02:00
2021-12-22 09:30:53 +01:00
2022-01-27 10:54:33 +01:00
2022-06-25 15:16:09 +02:00
2019-11-07 16:15:56 -08:00
2019-09-20 18:23:33 -07:00
2022-01-27 10:54:33 +01:00
2022-06-29 08:59:48 +02:00
2020-03-30 13:45:04 -07:00
2020-08-25 06:28:02 -07:00
2022-06-09 10:21:09 +02:00
2020-08-25 06:23:59 -07:00
2020-11-09 15:39:39 -08:00
2021-08-04 12:46:42 +02:00
2021-03-17 17:06:12 +01:00
2020-07-09 12:55:37 +02:00
2021-06-18 10:00:05 +02:00
2020-06-30 12:29:39 -07:00
2019-10-04 11:10:56 -07:00
2022-02-16 12:54:25 +01:00
2020-08-18 16:02:16 -07:00
2020-07-10 13:54:00 -07:00
2020-10-30 12:57:39 +01:00
2021-12-01 09:19:05 +01:00
2022-06-09 10:21:09 +02:00
2021-11-18 14:04:08 +01:00
2020-03-12 22:34:48 -07:00
2022-06-09 10:21:09 +02:00
2022-05-25 09:17:58 +02:00
2022-06-09 10:21:09 +02:00
2021-04-21 13:00:57 +02:00
2021-08-18 08:59:13 +02:00
2020-03-16 18:26:54 -07:00
2022-04-08 14:40:21 +02:00
2021-05-14 09:50:46 +02:00
2021-12-01 09:19:06 +01:00
2020-02-27 18:50:19 -08:00
2021-09-18 13:40:29 +02:00
2020-07-06 13:23:03 -07:00
2020-07-06 13:23:03 -07:00
2022-06-14 18:32:47 +02:00
2021-10-27 09:56:48 +02:00
2020-10-02 19:11:11 -07:00
2022-05-09 09:05:03 +02:00
2021-08-12 13:22:05 +02:00
2022-06-14 18:32:36 +02:00
2022-05-09 09:05:03 +02:00
2021-02-03 23:28:52 +01:00
2020-08-24 17:31:20 -07:00
2021-02-03 23:28:51 +01:00
2020-03-09 22:34:58 +01:00
2020-10-13 17:11:52 -07:00
2020-07-06 13:23:03 -07:00
2020-03-16 18:26:55 -07:00
2022-03-19 13:44:46 +01:00
2020-07-09 12:51:36 +02:00
2021-07-28 14:35:37 +02:00
2020-03-12 22:34:48 -07:00
2020-07-24 15:41:54 -07:00
2021-08-12 13:22:05 +02:00
2020-07-10 13:54:00 -07:00
2022-03-02 11:42:51 +01:00
2020-07-10 13:54:00 -07:00
2022-06-09 10:21:09 +02:00
2020-07-19 18:16:41 -07:00
2020-05-06 09:40:08 +02:00
2020-05-11 15:12:27 +02:00
2019-12-24 22:28:54 -08:00
2022-06-14 18:32:40 +02:00
2020-05-06 09:40:08 +02:00
2020-10-09 12:29:48 +02:00