================================================================== BUG: KASAN: use-after-free in __vunmap+0x322/0x380 mm/vmalloc.c:1535 Read of size 8 at addr ffff88019116ee90 by task syz-executor5/29021 CPU: 0 PID: 29021 Comm: syz-executor5 Not tainted 4.16.0+ #288 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+0x1a7/0x27d 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+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __vunmap+0x322/0x380 mm/vmalloc.c:1535 vfree+0x50/0xe0 mm/vmalloc.c:1606 snd_seq_pool_done+0x239/0x380 sound/core/seq/seq_memory.c:458 snd_seq_pool_delete+0x4a/0x70 sound/core/seq/seq_memory.c:501 seq_free_client1.part.6+0x16b/0x270 sound/core/seq/seq_clientmgr.c:267 seq_free_client1 sound/core/seq/seq_clientmgr.c:256 [inline] seq_free_client+0x6f/0x170 sound/core/seq/seq_clientmgr.c:285 snd_seq_release+0x51/0xe0 sound/core/seq/seq_clientmgr.c:367 __fput+0x327/0x7f0 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 task_work_run+0x1ab/0x280 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1986/0x2700 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x74c/0x16e0 kernel/signal.c:2469 do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:336 [inline] do_fast_syscall_32+0xbe6/0xf9f arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fe0c99 RSP: 002b:00000000f5fbb10c EFLAGS: 00000296 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 000000000813af98 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 26799: 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 kmem_cache_alloc_node_trace+0x150/0x760 mm/slab.c:3651 kmalloc_node include/linux/slab.h:550 [inline] kzalloc_node include/linux/slab.h:712 [inline] __get_vm_area_node+0xae/0x340 mm/vmalloc.c:1402 __vmalloc_node_range+0xa3/0x650 mm/vmalloc.c:1754 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x45/0x50 mm/vmalloc.c:1840 xt_compat_add_offset+0x228/0x380 net/netfilter/x_tables.c:559 compat_calc_entry net/ipv4/netfilter/ip_tables.c:919 [inline] compat_table_info+0x22d/0x470 net/ipv4/netfilter/ip_tables.c:950 get_info+0x525/0x690 net/ipv6/netfilter/ip6_tables.c:1001 compat_do_ipt_get_ctl+0x468/0xc00 net/ipv4/netfilter/ip_tables.c:1658 compat_nf_sockopt net/netfilter/nf_sockopt.c:139 [inline] compat_nf_getsockopt+0x8b/0x130 net/netfilter/nf_sockopt.c:163 compat_ip_getsockopt+0x18a/0x230 net/ipv4/ip_sockglue.c:1604 inet_csk_compat_getsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:1028 compat_tcp_getsockopt+0x3d/0x70 net/ipv4/tcp.c:3370 compat_sock_common_getsockopt+0xb2/0x140 net/core/sock.c:2945 __compat_sys_getsockopt+0x18a/0x770 net/compat.c:530 C_SYSC_socketcall net/compat.c:914 [inline] compat_SyS_socketcall+0xb20/0x1050 net/compat.c:842 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 26799: 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:3486 [inline] kfree+0xd9/0x260 mm/slab.c:3801 __vunmap+0x2b9/0x380 mm/vmalloc.c:1545 vfree+0x50/0xe0 mm/vmalloc.c:1606 xt_compat_flush_offsets+0x68/0x130 net/netfilter/x_tables.c:580 get_info+0x52f/0x690 net/ipv6/netfilter/ip6_tables.c:1002 compat_do_ipt_get_ctl+0x468/0xc00 net/ipv4/netfilter/ip_tables.c:1658 compat_nf_sockopt net/netfilter/nf_sockopt.c:139 [inline] compat_nf_getsockopt+0x8b/0x130 net/netfilter/nf_sockopt.c:163 compat_ip_getsockopt+0x18a/0x230 net/ipv4/ip_sockglue.c:1604 inet_csk_compat_getsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:1028 compat_tcp_getsockopt+0x3d/0x70 net/ipv4/tcp.c:3370 compat_sock_common_getsockopt+0xb2/0x140 net/core/sock.c:2945 __compat_sys_getsockopt+0x18a/0x770 net/compat.c:530 C_SYSC_socketcall net/compat.c:914 [inline] compat_SyS_socketcall+0xb20/0x1050 net/compat.c:842 do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] do_fast_syscall_32+0x3ec/0xf9f arch/x86/entry/common.c:392 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff88019116ee80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 16 bytes inside of 64-byte region [ffff88019116ee80, ffff88019116eec0) The buggy address belongs to the page: page:ffffea0006445b80 count:1 mapcount:0 mapping:ffff88019116e000 index:0xffff88019116e000 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff88019116e000 ffff88019116e000 000000010000001b raw: ffffea0006eeac20 ffffea000720b3e0 ffff8801dac00340 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88019116ed80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88019116ee00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88019116ee80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88019116ef00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88019116ef80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================