bisecting cause commit starting from 000fe940e51f03210bd5fb1061d4d82ed9a7b1b6 building syzkaller on 4ebb27982f8984ed57466f87099acc0b250a1b5c testing commit 000fe940e51f03210bd5fb1061d4d82ed9a7b1b6 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b580ea86dcb1484f320e32ed7d046574663ece5003369cd18e133ea9706292d9 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: exit status NUM run #1: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #2: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #3: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #4: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #5: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #6: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #7: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #8: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #9: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #10: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #11: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #12: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #13: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #14: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #15: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #16: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #17: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #18: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp run #19: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp testing release v5.16 testing commit df0cc57e057f18e44dac8e6c18aba47ab53202f9 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6392e7dc90e0a4647080a5029d93ca58348fb8a5852ea8aba24fe1cfc2cb5f6d all runs: OK # git bisect start 000fe940e51f03210bd5fb1061d4d82ed9a7b1b6 df0cc57e057f18e44dac8e6c18aba47ab53202f9 Bisecting: 6186 revisions left to test after this (roughly 13 steps) [9149fe8ba7ff798ea1c6b1fa05eeb59f95f9a94a] Merge tag 'erofs-for-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs testing commit 9149fe8ba7ff798ea1c6b1fa05eeb59f95f9a94a compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7f134a67b45cea8ba8f85ca9afab33d3d0f37a6b940dff276cc15dba9b187b11 all runs: OK # git bisect good 9149fe8ba7ff798ea1c6b1fa05eeb59f95f9a94a Bisecting: 3168 revisions left to test after this (roughly 12 steps) [aee101d7b95a03078945681dd7f7ea5e4a1e7686] powerpc/64s: Mask SRR0 before checking against the masked NIP testing commit aee101d7b95a03078945681dd7f7ea5e4a1e7686 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a68128aec9313dc64378d8a41d882039aeb0479f21fcf07352cd83677a6505f7 all runs: OK # git bisect good aee101d7b95a03078945681dd7f7ea5e4a1e7686 Bisecting: 1567 revisions left to test after this (roughly 11 steps) [57d17378a4a042401b0c2fe211e5a0e3a276cb3d] Merge tag 'perf-tools-for-v5.17-2022-01-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux testing commit 57d17378a4a042401b0c2fe211e5a0e3a276cb3d compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e9d799aca1a05000a105e174b24ae0de10d1a6dbc0eda0ffb1c106ffaae3db1c all runs: OK # git bisect good 57d17378a4a042401b0c2fe211e5a0e3a276cb3d Bisecting: 783 revisions left to test after this (roughly 10 steps) [a41ec880aa7beeabcb3bfa476ef35b23f376133b] zsmalloc: move huge compressed obj from page to zspage testing commit a41ec880aa7beeabcb3bfa476ef35b23f376133b compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4e9dd60602febcaed74819c625a165f9656646143b9c33b209f857431c2061ce all runs: OK # git bisect good a41ec880aa7beeabcb3bfa476ef35b23f376133b Bisecting: 363 revisions left to test after this (roughly 9 steps) [23a46422c56144939c091c76cf389aa863ce9c18] Merge tag 'net-5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net testing commit 23a46422c56144939c091c76cf389aa863ce9c18 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e8bc2fb26441d64ca3fe865ceeec5387b4071964dd85ab5d610446aac251b7ee all runs: OK # git bisect good 23a46422c56144939c091c76cf389aa863ce9c18 Bisecting: 181 revisions left to test after this (roughly 8 steps) [8b0fdcdc3a7d44aff907f0103f5ffb86b12bfe71] net: remove bond_slave_has_mac_rcu() testing commit 8b0fdcdc3a7d44aff907f0103f5ffb86b12bfe71 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0f4019b8133675a9a83ff2ab6ba25b6aa6295367b76093a11c0ce2884107b839 all runs: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp # git bisect bad 8b0fdcdc3a7d44aff907f0103f5ffb86b12bfe71 Bisecting: 90 revisions left to test after this (roughly 7 steps) [9f16e0fa1079022632880da3e8346537ba4eeecc] net: usb: asix: remove redundant assignment to variable reg testing commit 9f16e0fa1079022632880da3e8346537ba4eeecc compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 33df0de3e5bc17e3a48bf276492cdd0b0ce35aca4669bd07757f999bed50eb63 all runs: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp # git bisect bad 9f16e0fa1079022632880da3e8346537ba4eeecc Bisecting: 45 revisions left to test after this (roughly 6 steps) [4e950747ba126eb4accacf8f8b10459f374e6e9e] Merge branch 'bpf: allow cgroup progs to export custom retval to userspace' testing commit 4e950747ba126eb4accacf8f8b10459f374e6e9e compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0f5a22f107751e9351b56e2ec2d575c45993865059f224bd2e4c85691d843bcf all runs: OK # git bisect good 4e950747ba126eb4accacf8f8b10459f374e6e9e Bisecting: 22 revisions left to test after this (roughly 5 steps) [ed7a58cb40bd1dda5bf3a7f4d18d2652423fd14b] net: marvell: rely on xdp_update_skb_shared_info utility routine testing commit ed7a58cb40bd1dda5bf3a7f4d18d2652423fd14b compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 36cf4677659e6243d6e5420bb8531f243a25ce62e35a60113d03a65fce31cc86 all runs: OK # git bisect good ed7a58cb40bd1dda5bf3a7f4d18d2652423fd14b Bisecting: 11 revisions left to test after this (roughly 4 steps) [110221081aac19ae147e472f590abe20a750dd25] bpf: selftests: update xdp_adjust_tail selftest to include xdp frags testing commit 110221081aac19ae147e472f590abe20a750dd25 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b3ed9e7882ed3f4d578dbc8f366703ad5c736c227ec1cf67e54bcb2cc9aa5562 all runs: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp # git bisect bad 110221081aac19ae147e472f590abe20a750dd25 Bisecting: 5 revisions left to test after this (roughly 3 steps) [0165cc817075cf701e4289838f1d925ff1911b3e] bpf: introduce bpf_xdp_get_buff_len helper testing commit 0165cc817075cf701e4289838f1d925ff1911b3e compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 5f83fcb54bd14dfeca32749f2558384b4effaee553c66ba83f6a7dfdc6f65607 all runs: OK # git bisect good 0165cc817075cf701e4289838f1d925ff1911b3e Bisecting: 2 revisions left to test after this (roughly 2 steps) [be3d72a2896cb24090f268dce4aa8a304d40bc23] bpf: move user_size out of bpf_test_init testing commit be3d72a2896cb24090f268dce4aa8a304d40bc23 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 71dd55ea5f415abda4a3cf50626df286dc6f5b00504cb36669a3f873db4be659 all runs: OK # git bisect good be3d72a2896cb24090f268dce4aa8a304d40bc23 Bisecting: 0 revisions left to test after this (roughly 1 step) [7855e0db150ad8f494d66913c26deadc52f12e07] bpf: test_run: add xdp_shared_info pointer in bpf_test_finish signature testing commit 7855e0db150ad8f494d66913c26deadc52f12e07 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b3ed9e7882ed3f4d578dbc8f366703ad5c736c227ec1cf67e54bcb2cc9aa5562 all runs: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp # git bisect bad 7855e0db150ad8f494d66913c26deadc52f12e07 Bisecting: 0 revisions left to test after this (roughly 0 steps) [1c194998252469cad00a08bd9ef0b99fd255c260] bpf: introduce frags support to bpf_prog_test_run_xdp() testing commit 1c194998252469cad00a08bd9ef0b99fd255c260 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6d8802f233eb5e39253d18aec9c8b7fbab89832f5477a23b772c533c3d9a653e all runs: crashed: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp # git bisect bad 1c194998252469cad00a08bd9ef0b99fd255c260 1c194998252469cad00a08bd9ef0b99fd255c260 is the first bad commit commit 1c194998252469cad00a08bd9ef0b99fd255c260 Author: Lorenzo Bianconi Date: Fri Jan 21 11:09:58 2022 +0100 bpf: introduce frags support to bpf_prog_test_run_xdp() Introduce the capability to allocate a xdp frags in bpf_prog_test_run_xdp routine. This is a preliminary patch to introduce the selftests for new xdp frags ebpf helpers Acked-by: Toke Hoiland-Jorgensen Acked-by: John Fastabend Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/b7c0e425a9287f00f601c4fc0de54738ec6ceeea.1642758637.git.lorenzo@kernel.org Signed-off-by: Alexei Starovoitov net/bpf/test_run.c | 58 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 45 insertions(+), 13 deletions(-) culprit signature: 6d8802f233eb5e39253d18aec9c8b7fbab89832f5477a23b772c533c3d9a653e parent signature: 71dd55ea5f415abda4a3cf50626df286dc6f5b00504cb36669a3f873db4be659 revisions tested: 16, total time: 2h49m13.915199216s (build: 1h58m4.956961361s, test: 49m39.622249469s) first bad commit: 1c194998252469cad00a08bd9ef0b99fd255c260 bpf: introduce frags support to bpf_prog_test_run_xdp() recipients (to): ["ast@kernel.org" "john.fastabend@gmail.com" "lorenzo@kernel.org" "toke@redhat.com"] recipients (cc): [] crash: KASAN: slab-out-of-bounds Write in bpf_prog_test_run_xdp ================================================================== BUG: KASAN: slab-out-of-bounds in __skb_frag_set_page include/linux/skbuff.h:3242 [inline] BUG: KASAN: slab-out-of-bounds in bpf_prog_test_run_xdp+0xf9a/0x1010 net/bpf/test_run.c:942 Write of size 8 at addr ffff88807d16f000 by task syz-executor365/4053 CPU: 0 PID: 4053 Comm: syz-executor365 Not tainted 5.16.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 __skb_frag_set_page include/linux/skbuff.h:3242 [inline] bpf_prog_test_run_xdp+0xf9a/0x1010 net/bpf/test_run.c:942 bpf_prog_test_run kernel/bpf/syscall.c:3357 [inline] __sys_bpf+0x1054/0x4410 kernel/bpf/syscall.c:4659 __do_sys_bpf kernel/bpf/syscall.c:4745 [inline] __se_sys_bpf kernel/bpf/syscall.c:4743 [inline] __x64_sys_bpf+0x70/0xb0 kernel/bpf/syscall.c:4743 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fd9171e8d59 Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffbefdbd58 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd9171e8d59 RDX: 0000000000000048 RSI: 0000000020000000 RDI: 000000000000000a RBP: 00007fd9171acf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fd9171acf90 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4053: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:525 kmalloc include/linux/slab.h:587 [inline] kzalloc include/linux/slab.h:716 [inline] bpf_test_init.isra.0+0x4c/0xb0 net/bpf/test_run.c:382 bpf_prog_test_run_xdp+0x2a9/0x1010 net/bpf/test_run.c:911 bpf_prog_test_run kernel/bpf/syscall.c:3357 [inline] __sys_bpf+0x1054/0x4410 kernel/bpf/syscall.c:4659 __do_sys_bpf kernel/bpf/syscall.c:4745 [inline] __se_sys_bpf kernel/bpf/syscall.c:4743 [inline] __x64_sys_bpf+0x70/0xb0 kernel/bpf/syscall.c:4743 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88807d16e000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 0 bytes to the right of 4096-byte region [ffff88807d16e000, ffff88807d16f000) The buggy address belongs to the page: page:ffffea0001f45a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7d168 head:ffffea0001f45a00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000001 ffff88800fc42140 raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 8, ts 51905196458, free_ts 51586417134 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa6f/0x2f10 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab mm/slub.c:1944 [inline] new_slab+0x28a/0x3b0 mm/slub.c:2004 ___slab_alloc+0x87e/0xe80 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] __kmalloc_node_track_caller+0x2cb/0x360 mm/slub.c:4957 kmalloc_reserve net/core/skbuff.c:354 [inline] __alloc_skb+0x8a/0x270 net/core/skbuff.c:426 alloc_skb include/linux/skbuff.h:1159 [inline] nlmsg_new include/net/netlink.h:953 [inline] rtmsg_ifinfo_build_skb+0x6d/0x160 net/core/rtnetlink.c:3829 rtmsg_ifinfo_event net/core/rtnetlink.c:3865 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3856 [inline] rtmsg_ifinfo+0x5c/0x100 net/core/rtnetlink.c:3874 register_netdevice+0xe38/0x1240 net/core/dev.c:9706 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline] nsim_create+0x371/0x4b0 drivers/net/netdevsim/netdev.c:365 __nsim_dev_port_add+0x250/0x6e0 drivers/net/netdevsim/dev.c:1392 nsim_dev_port_add_all+0x36/0x120 drivers/net/netdevsim/dev.c:1452 nsim_dev_reload_create drivers/net/netdevsim/dev.c:1501 [inline] nsim_dev_reload_up+0x496/0x670 drivers/net/netdevsim/dev.c:991 devlink_reload+0x27d/0x5e0 net/core/devlink.c:4079 devlink_pernet_pre_exit+0x141/0x1c0 net/core/devlink.c:11424 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __unfreeze_partials+0x320/0x340 mm/slub.c:2536 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5e/0xf0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:260 [inline] slab_post_alloc_hook mm/slab.h:738 [inline] slab_alloc_node mm/slub.c:3230 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x1e9/0x2c0 mm/slub.c:3255 kmalloc include/linux/slab.h:582 [inline] kzalloc include/linux/slab.h:716 [inline] nsim_fib6_rt_create drivers/net/netdevsim/fib.c:544 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:749 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:853 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:886 [inline] nsim_fib_event_work+0x1003/0x20e0 drivers/net/netdevsim/fib.c:1477 process_one_work+0x87f/0x1420 kernel/workqueue.c:2298 process_scheduled_works kernel/workqueue.c:2361 [inline] worker_thread+0x741/0xf90 kernel/workqueue.c:2447 kthread+0x3ab/0x480 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88807d16ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88807d16ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807d16f000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807d16f080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807d16f100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================