Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 4988) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead ================================================================== BUG: KASAN: use-after-free in strp_data_ready+0x232/0x2a0 net/strparser/strparser.c:394 Read of size 1 at addr ffff8801c10efbd0 by task syz-executor7/4998 CPU: 0 PID: 4998 Comm: syz-executor7 Not tainted 4.15.0-rc8+ #272 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:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report+0x25b/0x340 mm/kasan/report.c:409 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:427 strp_data_ready+0x232/0x2a0 net/strparser/strparser.c:394 psock_data_ready+0x56/0x70 net/kcm/kcmsock.c:353 tcp_data_queue+0x1d88/0x3de0 net/ipv4/tcp_input.c:4634 tcp_rcv_established+0x864/0x18c0 net/ipv4/tcp_input.c:5458 tcp_v4_do_rcv+0x2ab/0x7d0 net/ipv4/tcp_ipv4.c:1468 tcp_v4_rcv+0x24c6/0x2eb0 net/ipv4/tcp_ipv4.c:1745 ip_local_deliver_finish+0x2f1/0xc50 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] ip_local_deliver+0x1ce/0x6e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:466 [inline] ip_rcv_finish+0x959/0x1e30 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:250 [inline] ip_rcv+0xc5a/0x1840 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1a41/0x3460 net/core/dev.c:4473 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4538 process_backlog+0x203/0x740 net/core/dev.c:5217 napi_poll net/core/dev.c:5615 [inline] net_rx_action+0x792/0x1910 net/core/dev.c:5681 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1150 do_softirq.part.19+0x14d/0x190 kernel/softirq.c:329 do_softirq kernel/softirq.c:177 [inline] __local_bh_enable_ip+0x1ee/0x230 kernel/softirq.c:182 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:727 [inline] ip_finish_output2+0x96e/0x1560 net/ipv4/ip_output.c:231 ip_finish_output+0x864/0xd10 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip_output+0x1d2/0x860 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:460 [inline] ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124 ip_queue_xmit+0x8c6/0x18e0 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x1b1b/0x38c0 net/ipv4/tcp_output.c:1176 tcp_write_xmit+0x686/0x51d0 net/ipv4/tcp_output.c:2367 __tcp_push_pending_frames+0xa0/0x250 net/ipv4/tcp_output.c:2543 tcp_send_fin+0x1b0/0xd20 net/ipv4/tcp_output.c:3087 tcp_close+0xbe0/0xfc0 net/ipv4/tcp.c:2234 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:426 sock_release+0x8d/0x1e0 net/socket.c:602 sock_close+0x16/0x20 net/socket.c:1131 __fput+0x327/0x7e0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73f/0x16c0 kernel/signal.c:2335 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x214/0x310 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 RIP: 0033:0x452ee9 RSP: 002b:00007fb1840e7ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000071c038 RCX: 0000000000452ee9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000071c038 RBP: 000000000071c038 R08: 00000000000005ce R09: 000000000071c010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000a2f7cf R14: 00007fb1840e89c0 R15: 0000000000000001 Allocated by task 4970: 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 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544 kmem_cache_zalloc include/linux/slab.h:678 [inline] kcm_attach net/kcm/kcmsock.c:1394 [inline] kcm_attach_ioctl net/kcm/kcmsock.c:1460 [inline] kcm_ioctl+0x2d2/0x1690 net/kcm/kcmsock.c:1665 sock_do_ioctl+0x65/0xb0 net/socket.c:966 sock_ioctl+0x2c2/0x440 net/socket.c:1063 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x29/0xa0 Freed by task 4998: 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:3488 [inline] kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 kcm_unattach+0xe53/0x1510 net/kcm/kcmsock.c:1563 release_mux net/kcm/kcmsock.c:1727 [inline] kcm_done+0x5c7/0x1990 net/kcm/kcmsock.c:1787 kcm_release+0x478/0x860 net/kcm/kcmsock.c:1861 sock_release+0x8d/0x1e0 net/socket.c:602 sock_close+0x16/0x20 net/socket.c:1131 __fput+0x327/0x7e0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9bb/0x1ad0 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73f/0x16c0 kernel/signal.c:2335 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x214/0x310 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 The buggy address belongs to the object at ffff8801c10efbc0 which belongs to the cache kcm_psock_cache of size 544 The buggy address is located 16 bytes inside of 544-byte region [ffff8801c10efbc0, ffff8801c10efde0) The buggy address belongs to the page: page:ffffea0007043b80 count:1 mapcount:0 mapping:ffff8801c10ee040 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffff8801c10ee040 0000000000000000 000000010000000b raw: ffff8801d3202348 ffffea0006ff69a0 ffff8801d619a180 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c10efa80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c10efb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c10efb80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801c10efc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c10efc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================