Hoang Le
60b8b4e631
tipc: fix NULL deref in tipc_link_xmit()
...
[ Upstream commit b77413446408fdd256599daf00d5be72b5f3e7c6 ]
The buffer list can have zero skb as following path:
tipc_named_node_up()->tipc_node_xmit()->tipc_link_xmit(), so
we need to check the list before casting an &sk_buff.
Fault report:
[] tipc: Bulk publication failure
[] general protection fault, probably for non-canonical [#1 ] PREEMPT [...]
[] KASAN: null-ptr-deref in range [0x00000000000000c8-0x00000000000000cf]
[] CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 5.10.0-rc4+ #2
[] Hardware name: Bochs ..., BIOS Bochs 01/01/2011
[] RIP: 0010:tipc_link_xmit+0xc1/0x2180
[] Code: 24 b8 00 00 00 00 4d 39 ec 4c 0f 44 e8 e8 d7 0a 10 f9 48 [...]
[] RSP: 0018:ffffc90000006ea0 EFLAGS: 00010202
[] RAX: dffffc0000000000 RBX: ffff8880224da000 RCX: 1ffff11003d3cc0d
[] RDX: 0000000000000019 RSI: ffffffff886007b9 RDI: 00000000000000c8
[] RBP: ffffc90000007018 R08: 0000000000000001 R09: fffff52000000ded
[] R10: 0000000000000003 R11: fffff52000000dec R12: ffffc90000007148
[] R13: 0000000000000000 R14: 0000000000000000 R15: ffffc90000007018
[] FS: 0000000000000000(0000) GS:ffff888037400000(0000) knlGS:000[...]
[] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[] CR2: 00007fffd2db5000 CR3: 000000002b08f000 CR4: 00000000000006f0
Fixes: af9b028e270fd ("tipc: make media xmit call outside node spinlock context")
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20210108071337.3598-1-hoang.h.le@dektech.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-23 16:04:00 +01:00
..
2020-10-12 10:05:47 +02:00
2021-01-17 14:16:55 +01:00
2020-08-03 15:48:32 -07:00
2020-10-31 12:26:30 -07:00
2020-07-25 17:49:04 -07:00
2020-11-27 08:02:55 +01:00
2021-01-09 13:46:23 +01:00
2020-09-30 08:34:08 -07:00
2020-10-15 12:33:24 -07:00
2020-12-07 17:14:43 -08:00
2020-09-05 15:57:05 -07:00
2021-01-17 14:17:05 +01:00
2020-10-12 15:29:27 +02:00
2021-01-23 16:03:59 +01:00
2020-09-10 15:09:08 -07:00
2020-11-23 16:32:33 -08:00
2020-08-23 17:36:59 -05:00
2020-10-19 17:32:50 -07:00
2021-01-06 14:56:48 +01:00
2020-10-02 19:11:11 -07:00
2020-10-02 19:11:11 -07:00
2021-01-17 14:16:57 +01:00
2021-01-23 16:04:00 +01:00
2020-11-21 14:43:45 -08:00
2020-07-24 15:41:54 -07:00
2020-08-02 01:02:12 -07:00
2020-10-02 19:11:11 -07:00
2020-08-27 07:55:59 -07:00
2020-07-24 15:41:54 -07:00
2020-12-30 11:53:50 +01:00
2020-09-08 20:12:58 -07:00
2020-10-20 21:16:45 -07:00
2021-01-06 14:56:48 +01:00
2021-01-12 20:18:10 +01:00
2021-01-19 18:27:33 +01:00
2020-11-14 12:07:57 -08:00
2020-10-09 20:22:32 -07:00
2020-08-23 17:36:59 -05:00
2020-10-20 17:06:22 -07:00
2020-12-04 15:43:14 -08:00
2020-11-23 17:29:36 -08:00
2020-08-23 17:36:59 -05:00
2020-10-02 19:11:11 -07:00
2020-10-06 06:01:35 -07:00
2020-10-28 09:14:49 -03:00
2020-11-12 09:18:06 +01:00
2020-11-20 10:04:58 -08:00
2020-10-15 13:28:00 +01:00
2021-01-12 20:18:12 +01:00
2020-11-14 11:57:12 -08:00
2020-11-19 10:59:19 -08:00
2021-01-19 18:27:33 +01:00
2020-09-23 17:46:31 -07:00
2021-01-23 16:04:00 +01:00
2020-11-25 17:31:06 -08:00
2020-10-15 18:42:13 -07:00
2020-11-23 16:36:29 -08:00
2020-10-02 19:11:11 -07:00
2021-01-19 18:27:28 +01:00
2020-12-02 17:26:36 -08:00
2021-01-17 14:17:05 +01:00
2020-11-10 09:14:25 +01:00
2020-10-03 00:02:13 -04:00
2020-09-30 18:01:26 -07:00
2020-10-05 18:40:01 -07:00