syzbot


KMSAN: kernel-infoleak in _copy_to_iter (4)

Status: fixed on 2018/12/18 11:30
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: 688838934c23 rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices
First crash: 1547d, last: 1520d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in _copy_to_iter (5) C 23883 557d 993d 22/24 fixed on 2021/11/10 00:50
upstream KMSAN: kernel-infoleak in _copy_to_iter C 285 1652d 1688d 9/24 fixed on 2018/08/08 18:10
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) btrfs ntfs3 erofs udf C 135739 6m 328d 23/24 internal: reported C repro on 2022/03/09 07:32
upstream KMSAN: kernel-infoleak in _copy_to_iter (3) C 36 1555d 1566d 12/24 fixed on 2018/10/30 01:28
upstream KMSAN: kernel-infoleak in _copy_to_iter (2) C 7 1581d 1609d 12/24 fixed on 2018/10/08 09:31
upstream KMSAN: kernel-infoleak in _copy_to_iter (6) C 748 329d 418d 22/24 fixed on 2022/03/08 16:11

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
netlink: 3 bytes leftover after parsing attributes in process `syz-executor310'.
==================================================================
BUG: KMSAN: kernel-infoleak in copyout lib/iov_iter.c:143 [inline]
BUG: KMSAN: kernel-infoleak in _copy_to_iter+0x4c0/0x2700 lib/iov_iter.c:576
CPU: 0 PID: 6697 Comm: syz-executor310 Not tainted 4.20.0-rc3+ #95
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+0x32d/0x480 lib/dump_stack.c:113
 kmsan_report+0x12c/0x290 mm/kmsan/kmsan.c:683
 kmsan_internal_check_memory+0x32a/0xa50 mm/kmsan/kmsan.c:743
 kmsan_copy_to_user+0x78/0xd0 mm/kmsan/kmsan_hooks.c:634
 copyout lib/iov_iter.c:143 [inline]
 _copy_to_iter+0x4c0/0x2700 lib/iov_iter.c:576
 copy_to_iter include/linux/uio.h:143 [inline]
 skb_copy_datagram_iter+0x4e2/0x1070 net/core/datagram.c:431
 skb_copy_datagram_msg include/linux/skbuff.h:3316 [inline]
 netlink_recvmsg+0x6f9/0x19d0 net/netlink/af_netlink.c:1975
 sock_recvmsg_nosec net/socket.c:794 [inline]
 sock_recvmsg+0x1d1/0x230 net/socket.c:801
 ___sys_recvmsg+0x444/0xae0 net/socket.c:2278
 __sys_recvmsg net/socket.c:2327 [inline]
 __do_sys_recvmsg net/socket.c:2337 [inline]
 __se_sys_recvmsg+0x2fa/0x450 net/socket.c:2334
 __x64_sys_recvmsg+0x4a/0x70 net/socket.c:2334
 do_syscall_64+0xcf/0x110 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x441119
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db 0a fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffc7f008a8 EFLAGS: 00000207 ORIG_RAX: 000000000000002f
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000441119
RDX: 0000000000000040 RSI: 00000000200005c0 RDI: 0000000000000003
RBP: 00000000006cc018 R08: 0000000000000100 R09: 0000000000000100
R10: 0000000000000100 R11: 0000000000000207 R12: 0000000000402080
R13: 0000000000402110 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:246 [inline]
 kmsan_save_stack mm/kmsan/kmsan.c:261 [inline]
 kmsan_internal_chain_origin+0x13d/0x240 mm/kmsan/kmsan.c:469
 kmsan_memcpy_memmove_metadata+0x1a9/0xf70 mm/kmsan/kmsan.c:344
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:362
 __msan_memcpy+0x61/0x70 mm/kmsan/kmsan_instr.c:162
 __nla_put lib/nlattr.c:744 [inline]
 nla_put+0x20a/0x2d0 lib/nlattr.c:802
 nlmsg_populate_fdb_fill+0x444/0x810 net/core/rtnetlink.c:3466
 nlmsg_populate_fdb net/core/rtnetlink.c:3775 [inline]
 ndo_dflt_fdb_dump+0x73a/0x960 net/core/rtnetlink.c:3807
 rtnl_fdb_dump+0x1318/0x1cb0 net/core/rtnetlink.c:3979
 netlink_dump+0xc79/0x1c90 net/netlink/af_netlink.c:2244
 __netlink_dump_start+0x10c4/0x11d0 net/netlink/af_netlink.c:2352
 netlink_dump_start include/linux/netlink.h:216 [inline]
 rtnetlink_rcv_msg+0x141b/0x1540 net/core/rtnetlink.c:4910
 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2477
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4965
 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
 netlink_unicast+0x1699/0x1740 net/netlink/af_netlink.c:1336
 netlink_sendmsg+0x13c7/0x1440 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:621 [inline]
 sock_sendmsg net/socket.c:631 [inline]
 ___sys_sendmsg+0xe3b/0x1240 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+0xcf/0x110 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:246 [inline]
 kmsan_internal_poison_shadow+0x6d/0x130 mm/kmsan/kmsan.c:170
 kmsan_kmalloc+0xa1/0x100 mm/kmsan/kmsan_hooks.c:186
 __kmalloc+0x14c/0x4d0 mm/slub.c:3825
 kmalloc include/linux/slab.h:551 [inline]
 __hw_addr_create_ex net/core/dev_addr_lists.c:34 [inline]
 __hw_addr_add_ex net/core/dev_addr_lists.c:80 [inline]
 __dev_mc_add+0x357/0x8a0 net/core/dev_addr_lists.c:670
 dev_mc_add+0x6d/0x80 net/core/dev_addr_lists.c:687
 ip_mc_filter_add net/ipv4/igmp.c:1128 [inline]
 igmp_group_added+0x4d4/0xb80 net/ipv4/igmp.c:1311
 __ip_mc_inc_group+0xea9/0xf70 net/ipv4/igmp.c:1444
 ip_mc_inc_group net/ipv4/igmp.c:1453 [inline]
 ip_mc_up+0x1c3/0x400 net/ipv4/igmp.c:1775
 inetdev_event+0x1d03/0x1d80 net/ipv4/devinet.c:1522
 notifier_call_chain kernel/notifier.c:93 [inline]
 __raw_notifier_call_chain kernel/notifier.c:394 [inline]
 raw_notifier_call_chain+0x13d/0x240 kernel/notifier.c:401
 __dev_notify_flags+0x3da/0x860 net/core/dev.c:1733
 dev_change_flags+0x1ac/0x230 net/core/dev.c:7569
 do_setlink+0x165f/0x5ea0 net/core/rtnetlink.c:2492
 rtnl_newlink+0x2ad7/0x35a0 net/core/rtnetlink.c:3111
 rtnetlink_rcv_msg+0x1148/0x1540 net/core/rtnetlink.c:4947
 netlink_rcv_skb+0x394/0x640 net/netlink/af_netlink.c:2477
 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:4965
 netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
 netlink_unicast+0x1699/0x1740 net/netlink/af_netlink.c:1336
 netlink_sendmsg+0x13c7/0x1440 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:621 [inline]
 sock_sendmsg net/socket.c:631 [inline]
 ___sys_sendmsg+0xe3b/0x1240 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+0xcf/0x110 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7

Bytes 36-37 of 105 are uninitialized
Memory access of size 105 starts at ffff88819686c000
Data copied to user address 0000000020000380
==================================================================

Crashes (56):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kmsan-gce 2018/11/28 20:04 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report syz C
ci-upstream-kmsan-gce 2018/11/28 14:42 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report syz
ci-upstream-kmsan-gce 2018/12/03 18:05 https://github.com/google/kmsan.git master 1d3abf0f2b29 819002b0 .config console log report
ci-upstream-kmsan-gce 2018/12/03 13:13 https://github.com/google/kmsan.git master 1d3abf0f2b29 819002b0 .config console log report
ci-upstream-kmsan-gce 2018/12/03 06:56 https://github.com/google/kmsan.git master 9fbf73b8d4af 7dcaeaf3 .config console log report
ci-upstream-kmsan-gce 2018/12/03 01:59 https://github.com/google/kmsan.git master 9fbf73b8d4af 7dcaeaf3 .config console log report
ci-upstream-kmsan-gce 2018/12/02 15:57 https://github.com/google/kmsan.git master 9fbf73b8d4af e0d8c853 .config console log report
ci-upstream-kmsan-gce 2018/12/02 07:20 https://github.com/google/kmsan.git master 9fbf73b8d4af 5a581673 .config console log report
ci-upstream-kmsan-gce 2018/12/02 04:36 https://github.com/google/kmsan.git master 9fbf73b8d4af 5a581673 .config console log report
ci-upstream-kmsan-gce 2018/12/02 01:13 https://github.com/google/kmsan.git master 9fbf73b8d4af 5a581673 .config console log report
ci-upstream-kmsan-gce 2018/12/01 13:06 https://github.com/google/kmsan.git master 9fbf73b8d4af d8988561 .config console log report
ci-upstream-kmsan-gce 2018/12/01 06:11 https://github.com/google/kmsan.git master 9fbf73b8d4af d8988561 .config console log report
ci-upstream-kmsan-gce 2018/11/30 20:20 https://github.com/google/kmsan.git master 3a68698849b6 ade12e91 .config console log report
ci-upstream-kmsan-gce 2018/11/30 18:32 https://github.com/google/kmsan.git master 3a68698849b6 ade12e91 .config console log report
ci-upstream-kmsan-gce 2018/11/30 07:26 https://github.com/google/kmsan.git master c1c8fce47960 66071e27 .config console log report
ci-upstream-kmsan-gce 2018/11/30 00:14 https://github.com/google/kmsan.git master c1c8fce47960 66071e27 .config console log report
ci-upstream-kmsan-gce 2018/11/29 23:31 https://github.com/google/kmsan.git master c1c8fce47960 66071e27 .config console log report
ci-upstream-kmsan-gce 2018/11/29 13:37 https://github.com/google/kmsan.git master a311076453fe 4b6d14f2 .config console log report
ci-upstream-kmsan-gce 2018/11/28 11:38 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report
ci-upstream-kmsan-gce 2018/11/28 07:37 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report
ci-upstream-kmsan-gce 2018/11/27 18:00 https://github.com/google/kmsan.git master fffec98ae2a6 4b6d14f2 .config console log report
ci-upstream-kmsan-gce 2018/11/27 12:15 https://github.com/google/kmsan.git master fffec98ae2a6 ac912200 .config console log report
ci-upstream-kmsan-gce 2018/11/27 00:25 https://github.com/google/kmsan.git master fffec98ae2a6 ac912200 .config console log report
ci-upstream-kmsan-gce 2018/11/27 00:03 https://github.com/google/kmsan.git master fffec98ae2a6 ac912200 .config console log report
ci-upstream-kmsan-gce 2018/11/26 15:12 https://github.com/google/kmsan.git master fffec98ae2a6 ac912200 .config console log report
ci-upstream-kmsan-gce 2018/11/26 06:27 https://github.com/google/kmsan.git master fffec98ae2a6 3d3ec907 .config console log report
ci-upstream-kmsan-gce 2018/11/25 11:46 https://github.com/google/kmsan.git master fffec98ae2a6 3d3ec907 .config console log report
ci-upstream-kmsan-gce 2018/11/25 00:07 https://github.com/google/kmsan.git master fffec98ae2a6 ecc7c870 .config console log report
ci-upstream-kmsan-gce 2018/11/24 23:13 https://github.com/google/kmsan.git master fffec98ae2a6 ecc7c870 .config console log report
ci-upstream-kmsan-gce 2018/11/24 17:49 https://github.com/google/kmsan.git master fffec98ae2a6 ecc7c870 .config console log report
ci-upstream-kmsan-gce 2018/11/24 06:51 https://github.com/google/kmsan.git master fffec98ae2a6 eb9ed731 .config console log report
ci-upstream-kmsan-gce 2018/11/24 06:00 https://github.com/google/kmsan.git master fffec98ae2a6 eb9ed731 .config console log report
ci-upstream-kmsan-gce 2018/11/23 15:41 https://github.com/google/kmsan.git master f97a6c2987cc 2b0dc848 .config console log report
ci-upstream-kmsan-gce 2018/11/23 11:49 https://github.com/google/kmsan.git master 50031178f793 2b0dc848 .config console log report
ci-upstream-kmsan-gce 2018/11/23 06:54 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:48 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:43 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:39 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:34 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:21 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 21:12 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 20:49 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 20:40 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 20:18 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 20:18 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 20:08 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 19:52 https://github.com/google/kmsan.git master 50031178f793 87815d9d .config console log report
ci-upstream-kmsan-gce 2018/11/22 19:30 https://github.com/google/kmsan.git master 50031178f793 2ee77802 .config console log report
ci-upstream-kmsan-gce 2018/11/22 19:14 https://github.com/google/kmsan.git master 50031178f793 2ee77802 .config console log report
ci-upstream-kmsan-gce 2018/11/22 18:47 https://github.com/google/kmsan.git master 50031178f793 2ee77802 .config console log report
ci-upstream-kmsan-gce 2018/11/22 18:27 https://github.com/google/kmsan.git master 50031178f793 2ee77802 .config console log report
ci-upstream-kmsan-gce 2018/11/22 18:26 https://github.com/google/kmsan.git master 50031178f793 2ee77802 .config console log report
ci-upstream-kmsan-gce 2018/11/06 22:27 https://github.com/google/kmsan.git master 7438a3b20295 8bd6bd63 .config console log report
* Struck through repros no longer work on HEAD.