Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 8628) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead ================================================================== BUG: KASAN: use-after-free in sctp_association_free+0x7b7/0x930 net/sctp/associola.c:332 Read of size 8 at addr ffff880199b54de0 by task syz-executor3/8628 CPU: 1 PID: 8628 Comm: syz-executor3 Not tainted 4.14.0-rc7-next-20171102+ #37 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:16 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:52 print_address_description+0x73/0x250 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 sctp_association_free+0x7b7/0x930 net/sctp/associola.c:332 sctp_sendmsg+0x1845/0x32c0 net/sctp/socket.c:2049 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 SYSC_sendto+0x358/0x5a0 net/socket.c:1749 SyS_sendto+0x40/0x50 net/socket.c:1717 entry_SYSCALL_64_fastpath+0x1f/0xbe RIP: 0033:0x452869 RSP: 002b:00007fae9815fbe8 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000758190 RCX: 0000000000452869 RDX: 0000000000000002 RSI: 0000000020925000 RDI: 0000000000000016 RBP: 0000000000000086 R08: 00000000209e1000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006ee1a8 R13: 00000000ffffffff R14: 00007fae981606d4 R15: 0000000000000019 Allocated by task 8628: 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:551 kmem_cache_alloc_trace+0x136/0x750 mm/slab.c:3614 kmalloc include/linux/slab.h:499 [inline] kzalloc include/linux/slab.h:688 [inline] sctp_association_new+0x114/0x2200 net/sctp/associola.c:308 sctp_sendmsg+0x1c89/0x32c0 net/sctp/socket.c:1869 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 SYSC_sendto+0x358/0x5a0 net/socket.c:1749 SyS_sendto+0x40/0x50 net/socket.c:1717 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 8628: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3492 [inline] kfree+0xca/0x250 mm/slab.c:3807 sctp_association_destroy net/sctp/associola.c:434 [inline] sctp_association_put+0x21c/0x2f0 net/sctp/associola.c:883 sctp_wait_for_sndbuf+0x5e3/0x7c0 net/sctp/socket.c:8033 sctp_sendmsg+0x2906/0x32c0 net/sctp/socket.c:1973 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:632 [inline] sock_sendmsg+0xca/0x110 net/socket.c:642 SYSC_sendto+0x358/0x5a0 net/socket.c:1749 SyS_sendto+0x40/0x50 net/socket.c:1717 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff880199b54dc0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 32 bytes inside of 4096-byte region [ffff880199b54dc0, ffff880199b55dc0) The buggy address belongs to the page: page:ffffea000666d500 count:1 mapcount:0 mapping:ffff880199b54dc0 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff880199b54dc0 0000000000000000 0000000100000001 raw: ffffea000665db20 ffffea0007236220 ffff8801dac00dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff880199b54c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff880199b54d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff880199b54d80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff880199b54e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff880199b54e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================