Dirk van der Merwe
9354544cbc
net/tls: fix page double free on TX cleanup
...
With commit 94850257cf0f ("tls: Fix tls_device handling of partial records")
a new path was introduced to cleanup partial records during sk_proto_close.
This path does not handle the SW KTLS tx_list cleanup.
This is unnecessary though since the free_resources calls for both
SW and offload paths will cleanup a partial record.
The visible effect is the following warning, but this bug also causes
a page double free.
WARNING: CPU: 7 PID: 4000 at net/core/stream.c:206 sk_stream_kill_queues+0x103/0x110
RIP: 0010:sk_stream_kill_queues+0x103/0x110
RSP: 0018:ffffb6df87e07bd0 EFLAGS: 00010206
RAX: 0000000000000000 RBX: ffff8c21db4971c0 RCX: 0000000000000007
RDX: ffffffffffffffa0 RSI: 000000000000001d RDI: ffff8c21db497270
RBP: ffff8c21db497270 R08: ffff8c29f4748600 R09: 000000010020001a
R10: ffffb6df87e07aa0 R11: ffffffff9a445600 R12: 0000000000000007
R13: 0000000000000000 R14: ffff8c21f03f2900 R15: ffff8c21f03b8df0
Call Trace:
inet_csk_destroy_sock+0x55/0x100
tcp_close+0x25d/0x400
? tcp_check_oom+0x120/0x120
tls_sk_proto_close+0x127/0x1c0
inet_release+0x3c/0x60
__sock_release+0x3d/0xb0
sock_close+0x11/0x20
__fput+0xd8/0x210
task_work_run+0x84/0xa0
do_exit+0x2dc/0xb90
? release_sock+0x43/0x90
do_group_exit+0x3a/0xa0
get_signal+0x295/0x720
do_signal+0x36/0x610
? SYSC_recvfrom+0x11d/0x130
exit_to_usermode_loop+0x69/0xb0
do_syscall_64+0x173/0x180
entry_SYSCALL_64_after_hwframe+0x3d/0xa2
RIP: 0033:0x7fe9b9abc10d
RSP: 002b:00007fe9b19a1d48 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 0000000000000006 RCX: 00007fe9b9abc10d
RDX: 0000000000000002 RSI: 0000000000000080 RDI: 00007fe948003430
RBP: 00007fe948003410 R08: 00007fe948003430 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00005603739d9080
R13: 00007fe9b9ab9f90 R14: 00007fe948003430 R15: 0000000000000000
Fixes: 94850257cf0f ("tls: Fix tls_device handling of partial records")
Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-06-24 07:20:45 -07:00
..
2019-05-30 11:26:41 -07:00
2019-05-30 11:29:21 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:10 +02:00
2019-05-30 11:26:32 -07:00
2019-06-16 14:22:37 -07:00
2019-05-09 09:44:17 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:53 -07:00
2019-05-21 10:50:46 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:22 -07:00
2019-06-07 23:03:54 +02:00
2019-06-05 17:30:29 +02:00
2019-06-18 10:04:16 -07:00
2019-05-30 11:29:52 -07:00
2019-06-19 17:09:55 +02:00
2019-05-24 17:36:42 +02:00
2019-05-21 10:50:46 +02:00
2019-06-07 09:29:14 -07:00
2019-05-30 11:26:32 -07:00
2019-05-23 09:29:44 -07:00
2019-05-30 11:26:41 -07:00
2019-05-21 10:50:46 +02:00
2019-06-21 22:23:35 -07:00
2019-06-21 22:23:35 -07:00
2019-06-19 16:26:33 -04:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-16 20:44:20 -07:00
2019-06-05 17:36:36 +02:00
2019-06-21 09:58:42 -07:00
2019-05-30 11:26:41 -07:00
2019-06-12 09:42:34 -07:00
2019-05-30 11:26:32 -07:00
2019-06-21 22:23:35 -07:00
2019-05-21 11:28:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-21 09:58:42 -07:00
2019-06-19 17:09:55 +02:00
2019-06-17 15:55:34 -07:00
2019-06-07 09:29:14 -07:00
2019-06-05 17:37:07 +02:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:36:37 +02:00
2019-06-06 10:32:16 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-23 11:32:48 -07:00
2019-06-14 19:27:24 -07:00
2019-05-21 10:50:46 +02:00
2019-06-19 17:09:55 +02:00
2019-06-21 14:45:09 -04:00
2019-05-30 11:26:32 -07:00
2019-06-22 16:51:47 -07:00
2019-06-24 07:20:45 -07:00
2019-05-30 11:26:32 -07:00
2019-06-21 22:23:35 -07:00
2019-06-05 17:30:29 +02:00
2019-06-21 09:58:42 -07:00
2019-05-24 17:27:12 +02:00
2019-06-12 16:41:47 +02:00
2019-06-05 17:37:06 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:46 +02:00
2019-02-28 08:24:23 -07:00
2019-05-30 11:26:32 -07:00
2019-05-21 10:50:45 +02:00