netlink: 22 bytes leftover after parsing attributes in process `syz-executor.4'. ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:193 [inline] BUG: KASAN: use-after-free in list_empty include/linux/list.h:226 [inline] BUG: KASAN: use-after-free in bpf_prog_ksym_node_add kernel/bpf/core.c:623 [inline] BUG: KASAN: use-after-free in bpf_prog_kallsyms_add+0x7c5/0x840 kernel/bpf/core.c:655 Read of size 8 at addr ffff8880a37a68a8 by task syz-executor.0/16574 netlink: 22 bytes leftover after parsing attributes in process `syz-executor.4'. CPU: 1 PID: 16574 Comm: syz-executor.0 Not tainted 5.0.0-rc6+ #56 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __read_once_size include/linux/compiler.h:193 [inline] list_empty include/linux/list.h:226 [inline] bpf_prog_ksym_node_add kernel/bpf/core.c:623 [inline] bpf_prog_kallsyms_add+0x7c5/0x840 kernel/bpf/core.c:655 bpf_prog_load+0xf23/0x1490 kernel/bpf/syscall.c:1633 __do_sys_bpf+0xea5/0x3ea0 kernel/bpf/syscall.c:2700 __se_sys_bpf kernel/bpf/syscall.c:2662 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:2662 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e29 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f0e2bbdac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457e29 RDX: 0000000000000048 RSI: 0000000020000940 RDI: 0000000000000005 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0e2bbdb6d4 R13: 00000000004be16f R14: 00000000004ce7c0 R15: 00000000ffffffff Allocated by task 16574: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504 kmem_cache_alloc_trace+0x151/0x760 mm/slab.c:3609 kmalloc include/linux/slab.h:545 [inline] kzalloc include/linux/slab.h:740 [inline] bpf_prog_alloc_no_stats+0xe6/0x2b0 kernel/bpf/core.c:92 bpf_prog_alloc+0x31/0x230 kernel/bpf/core.c:114 bpf_prog_load+0x4fc/0x1490 kernel/bpf/syscall.c:1563 __do_sys_bpf+0xea5/0x3ea0 kernel/bpf/syscall.c:2700 __se_sys_bpf kernel/bpf/syscall.c:2662 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:2662 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 22: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kfree+0xcf/0x230 mm/slab.c:3806 __bpf_prog_free+0x87/0xc0 kernel/bpf/core.c:262 bpf_jit_free+0x7f/0x2c0 bpf_prog_free_deferred+0x2b1/0x3e0 kernel/bpf/core.c:1987 process_one_work+0x98e/0x1790 kernel/workqueue.c:2173 worker_thread+0x98/0xe40 kernel/workqueue.c:2319 kthread+0x357/0x430 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8880a37a6840 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes inside of 512-byte region [ffff8880a37a6840, ffff8880a37a6a40) The buggy address belongs to the page: page:ffffea00028de980 count:1 mapcount:0 mapping:ffff88812c3f0940 index:0x0 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea00026ba588 ffffea00026f9a48 ffff88812c3f0940 raw: 0000000000000000 ffff8880a37a60c0 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a37a6780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a37a6800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8880a37a6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a37a6900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a37a6980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================