bisecting fixing commit since cbfa1702aaf69b2311ea1b35e04f113c48368c67 building syzkaller on fc7735a27949755327024847e12dcc1b868bcb99 testing commit cbfa1702aaf69b2311ea1b35e04f113c48368c67 with gcc (GCC) 8.4.1 20210217 kernel signature: bd875aa285f6f53f36a8d5eae578993602cf37f3e3c45a120bb99706cb04cfca run #0: crashed: KASAN: use-after-free Read in perf_output_read run #1: crashed: KASAN: use-after-free Read in perf_output_read run #2: crashed: KASAN: use-after-free Read in perf_output_read run #3: crashed: KASAN: use-after-free Read in perf_output_read run #4: crashed: KASAN: use-after-free Read in perf_output_read run #5: crashed: KASAN: use-after-free Read in perf_output_read run #6: crashed: KASAN: use-after-free Read in perf_output_read run #7: crashed: KASAN: use-after-free Read in perf_output_read run #8: crashed: KASAN: global-out-of-bounds Read in perf_output_read run #9: crashed: KASAN: use-after-free Read in perf_output_read run #10: crashed: KASAN: use-after-free Read in perf_output_read run #11: crashed: BUG: soft lockup in __perf_sw_event run #12: crashed: KASAN: slab-out-of-bounds Read in perf_output_read run #13: crashed: BUG: soft lockup in __perf_sw_event run #14: crashed: KASAN: use-after-free Read in perf_output_read run #15: crashed: KASAN: use-after-free Read in perf_output_read run #16: crashed: KASAN: slab-out-of-bounds Read in perf_output_read run #17: crashed: KASAN: slab-out-of-bounds Read in perf_output_read run #18: crashed: KASAN: use-after-free Read in perf_output_read run #19: crashed: KASAN: slab-out-of-bounds Read in perf_output_read testing current HEAD cb83ddcd5332fcc3efd52ba994976efc4dd6061e testing commit cb83ddcd5332fcc3efd52ba994976efc4dd6061e with gcc (GCC) 8.4.1 20210217 kernel signature: 7e4208231126183d90674e7cc220c8fabb17c19168f1942fb3712a626edf097b run #0: crashed: KASAN: slab-out-of-bounds Read in perf_output_read run #1: crashed: KASAN: use-after-free Read in perf_output_read run #2: crashed: KASAN: use-after-free Read in perf_output_read run #3: crashed: KASAN: use-after-free Read in perf_output_read run #4: crashed: KASAN: use-after-free Read in perf_output_read run #5: crashed: KASAN: use-after-free Read in perf_output_read run #6: crashed: KASAN: use-after-free Read in perf_output_read run #7: crashed: KASAN: use-after-free Read in perf_output_read run #8: crashed: KASAN: slab-out-of-bounds Read in perf_output_read run #9: OK revisions tested: 2, total time: 36m57.839042604s (build: 14m32.462407626s, test: 22m3.128304948s) the crash still happens on HEAD commit msg: Linux 4.14.226 crash: KASAN: slab-out-of-bounds Read in perf_output_read IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: slab-out-of-bounds in perf_output_read_group kernel/events/core.c:5895 [inline] BUG: KASAN: slab-out-of-bounds in perf_output_read+0x1177/0x14f0 kernel/events/core.c:5930 Read of size 8 at addr ffff8881e802b020 by task syz-executor336/26874 CPU: 0 PID: 26874 Comm: syz-executor336 Not tainted 4.14.226-syzkaller #0 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+0x14b/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 perf_output_read_group kernel/events/core.c:5895 [inline] perf_output_read+0x1177/0x14f0 kernel/events/core.c:5930 perf_output_sample+0x1276/0x1910 kernel/events/core.c:5972 __perf_event_output kernel/events/core.c:6285 [inline] perf_event_output_forward+0x103/0x1d0 kernel/events/core.c:6298 __perf_event_overflow+0x107/0x300 kernel/events/core.c:7547 perf_swevent_overflow+0x165/0x210 kernel/events/core.c:7623 perf_swevent_event+0x1f5/0x2f0 kernel/events/core.c:7656 do_perf_sw_event kernel/events/core.c:7764 [inline] ___perf_sw_event+0x26b/0x3f0 kernel/events/core.c:7795 __perf_sw_event+0x3c/0x60 kernel/events/core.c:7807 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x648/0xb10 arch/x86/mm/fault.c:1483 do_page_fault+0x64/0x400 arch/x86/mm/fault.c:1517 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff8881c537f918 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 0000000020e8dacb RCX: 00000000000041c6 RDX: 00000000000046fb RSI: 0000000020e8e000 RDI: ffff8881da128535 RBP: ffff8881c537f940 R08: 0000000000000000 R09: 000000000000011c R10: ffffed103b4258df R11: ffff8881da12c6fa R12: ffff8881da128000 R13: ffff8881f08e8580 R14: ffff8881c537fdb0 R15: ffff8881c537fd60 _copy_from_iter_full+0x166/0x760 lib/iov_iter.c:608 copy_from_iter_full include/linux/uio.h:126 [inline] skb_do_copy_data_nocache include/net/sock.h:1889 [inline] skb_copy_to_page_nocache include/net/sock.h:1915 [inline] tcp_sendmsg_locked+0x193f/0x3a10 net/ipv4/tcp.c:1360 tcp_sendmsg+0x27/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1e4/0x2c0 net/socket.c:1731 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x449179 RSP: 002b:00007f884e6dc308 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000004ce4e8 RCX: 0000000000449179 RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000004 RBP: 00000000004ce4e0 R08: 0000000000000000 R09: 0000000000000053 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049d474 R13: 00007ffddb20f67f R14: 00007f884e6dc400 R15: 0000000000022000 Allocated by task 7117: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x3e0 mm/slab.c:3552 skb_clone+0x119/0x2d0 net/core/skbuff.c:1291 batadv_iv_ogm_send_to_if net/batman-adv/bat_iv_ogm.c:564 [inline] batadv_iv_ogm_emit net/batman-adv/bat_iv_ogm.c:595 [inline] batadv_iv_send_outstanding_bat_ogm_packet+0x56b/0x7c0 net/batman-adv/bat_iv_ogm.c:1847 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Freed by task 7117: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 kfree_skbmem+0x78/0xe0 net/core/skbuff.c:595 __kfree_skb net/core/skbuff.c:655 [inline] kfree_skb+0x92/0x2b0 net/core/skbuff.c:672 __netif_receive_skb_core+0x403/0x2fe0 net/core/dev.c:4481 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:4512 process_backlog+0x220/0x710 net/core/dev.c:5194 napi_poll net/core/dev.c:5596 [inline] net_rx_action+0x42d/0xe20 net/core/dev.c:5662 __do_softirq+0x247/0x9a2 kernel/softirq.c:288 The buggy address belongs to the object at ffff8881e802b080 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 96 bytes to the left of 232-byte region [ffff8881e802b080, ffff8881e802b168) The buggy address belongs to the page: page:ffffea0007a00ac0 count:1 mapcount:0 mapping:ffff8881e802b080 index:0xffff8881e802b800 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881e802b080 ffff8881e802b800 0000000100000008 raw: ffffea00079da5a0 ffffea0007b891a0 ffff8881f4def800 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e802af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881e802af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881e802b000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881e802b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e802b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================