Vasily Averin
2323690eb0
ipv6: allocate enough headroom in ip6_finish_output2()
[ Upstream commit 5796015fa9 ]
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
..
2020-06-20 21:33:57 -07:00
2021-06-23 14:42:42 +02:00
2020-08-31 12:26:39 -07:00
2021-06-30 08:47:20 -04:00
2020-11-25 11:20:16 -08:00
2020-08-31 12:26:39 -07:00
2021-04-14 08:42:05 +02:00
2020-07-30 16:30:55 -07:00
2021-03-17 17:06:15 +01:00
2020-07-24 17:12:41 -07:00
2021-04-14 08:42:07 +02:00
2021-07-14 16:56:14 +02:00
2021-07-14 16:56:28 +02:00
2020-07-28 17:42:31 -07:00
2020-06-20 21:33:57 -07:00
2021-03-04 11:38:46 +01:00
2019-12-24 22:28:54 -08:00
2020-08-31 13:08:10 -07:00
2021-03-30 14:31:57 +02:00
2020-08-05 20:13:21 -07:00
2021-05-22 11:40:55 +02:00
2021-03-04 11:38:46 +01:00
2021-03-30 14:32:01 +02:00
2020-06-23 20:10:15 -07:00
2021-07-31 08:16:12 +02:00
2021-07-14 16:56:25 +02:00
2020-06-01 14:57:14 -07:00
2021-05-22 11:40:55 +02:00
2020-07-24 15:41:54 -07:00
2020-07-09 12:55:37 +02:00
2020-08-02 01:02:12 -07:00
2020-09-18 17:45:04 -07:00
2020-03-29 22:30:57 -07:00
2021-05-14 09:50:44 +02:00
2021-06-03 09:00:48 +02:00
2020-11-13 14:24:39 -08:00
2020-10-30 12:57:39 +01:00
2021-07-19 09:44:44 +02:00
2020-07-03 14:36:04 -07:00
2021-04-14 08:42:02 +02:00
2021-06-03 09:00:50 +02:00
2021-07-28 14:35:40 +02:00
2020-06-23 20:27:09 -07:00
2020-04-18 15:04:27 -07:00
2020-05-08 15:32:17 +10:00
2020-08-03 17:57:40 -07:00
2020-06-04 15:39:32 -07:00
2020-06-04 15:39:32 -07:00
2021-05-22 11:40:55 +02:00
2020-11-10 17:42:35 -08:00
2020-09-02 15:44:53 -07:00
2021-07-25 14:36:21 +02:00
2020-07-09 12:52:37 +02:00
2020-07-24 15:41:54 -07:00
2021-02-10 09:29:23 +01:00
2021-07-25 14:36:22 +02:00
2020-07-19 18:16:41 -07:00
2020-05-06 09:40:08 +02:00
2021-07-25 14:36:18 +02:00
2019-12-24 22:28:54 -08:00
2020-04-28 11:28:36 +02:00
2020-05-06 09:40:08 +02:00
2020-10-09 12:29:48 +02:00