Vasily Averin
2323690eb0
ipv6: allocate enough headroom in ip6_finish_output2()
...
[ Upstream commit 5796015fa968a3349027a27dcd04c71d95c53ba5 ]
When TEE target mirrors traffic to another interface, sk_buff may
not have enough headroom to be processed correctly.
ip_finish_output2() detect this situation for ipv4 and allocates
new skb with enogh headroom. However ipv6 lacks this logic in
ip_finish_output2 and it leads to skb_under_panic:
skbuff: skb_under_panic: text:ffffffffc0866ad4 len:96 put:24
head:ffff97be85e31800 data:ffff97be85e317f8 tail:0x58 end:0xc0 dev:gre0
------------[ cut here ]------------
kernel BUG at net/core/skbuff.c:110!
invalid opcode: 0000 [#1 ] SMP PTI
CPU: 2 PID: 393 Comm: kworker/2:2 Tainted: G OE 5.13.0 #13
Hardware name: Virtuozzo KVM, BIOS 1.11.0-2.vz7.4 04/01/2014
Workqueue: ipv6_addrconf addrconf_dad_work
RIP: 0010:skb_panic+0x48/0x4a
Call Trace:
skb_push.cold.111+0x10/0x10
ipgre_header+0x24/0xf0 [ip_gre]
neigh_connected_output+0xae/0xf0
ip6_finish_output2+0x1a8/0x5a0
ip6_output+0x5c/0x110
nf_dup_ipv6+0x158/0x1000 [nf_dup_ipv6]
tee_tg6+0x2e/0x40 [xt_TEE]
ip6t_do_table+0x294/0x470 [ip6_tables]
nf_hook_slow+0x44/0xc0
nf_hook.constprop.34+0x72/0xe0
ndisc_send_skb+0x20d/0x2e0
ndisc_send_ns+0xd1/0x210
addrconf_dad_work+0x3c8/0x540
process_one_work+0x1d1/0x370
worker_thread+0x30/0x390
kthread+0x116/0x130
ret_from_fork+0x22/0x30
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-31 08:16:12 +02:00
..
2021-04-07 15:00:08 +02:00
2021-07-31 08:16:11 +02:00
2021-01-17 14:16:55 +01:00
2021-04-07 15:00:08 +02:00
2020-10-31 12:26:30 -07:00
2020-07-25 17:49:04 -07:00
2021-06-23 14:42:41 +02:00
2021-07-19 09:44:54 +02:00
2021-07-28 14:35:37 +02:00
2021-07-14 16:56:29 +02:00
2021-07-25 14:36:19 +02:00
2021-07-28 14:35:38 +02:00
2021-07-14 16:56:27 +02:00
2020-10-12 15:29:27 +02:00
2021-07-31 08:16:11 +02:00
2021-01-23 16:04:01 +01:00
2021-03-30 14:32:01 +02:00
2021-07-28 14:35:38 +02:00
2021-07-25 14:36:20 +02:00
2021-06-30 08:47:20 -04:00
2021-06-03 09:00:50 +02:00
2021-06-18 10:00:03 +02:00
2021-07-28 14:35:41 +02:00
2021-07-31 08:16:12 +02:00
2021-03-07 12:34:05 +01:00
2020-07-24 15:41:54 -07:00
2021-02-13 13:55:02 +01:00
2021-03-17 17:06:11 +01:00
2020-08-27 07:55:59 -07:00
2021-02-10 09:29:14 +01:00
2020-07-24 15:41:54 -07:00
2021-07-19 09:44:53 +02:00
2021-04-14 08:42:13 +02:00
2021-03-17 17:06:11 +01:00
2021-07-28 14:35:34 +02:00
2021-04-14 08:42:08 +02:00
2021-07-25 14:36:19 +02:00
2021-07-14 16:56:22 +02:00
2021-06-16 12:01:36 +02:00
2021-07-28 14:35:38 +02:00
2021-06-16 12:01:35 +02:00
2021-06-03 09:00:47 +02:00
2021-06-30 08:47:22 -04:00
2020-08-23 17:36:59 -05:00
2021-03-07 12:34:07 +01:00
2021-07-14 16:56:16 +02:00
2021-06-23 14:42:42 +02:00
2020-11-12 09:18:06 +01:00
2020-11-20 10:04:58 -08:00
2021-02-17 11:02:28 +01:00
2021-07-28 14:35:41 +02:00
2021-07-31 08:16:11 +02:00
2021-06-03 09:00:48 +02:00
2021-07-20 16:05:51 +02:00
2021-02-07 15:37:12 +01:00
2021-07-14 16:56:32 +02:00
2021-07-14 16:56:24 +02:00
2021-07-31 08:16:11 +02:00
2021-07-19 09:44:52 +02:00
2020-10-02 19:11:11 -07:00
2021-07-19 09:44:53 +02:00
2021-06-18 10:00:06 +02:00
2021-07-14 16:56:23 +02:00
2021-07-19 09:44:49 +02:00
2021-06-18 10:00:06 +02:00
2020-09-30 18:01:26 -07:00
2021-06-23 14:42:44 +02:00