syzbot


KMSAN: uninit-value in selinux_netlink_send

Status: closed as invalid on 2020/07/22 14:02
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 799d, last: 794d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in selinux_netlink_send (2) 11 794d 794d 0/24 closed as invalid on 2020/07/27 08:13

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in selinux_netlink_send+0x413/0xba0 security/selinux/hooks.c:5861
CPU: 0 PID: 8463 Comm: syz-executor023 Not tainted 5.8.0-rc5-syzkaller #0
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+0x1df/0x240 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
 selinux_netlink_send+0x413/0xba0 security/selinux/hooks.c:5861
 security_netlink_send+0xef/0x1e0 security/security.c:1989
 netlink_sendmsg+0x1008/0x14d0 net/netlink/af_netlink.c:1908
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x433/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_compat_sys_sendfile fs/read_write.c:1622 [inline]
 __se_compat_sys_sendfile+0x301/0x3c0 fs/read_write.c:1605
 __ia32_compat_sys_sendfile+0x56/0x70 fs/read_write.c:1605
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2aa/0x400 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
RIP: 0023:0xf7fc5549
Code: Bad RIP value.
RSP: 002b:00000000ffd24adc EFLAGS: 00000296 ORIG_RAX: 00000000000000bb
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000000003
RDX: 0000000000000000 RSI: 00000000000009af RDI: 0000000000000010
RBP: 0000000000080803 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267
 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116
 _copy_from_iter_full+0xbfe/0x13b0 lib/iov_iter.c:793
 copy_from_iter_full include/linux/uio.h:156 [inline]
 memcpy_from_msg include/linux/skbuff.h:3566 [inline]
 netlink_sendmsg+0xfaa/0x14d0 net/netlink/af_netlink.c:1903
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg net/socket.c:672 [inline]
 kernel_sendmsg+0x433/0x440 net/socket.c:692
 sock_no_sendpage+0x235/0x300 net/core/sock.c:2853
 kernel_sendpage net/socket.c:3642 [inline]
 sock_sendpage+0x1e1/0x2c0 net/socket.c:945
 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:448
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x565/0xf00 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:834
 do_splice_from fs/splice.c:846 [inline]
 direct_splice_actor+0x1fd/0x580 fs/splice.c:1016
 splice_direct_to_actor+0x6b2/0xf50 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_compat_sys_sendfile fs/read_write.c:1622 [inline]
 __se_compat_sys_sendfile+0x301/0x3c0 fs/read_write.c:1605
 __ia32_compat_sys_sendfile+0x56/0x70 fs/read_write.c:1605
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2aa/0x400 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c

Uninit was created at:
 kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144
 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:269 [inline]
 kmsan_alloc_page+0xb9/0x180 mm/kmsan/kmsan_shadow.c:293
 __alloc_pages_nodemask+0x56a2/0x5dc0 mm/page_alloc.c:4889
 alloc_pages_current+0x672/0x990 mm/mempolicy.c:2292
 alloc_pages include/linux/gfp.h:545 [inline]
 push_pipe+0x605/0xb70 lib/iov_iter.c:537
 __pipe_get_pages lib/iov_iter.c:1278 [inline]
 pipe_get_pages_alloc lib/iov_iter.c:1385 [inline]
 iov_iter_get_pages_alloc+0x18a9/0x21c0 lib/iov_iter.c:1403
 default_file_splice_read fs/splice.c:385 [inline]
 do_splice_to+0x4fc/0x14f0 fs/splice.c:871
 splice_direct_to_actor+0x45c/0xf50 fs/splice.c:950
 do_splice_direct+0x342/0x580 fs/splice.c:1059
 do_sendfile+0x101b/0x1d40 fs/read_write.c:1540
 __do_compat_sys_sendfile fs/read_write.c:1622 [inline]
 __se_compat_sys_sendfile+0x301/0x3c0 fs/read_write.c:1605
 __ia32_compat_sys_sendfile+0x56/0x70 fs/read_write.c:1605
 do_syscall_32_irqs_on arch/x86/entry/common.c:430 [inline]
 __do_fast_syscall_32+0x2aa/0x400 arch/x86/entry/common.c:477
 do_fast_syscall_32+0x6b/0xd0 arch/x86/entry/common.c:505
 do_SYSENTER_32+0x73/0x90 arch/x86/entry/common.c:554
 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
=====================================================

Crashes (448):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce-386 2020/07/21 12:27 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report syz C
ci-upstream-kmsan-gce-386 2020/07/22 13:32 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config log report
ci-upstream-kmsan-gce-386 2020/07/22 13:23 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config log report
ci-upstream-kmsan-gce-386 2020/07/22 12:21 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config log report
ci-upstream-kmsan-gce-386 2020/07/22 09:30 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config log report
ci-upstream-kmsan-gce-386 2020/07/22 05:45 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 05:30 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 04:29 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 03:12 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 02:14 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 01:12 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/22 00:24 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/21 22:16 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/21 20:43 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/21 19:41 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/21 18:59 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config log report
ci-upstream-kmsan-gce-386 2020/07/21 16:05 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 14:10 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 12:58 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 10:21 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 08:28 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 07:15 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 07:03 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 05:57 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 01:54 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/21 00:17 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 23:51 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 22:39 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 20:44 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 19:54 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 18:42 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 17:33 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 16:28 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 15:36 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 11:32 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 08:31 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 05:44 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 04:20 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 03:02 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/20 01:01 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/19 23:19 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/19 22:16 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
ci-upstream-kmsan-gce-386 2020/07/17 18:01 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config log report
* Struck through repros no longer work on HEAD.