================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:182 [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:578 [inline] BUG: KASAN: use-after-free in bpf_prog_kallsyms_add+0x95a/0x9b0 kernel/bpf/core.c:610 Read of size 8 at addr ffff8881d7d3e068 by task syz-executor2/12212 CPU: 0 PID: 12212 Comm: syz-executor2 Not tainted 4.20.0-rc7+ #189 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:182 [inline] list_empty include/linux/list.h:226 [inline] bpf_prog_ksym_node_add kernel/bpf/core.c:578 [inline] bpf_prog_kallsyms_add+0x95a/0x9b0 kernel/bpf/core.c:610 bpf_prog_load+0x135b/0x1d30 kernel/bpf/syscall.c:1556 __do_sys_bpf+0xee3/0x4570 kernel/bpf/syscall.c:2618 __se_sys_bpf kernel/bpf/syscall.c:2580 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:2580 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457759 Code: fd b3 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 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f03a5f7cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457759 RDX: 0000000000000048 RSI: 00000000202a0fb8 RDI: 0000000000000005 RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f03a5f7d6d4 R13: 00000000004bdc97 R14: 00000000004cdc60 R15: 00000000ffffffff Allocated by task 12212: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:546 [inline] kzalloc include/linux/slab.h:741 [inline] bpf_prog_alloc+0x16b/0x3e0 kernel/bpf/core.c:91 bpf_prog_load+0x43b/0x1d30 kernel/bpf/syscall.c:1486 __do_sys_bpf+0xee3/0x4570 kernel/bpf/syscall.c:2618 __se_sys_bpf kernel/bpf/syscall.c:2580 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:2580 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 5: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3817 bpf_jit_free+0xfa/0x3f0 bpf_prog_free_deferred+0x2c7/0x410 kernel/bpf/core.c:1972 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x440 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881d7d3e000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 104 bytes inside of 512-byte region [ffff8881d7d3e000, ffff8881d7d3e200) The buggy address belongs to the page: page:ffffea00075f4f80 count:1 mapcount:0 mapping:ffff8881da800940 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0007301dc8 ffffea000703fd48 ffff8881da800940 raw: 0000000000000000 ffff8881d7d3e000 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d7d3df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881d7d3df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881d7d3e000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881d7d3e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881d7d3e100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================