syzbot


KMSAN: use-after-free in rxrpc_send_keepalive
Status: upstream: reported syz repro on 2019/11/08 17:04
Reported-by: syzbot+2e7168a4d3c4ec071fdc@syzkaller.appspotmail.com
First crash: 958d, last: 958d
duplicates (4):
Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
KMSAN: uninit-value in kernel_sendmsg 3 962d 929d 0/22 closed as dup on 2019/11/11 08:14
WARNING in aa_sock_msg_perm (2) C 59 454d 925d 0/22 closed as dup on 2019/11/12 21:01
general protection fault in selinux_socket_sendmsg (2) C 183 441d 912d 0/22 closed as dup on 2019/11/25 22:04
general protection fault in smack_socket_sendmsg (2) C done 1 912d 909d 0/22 closed as dup on 2019/11/29 09:40

Sample crash report:
=====================================================
BUG: KMSAN: use-after-free in rxrpc_peer_keepalive_dispatch net/rxrpc/peer_event.c:369 [inline]
BUG: KMSAN: use-after-free in rxrpc_peer_keepalive_worker+0xb82/0x1510 net/rxrpc/peer_event.c:430
CPU: 1 PID: 3995 Comm: kworker/1:2 Not tainted 5.4.0-rc2+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: krxrpcd rxrpc_peer_keepalive_worker
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x153/0x2c0 mm/kmsan/kmsan_report.c:113
 __msan_warning+0x73/0xe0 mm/kmsan/kmsan_instr.c:250
 rxrpc_send_keepalive+0x53c/0x830 net/rxrpc/output.c:634
 rxrpc_peer_keepalive_dispatch net/rxrpc/peer_event.c:369 [inline]
 rxrpc_peer_keepalive_worker+0xb82/0x1510 net/rxrpc/peer_event.c:430
 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:154 [inline]
 kmsan_internal_poison_shadow+0x60/0x120 mm/kmsan/kmsan.c:137
 kmsan_slab_free+0x8d/0x100 mm/kmsan/kmsan_hooks.c:123
 slab_free_freelist_hook mm/slub.c:1473 [inline]
 slab_free mm/slub.c:3040 [inline]
 kfree+0x4c1/0x2db0 mm/slub.c:3982
 rxrpc_local_rcu+0x7a/0xe0 net/rxrpc/local_object.c:499
 __rcu_reclaim kernel/rcu/rcu.h:222 [inline]
 rcu_do_batch kernel/rcu/tree.c:2157 [inline]
 rcu_core+0xc99/0x1b10 kernel/rcu/tree.c:2377
 rcu_core_si+0xe/0x10 kernel/rcu/tree.c:2386
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x230/0x280 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1139
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:837
 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
 arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
 kmsan_slab_free+0xac/0x100 mm/kmsan/kmsan_hooks.c:127
 slab_free_freelist_hook mm/slub.c:1473 [inline]
 slab_free mm/slub.c:3040 [inline]
 kmem_cache_free+0x2d1/0x2b70 mm/slub.c:3056
 anon_vma_chain_free mm/rmap.c:134 [inline]
 unlink_anon_vmas+0x3c1/0xb70 mm/rmap.c:401
 free_pgtables+0x2e2/0x6a0 mm/memory.c:396
 exit_mmap+0x53f/0xa00 mm/mmap.c:3162
 __mmput+0x148/0x590 kernel/fork.c:1081
 mmput+0x83/0x90 kernel/fork.c:1102
 exec_mmap fs/exec.c:1048 [inline]
 flush_old_exec+0xfaf/0x2180 fs/exec.c:1281
 load_elf_binary+0x1121/0x5f10 fs/binfmt_elf.c:847
 search_binary_handler+0x2f4/0xac0 fs/exec.c:1659
 exec_binprm fs/exec.c:1702 [inline]
 __do_execve_file+0x2218/0x2e90 fs/exec.c:1822
 do_execveat_common fs/exec.c:1868 [inline]
 do_execve fs/exec.c:1885 [inline]
 __do_sys_execve fs/exec.c:1961 [inline]
 __se_sys_execve+0xec/0x110 fs/exec.c:1956
 __x64_sys_execve+0x4a/0x70 fs/exec.c:1956
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
=====================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2019/10/11 11:44 https://github.com/google/kmsan.git master c38191cb7026 1a3bad90 .config log report syz
ci-upstream-kmsan-gce 2019/10/11 03:22 https://github.com/google/kmsan.git master c38191cb7026 1a3bad90 .config log report