sg_write: data in/out 524252/4112 bytes for SCSI command 0x0-- guessing data in; program syz-executor1 not setting count and/or reply_len properly ========================= WARNING: held lock freed! 4.15.0-rc7-mm1+ #56 Not tainted ------------------------- syz-executor3/12718 is freeing memory 00000000a5717335-000000006b152290, with a lock still held there! (sk_lock-AF_INET6){+.+.}, at: [<0000000086883166>] lock_sock include/net/sock.h:1465 [inline] (sk_lock-AF_INET6){+.+.}, at: [<0000000086883166>] sctp_wait_for_sndbuf+0x509/0x8d0 net/sctp/socket.c:8161 1 lock held by syz-executor3/12718: #0: (sk_lock-AF_INET6){+.+.}, at: [<0000000086883166>] lock_sock include/net/sock.h:1465 [inline] #0: (sk_lock-AF_INET6){+.+.}, at: [<0000000086883166>] sctp_wait_for_sndbuf+0x509/0x8d0 net/sctp/socket.c:8161 stack backtrace: CPU: 0 PID: 12718 Comm: syz-executor3 Not tainted 4.15.0-rc7-mm1+ #56 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_freed_lock_bug kernel/locking/lockdep.c:4379 [inline] debug_check_no_locks_freed+0x32f/0x3c0 kernel/locking/lockdep.c:4412 kmem_cache_free+0x68/0x2b0 mm/slab.c:3740 sk_prot_free net/core/sock.c:1506 [inline] __sk_destruct+0x622/0x910 net/core/sock.c:1590 sk_destruct+0x47/0x80 net/core/sock.c:1598 __sk_free+0xf1/0x2b0 net/core/sock.c:1609 sk_free+0x2a/0x40 net/core/sock.c:1620 sock_put include/net/sock.h:1660 [inline] sctp_association_destroy net/sctp/associola.c:424 [inline] sctp_association_put+0x14c/0x2f0 net/sctp/associola.c:883 sctp_wait_for_sndbuf+0x673/0x8d0 net/sctp/socket.c:8172 sctp_sendmsg+0x28f7/0x33f0 net/sctp/socket.c:1991 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1721 SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452e99 RSP: 002b:00007fca30fbac58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fca30fbb700 RCX: 0000000000452e99 RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000013 RBP: 0000000000a2f870 R08: 00000000204d9000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f7ef R14: 00007fca30fbb9c0 R15: 0000000000000006 ================================================================== BUG: KASAN: use-after-free in perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 Read of size 8 at addr ffff8801c44ff0b8 by task syz-executor3/12718 CPU: 0 PID: 12718 Comm: syz-executor3 Not tainted 4.15.0-rc7-mm1+ #56 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23b/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 perf_trace_lock_acquire+0x5b7/0x980 include/trace/events/lock.h:13 trace_lock_acquire include/trace/events/lock.h:13 [inline] lock_acquire+0x394/0x580 kernel/locking/lockdep.c:3913 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:168 spin_lock_bh include/linux/spinlock.h:315 [inline] release_sock+0x74/0x2a0 net/core/sock.c:2787 sctp_sendmsg+0x2993/0x33f0 net/sctp/socket.c:2088 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1721 SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x452e99 RSP: 002b:00007fca30fbac58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fca30fbb700 RCX: 0000000000452e99 RDX: 0000000000000001 RSI: 000000002010bf14 RDI: 0000000000000013 RBP: 0000000000a2f870 R08: 00000000204d9000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f7ef R14: 00007fca30fbb9c0 R15: 0000000000000006 Allocated by task 12725: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3541 sk_prot_alloc+0x65/0x2a0 net/core/sock.c:1465 sk_alloc+0x105/0x1440 net/core/sock.c:1525 sctp_v6_create_accept_sk+0x15a/0x9b0 net/sctp/ipv6.c:667 sctp_accept+0x5c4/0x970 net/sctp/socket.c:4395 inet_accept+0x12c/0x930 net/ipv4/af_inet.c:699 SYSC_accept4+0x38d/0x870 net/socket.c:1545 SyS_accept4 net/socket.c:1496 [inline] SYSC_accept net/socket.c:1579 [inline] SyS_accept+0x26/0x30 net/socket.c:1576 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 12718: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kmem_cache_free+0x86/0x2b0 mm/slab.c:3743 sk_prot_free net/core/sock.c:1506 [inline] __sk_destruct+0x622/0x910 net/core/sock.c:1590 sk_destruct+0x47/0x80 net/core/sock.c:1598 __sk_free+0xf1/0x2b0 net/core/sock.c:1609 sk_free+0x2a/0x40 net/core/sock.c:1620 sock_put include/net/sock.h:1660 [inline] sctp_association_destroy net/sctp/associola.c:424 [inline] sctp_association_put+0x14c/0x2f0 net/sctp/associola.c:883 sctp_wait_for_sndbuf+0x673/0x8d0 net/sctp/socket.c:8172 sctp_sendmsg+0x28f7/0x33f0 net/sctp/socket.c:1991 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1721 SyS_sendto+0x40/0x50 net/socket.c:1689 entry_SYSCALL_64_fastpath+0x29/0xa0 The buggy address belongs to the object at ffff8801c44ff000 which belongs to the cache SCTPv6 of size 1888 The buggy address is located 184 bytes inside of 1888-byte region [ffff8801c44ff000, ffff8801c44ff760) The buggy address belongs to the page: page:ffffea0007113fc0 count:1 mapcount:0 mapping:ffff8801c44ff000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801c44ff000 0000000000000000 0000000100000002 raw: ffffea0007045a20 ffffea00072e1b60 ffff8801d2f5b9c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c44fef80: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff8801c44ff000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c44ff080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c44ff100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c44ff180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================