android_kernel_sony_sdm845/net/tipc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hoang Le 310014f572 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: af9b028e27 ("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 15:38:19 +01:00
..
addr.c
addr.h
bcast.c
bcast.h
bearer.c tipc: error path leak fixes in tipc_enable_bearer() 2018-03-03 10:23:24 +01:00
bearer.h
core.c tipc: fix use-after-free in tipc_bcast_get_mode 2020-11-10 10:24:01 +01:00
core.h
discover.c tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
discover.h
eth_media.c
ib_media.c
Kconfig
link.c tipc: fix NULL deref in tipc_link_xmit() 2021-01-23 15:38:19 +01:00
link.h
Makefile
monitor.c tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path 2018-03-03 10:23:24 +01:00
monitor.h
msg.c tipc: fix memory leak caused by tipc_buf_append() 2020-11-10 10:23:50 +01:00
msg.h tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
name_distr.c tipc: add NULL pointer check before calling kfree_rcu 2019-09-21 07:14:03 +02:00
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink.c tipc: add policy for TIPC_NLA_NET_ADDR 2018-04-29 11:32:01 +02:00
netlink.h
netlink_compat.c tipc: fix uninit skb->data in tipc_nl_compat_dumpit() 2020-09-03 11:21:15 +02:00
node.c tipc: tipc clang warning 2020-01-29 10:24:19 +01:00
node.h
server.c tipc: fix memory leak in tipc_accept_from_sock() 2017-12-16 16:25:45 +01:00
server.h
socket.c tipc: use lock_sock() in tipc_sk_reinit() 2019-01-09 16:16:41 +01:00
socket.h
subscr.c tipc: fix modprobe tipc failed after switch order of device registration 2019-06-11 12:22:36 +02:00
subscr.h tipc: fix modprobe tipc failed after switch order of device registration 2019-06-11 12:22:36 +02:00
sysctl.c tipc: set sysctl_tipc_rmem and named_timeout right range 2020-01-29 10:24:21 +01:00
udp_media.c net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup 2020-05-20 08:15:30 +02:00
udp_media.h