]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix possible crash in __tipc_nl_net_set()
authorEric Dumazet <edumazet@google.com>
Mon, 16 Apr 2018 15:29:43 +0000 (08:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Apr 2018 22:08:18 +0000 (18:08 -0400)
commitcd90697bdb314558ccb992ed10de21d28288f62f
tree446adab675af1e507ab048a2efe35edd427fdd34
parent3194c5c2bbf2edc1e29fb5b7daee5be4a07d06f9
tipc: fix possible crash in __tipc_nl_net_set()

syzbot reported a crash in __tipc_nl_net_set() caused by NULL dereference.

We need to check that both TIPC_NLA_NET_NODEID and TIPC_NLA_NET_NODEID_W1
are present.

We also need to make sure userland provided u64 attributes.

Fixes: 228c0dc72748 ("tipc: add 128-bit node identifier")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/net.c
net/tipc/netlink.c