================================================================== audit: type=1400 audit(1520674974.064:284): avc: denied { create } for pid=15206 comm="syz-executor5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 BUG: KASAN: use-after-free in list_empty include/linux/list.h:189 [inline] BUG: KASAN: use-after-free in sg_remove_request+0xf9/0x110 drivers/scsi/sg.c:2120 Read of size 8 at addr ffff8800ae6bd440 by task syz-executor2/15223 CPU: 0 PID: 15223 Comm: syz-executor2 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 863dcc453b6ae671 ffff8800a7157ab0 ffffffff81d0408d ffffea0002b9af40 ffff8800ae6bd440 0000000000000000 ffff8800ae6bd440 ffff8801d6a5a338 ffff8800a7157ae8 ffffffff814fe143 ffff8800ae6bd440 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] list_empty include/linux/list.h:189 [inline] [] sg_remove_request+0xf9/0x110 drivers/scsi/sg.c:2120 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1837 [] sg_read+0xa1b/0x1490 drivers/scsi/sg.c:537 [] __vfs_read+0x103/0x440 fs/read_write.c:432 [] vfs_read+0x123/0x3a0 fs/read_write.c:454 [] SYSC_read fs/read_write.c:569 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:562 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Allocated by task 7493: [] 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+0xad/0xe0 mm/kasan/kasan.c:616 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xba/0x290 mm/slub.c:2628 [] fasync_alloc+0x1a/0x20 fs/fcntl.c:607 [] do_fcntl_add_lease fs/locks.c:1824 [inline] [] fcntl_setlease+0xcb/0x220 fs/locks.c:1853 [] do_fcntl fs/fcntl.c:328 [inline] [] SYSC_fcntl fs/fcntl.c:375 [inline] [] SyS_fcntl+0x6e7/0xc40 fs/fcntl.c:360 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Freed by task 7493: [] 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] [] kmem_cache_free+0xc7/0x320 mm/slub.c:2881 [] fasync_free+0x1c/0x20 fs/fcntl.c:617 [] do_fcntl_add_lease fs/locks.c:1835 [inline] [] fcntl_setlease+0x168/0x220 fs/locks.c:1853 [] do_fcntl fs/fcntl.c:328 [inline] [] SYSC_fcntl fs/fcntl.c:375 [inline] [] SyS_fcntl+0x6e7/0xc40 fs/fcntl.c:360 [] entry_SYSCALL_64_fastpath+0x1c/0x98 The buggy address belongs to the object at ffff8800ae6bd400 which belongs to the cache fasync_cache of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff8800ae6bd400, ffff8800ae6bd460) 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: 1 PID: 3843 Comm: syz-executor2 Not tainted 4.4.120-gd63fdf6 #28 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800ba9c3000 task.stack: ffff8801d7060000 RIP: 0010:[] [] task_curr kernel/sched/core.c:1023 [inline] RIP: 0010:[] [] kick_process+0xdd/0x1c0 kernel/sched/core.c:1565 RSP: 0018:ffff8801d7067b88 EFLAGS: 00010002 RAX: dffffc0000000000 RBX: 000000000001f4c0 RCX: ffffffff81d63e4b RDX: 0000000097a4d780 RSI: ffffffff839fe520 RDI: 00000004bd26bc00 RBP: ffff8801d7067ba8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003ae0cf2a R12: ffff8801d6d2c800 R13: 00000000a7150050 R14: 00000000a7150050 R15: ffff8800bb0805c0 FS: 0000000002a3c940(0063) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000072c000 CR3: 00000001d3362000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801d6d2c800 0000000000000080 dffffc0000000000 ffff8800b57b0000 ffff8801d7067bc8 ffffffff81153bd5 ffff8801d6d2c800 ffff8800b688e000 ffff8801d7067c20 ffffffff811541d6 ffff8801c7464800 ffffffff8115574b Call Trace: [] signal_wake_up_state+0x55/0x70 kernel/signal.c:660 [] signal_wake_up include/linux/sched.h:3319 [inline] [] complete_signal+0x5b6/0x700 kernel/signal.c:942 [] __send_signal+0x90f/0x1330 kernel/signal.c:1080 [] send_signal+0x4a/0xc0 kernel/signal.c:1096 [] do_send_sig_info+0xa4/0x130 kernel/signal.c:1151 [] group_send_sig_info+0xdd/0x170 kernel/signal.c:1273 [] __kill_pgrp_info+0x90/0x120 kernel/signal.c:1291 [] kill_something_info kernel/signal.c:1397 [inline] [] SYSC_kill+0x366/0x5b0 kernel/signal.c:2867 [] SyS_kill+0x1c/0x30 kernel/signal.c:2857 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Code: 04 02 84 c0 74 08 3c 03 0f 8e b7 00 00 00 48 b8 00 00 00 00 00 fc ff df 45 8b 6d 10 4a 8d 3c ed 80 b9 7e 84 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 be 00 00 00 4a 03 1c ed 80 b9 7e 84 48 b8 00 RIP [] task_curr kernel/sched/core.c:1023 [inline] RIP [] kick_process+0xdd/0x1c0 kernel/sched/core.c:1565 RSP ---[ end trace 39ef0932aa302cb7 ]---