Ying Xue
edf5ff04a4
tipc: fix uninit-value in tipc_nl_compat_link_set
syzbot reports following splat:
BUG: KMSAN: uninit-value in strlen+0x3b/0xa0 lib/string.c:486
CPU: 1 PID: 9306 Comm: syz-executor172 Not tainted 4.20.0-rc7+ #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x173/0x1d0 lib/dump_stack.c:113
kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613
__msan_warning+0x82/0xf0 mm/kmsan/kmsan_instr.c:313
strlen+0x3b/0xa0 lib/string.c:486
nla_put_string include/net/netlink.h:1154 [inline]
__tipc_nl_compat_link_set net/tipc/netlink_compat.c:708 [inline]
tipc_nl_compat_link_set+0x929/0x1220 net/tipc/netlink_compat.c:744
__tipc_nl_compat_doit net/tipc/netlink_compat.c:311 [inline]
tipc_nl_compat_doit+0x3aa/0xaf0 net/tipc/netlink_compat.c:344
tipc_nl_compat_handle net/tipc/netlink_compat.c:1107 [inline]
tipc_nl_compat_recv+0x14d7/0x2760 net/tipc/netlink_compat.c:1210
genl_family_rcv_msg net/netlink/genetlink.c:601 [inline]
genl_rcv_msg+0x185f/0x1a60 net/netlink/genetlink.c:626
netlink_rcv_skb+0x444/0x640 net/netlink/af_netlink.c:2477
genl_rcv+0x63/0x80 net/netlink/genetlink.c:637
netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
netlink_unicast+0xf40/0x1020 net/netlink/af_netlink.c:1336
netlink_sendmsg+0x127f/0x1300 net/netlink/af_netlink.c:1917
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg net/socket.c:631 [inline]
___sys_sendmsg+0xdb9/0x11b0 net/socket.c:2116
__sys_sendmsg net/socket.c:2154 [inline]
__do_sys_sendmsg net/socket.c:2163 [inline]
__se_sys_sendmsg+0x305/0x460 net/socket.c:2161
__x64_sys_sendmsg+0x4a/0x70 net/socket.c:2161
do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
entry_SYSCALL_64_after_hwframe+0x63/0xe7
The uninitialised access happened in
nla_put_string(skb, TIPC_NLA_LINK_NAME, lc->name)
This is because lc->name string is not validated before it's used.
Reported-by: syzbot+d78b8a29241a195aefb8@syzkaller.appspotmail.com
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-01-15 20:29:20 -08:00
..
2018-12-19 00:28:05 +01:00
2018-12-25 17:07:49 +09:00
2018-12-06 13:26:07 -08:00
2018-06-28 10:40:47 -07:00
2018-10-23 10:57:06 -07:00
2018-12-30 14:07:54 -08:00
2019-01-03 18:57:57 -08:00
2018-12-27 13:53:32 -08:00
2018-12-10 18:00:43 -08:00
2019-01-11 18:05:41 -08:00
2019-01-15 13:31:46 -08:00
2018-10-23 10:57:06 -07:00
2019-01-07 05:17:51 -08:00
2019-01-07 22:47:48 +01:00
2019-01-16 05:13:36 +12:00
2018-07-27 13:17:50 -07:00
2018-12-28 12:11:47 -08:00
2018-12-28 12:11:47 -08:00
2018-10-04 09:40:52 -07:00
2018-12-16 14:23:33 -08:00
2018-12-03 15:40:30 -08:00
2018-12-24 16:19:56 -08:00
2018-04-22 21:12:00 -04:00
2019-01-15 13:33:44 -08:00
2019-01-15 13:33:44 -08:00
2018-11-10 16:55:11 -08:00
2018-09-17 18:43:42 -07:00
2018-11-15 18:09:32 +01:00
2018-12-20 16:49:30 -08:00
2018-12-03 14:15:26 -08:00
2018-10-22 19:59:20 -07:00
2018-12-27 13:53:32 -08:00
2018-09-28 12:46:07 +08:00
2018-10-16 00:14:07 -07:00
2018-11-27 16:37:20 -08:00
2019-01-15 13:31:46 -08:00
2018-09-21 18:58:34 -07:00
2018-12-14 11:44:31 -08:00
2018-12-30 20:24:16 -08:00
2018-12-23 16:01:35 -08:00
2018-07-12 16:55:29 -07:00
2019-01-04 13:00:02 -08:00
2019-01-08 21:41:40 -05:00
2018-12-23 16:01:35 -08:00
2018-07-05 20:20:03 +09:00
2019-01-07 07:22:36 -08:00
2018-12-18 13:13:56 +01:00
2018-06-28 10:40:47 -07:00
2018-11-15 11:35:40 -08:00
2019-01-15 20:12:01 -08:00
2018-12-28 12:11:47 -08:00
2019-01-07 14:40:27 -05:00
2018-10-15 12:23:19 -07:00
2019-01-03 18:57:57 -08:00
2018-12-12 16:34:22 -08:00
2019-01-15 20:29:20 -08:00
2018-12-21 15:06:20 -08:00
2018-10-23 10:57:06 -07:00
2018-12-18 11:53:42 -08:00
2018-07-24 14:10:42 -07:00
2018-12-27 13:53:32 -08:00
2018-11-29 14:25:36 -08:00
2018-12-19 21:45:17 +01:00
2018-12-20 11:53:36 -08:00
2019-01-03 18:57:57 -08:00
2018-12-19 11:21:37 -08:00
2018-06-28 13:36:39 +09:00
2018-12-28 12:45:04 -08:00
2018-03-27 13:18:09 -04:00