================================================================== BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x254/0x2c0 kernel/locking/spinlock_debug.c:135 Read of size 4 at addr ffff8801ca87146c by task syz-executor1/26500 CPU: 1 PID: 26500 Comm: syz-executor1 Not tainted 4.4.147-ga5fc665 #80 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 25796c2c6ac0bff4 ffff8800a5927a70 ffffffff81e12a4d ffffea00072a1c40 ffff8801ca87146c 0000000000000000 ffff8801ca87146c ffff8801d35c1838 ffff8800a5927aa8 ffffffff81517fd6 ffff8801ca87146c Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x6c/0x216 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report.cold.7+0x175/0x2f7 mm/kasan/report.c:408 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] [] do_raw_spin_lock+0x254/0x2c0 kernel/locking/spinlock_debug.c:135 [] __raw_spin_lock include/linux/spinlock_api_smp.h:145 [inline] [] _raw_spin_lock+0x3e/0x50 kernel/locking/spinlock.c:151 [] spin_lock include/linux/spinlock.h:302 [inline] [] inode_free_security security/selinux/hooks.c:269 [inline] [] selinux_inode_free_security+0xcb/0x1c0 security/selinux/hooks.c:2718 [] security_inode_free+0x56/0x90 security/security.c:354 [] __destroy_inode+0x2e/0x280 fs/inode.c:226 [] destroy_inode+0x4b/0x120 fs/inode.c:253 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. [] evict+0x322/0x4f0 fs/inode.c:559 [] iput_final fs/inode.c:1477 [inline] [] iput+0x391/0x980 fs/inode.c:1504 [] fsnotify_detach_mark+0x251/0x2f0 fs/notify/mark.c:166 [] fsnotify_clear_marks_by_group_flags+0x1ca/0x290 fs/notify/mark.c:457 [] fsnotify_clear_marks_by_group+0x1a/0x20 fs/notify/mark.c:469 [] fsnotify_destroy_group+0x64/0x120 fs/notify/group.c:70 [] inotify_release+0x37/0x50 fs/notify/inotify/inotify_user.c:282 [] __fput+0x235/0x6f0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:253 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:349 [] int_ret_from_sys_call+0x25/0xa3 Allocated by task 26480: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:616 [] kmem_cache_alloc_trace+0x104/0x2c0 mm/slub.c:2642 [] kmalloc include/linux/slab.h:476 [inline] [] kzalloc include/linux/slab.h:620 [inline] [] superblock_alloc_security security/selinux/hooks.c:313 [inline] [] selinux_sb_alloc_security+0x49/0x210 security/selinux/hooks.c:2475 [] security_sb_alloc+0x73/0xb0 security/security.c:271 [] alloc_super fs/super.c:192 [inline] [] sget+0xf9/0x970 fs/super.c:481 [] mount_nodev+0x37/0x100 fs/super.c:1081 [] ramfs_mount+0x2c/0x40 fs/ramfs/inode.c:242 [] mount_fs+0x28c/0x370 fs/super.c:1146 [] vfs_kern_mount.part.30+0xd1/0x3d0 fs/namespace.c:991 [] vfs_kern_mount fs/namespace.c:973 [inline] [] do_new_mount fs/namespace.c:2517 [inline] [] do_mount+0x4ee/0x2860 fs/namespace.c:2833 [] SYSC_mount fs/namespace.c:3027 [inline] [] SyS_mount+0x130/0x1d0 fs/namespace.c:3005 [] entry_SYSCALL_64_fastpath+0x22/0x9e Freed by task 26480: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xf4/0x310 mm/slub.c:3749 [] superblock_free_security security/selinux/hooks.c:333 [inline] [] selinux_sb_free_security+0x42/0x50 security/selinux/hooks.c:2480 [] security_sb_free+0x4e/0x90 security/security.c:276 [] destroy_super+0x36/0x110 fs/super.c:166 [] __put_super.part.7+0x56/0x70 fs/super.c:265 [] __put_super fs/super.c:281 [inline] [] put_super+0x6f/0x80 fs/super.c:279 [] deactivate_locked_super+0xb5/0xd0 fs/super.c:312 [] deactivate_super+0x91/0xd0 fs/super.c:332 [] cleanup_mnt+0xb2/0x160 fs/namespace.c:1119 [] __cleanup_mnt+0x16/0x20 fs/namespace.c:1126 [] task_work_run+0x10f/0x190 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:253 [] prepare_exit_to_usermode arch/x86/entry/common.c:284 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:349 [] int_ret_from_sys_call+0x25/0xa3 The buggy address belongs to the object at ffff8801ca8713c0 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 172 bytes inside of 256-byte region [ffff8801ca8713c0, ffff8801ca8714c0) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 26478 Comm: syz-executor1 Not tainted 4.4.147-ga5fc665 #80 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800a5e20000 task.stack: ffff8800b6838000 RIP: 0010:[] [] task_curr kernel/sched/core.c:1025 [inline] RIP: 0010:[] [] kick_process+0xdd/0x1c0 kernel/sched/core.c:1567 RSP: 0018:ffff8800b683fe78 EFLAGS: 00010002 RAX: dffffc0000000000 RBX: 000000000001f540 RCX: 0000000000000000 RDX: 0000000096262d10 RSI: ffffffff81e7257b RDI: 00000004b1316880 RBP: ffff8800b683fe98 R08: ffffffff85340730 R09: 0000000000000001 R10: 0000000000000000 R11: ffff8800a5e20000 R12: ffff8800a4c94800 R13: 00000000a5920050 R14: 00000000a5920050 R15: ffff8800a5e20000 FS: 0000000000bd5940(0063) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffafcf69c20 CR3: 00000000b08d6000 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8800a4c94800 0000000000000080 dffffc0000000000 0000000000000002 ffff8800b683feb8 ffffffff81157cdf ffff8800a4c94800 ffff8800a4c94df0 ffff8800b683fef0 ffffffff8115c753 0000000000000b00 ffff8801ba913f40 Call Trace: [] signal_wake_up_state+0x5f/0x70 kernel/signal.c:660 [] signal_wake_up include/linux/sched.h:3332 [inline] [] zap_other_threads+0x123/0x170 kernel/signal.c:1213 [] do_group_exit+0x26c/0x330 kernel/exit.c:880 [] SYSC_exit_group kernel/exit.c:896 [inline] [] SyS_exit_group+0x1d/0x20 kernel/exit.c:894 [] entry_SYSCALL_64_fastpath+0x22/0x9e Code: 04 02 84 c0 74 08 3c 03 0f 8e b4 00 00 00 48 b8 00 00 00 00 00 fc ff df 45 8b 6d 10 4a 8d 3c ed 00 66 a1 84 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ae 00 00 00 4a 03 1c ed 00 66 a1 84 48 b8 00 RIP [] task_curr kernel/sched/core.c:1025 [inline] RIP [] kick_process+0xdd/0x1c0 kernel/sched/core.c:1567 RSP ---[ end trace e2d9c9b6a928c31f ]---