================================================================== BUG: KASAN: slab-out-of-bounds in do_jit.isra.2+0x44c6/0x5770 /arch/x86/net/bpf_jit_comp.c:997 Read of size 4 at addr ffff8880a42813fc by task syz-executor.3/7555 CPU: 1 PID: 7555 Comm: syz-executor.3 Not tainted 5.2.0-rc2+ #1 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+0x113/0x167 /lib/dump_stack.c:113 print_address_description.cold.5+0x9/0x1ff /mm/kasan/report.c:188 __kasan_report.cold.6+0x1b/0x39 /mm/kasan/report.c:317 kasan_report+0x12/0x20 /mm/kasan/common.c:614 __asan_report_load4_noabort+0x14/0x20 /mm/kasan/generic_report.c:131 do_jit.isra.2+0x44c6/0x5770 /arch/x86/net/bpf_jit_comp.c:997 bpf_int_jit_compile+0x2fd/0xb1c /arch/x86/net/bpf_jit_comp.c:1168 bpf_prog_select_runtime+0x43e/0x850 /kernel/bpf/core.c:1730 bpf_prog_load+0xaeb/0x1210 /kernel/bpf/syscall.c:1700 __do_sys_bpf+0x9d4/0x33a0 /kernel/bpf/syscall.c:2830 __se_sys_bpf /kernel/bpf/syscall.c:2789 [inline] __x64_sys_bpf+0x6e/0xb0 /kernel/bpf/syscall.c:2789 do_syscall_64+0xd0/0x530 /arch/x86/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459819 Code: fd b7 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 b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fba57a6cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459819 RDX: 0000000000000046 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fba57a6d6d4 R13: 00000000004bfc7c R14: 00000000004d16d8 R15: 00000000ffffffff Allocated by task 1: save_stack+0x21/0x90 /mm/kasan/common.c:71 set_track /mm/kasan/common.c:79 [inline] __kasan_kmalloc.constprop.8+0xc7/0xd0 /mm/kasan/common.c:489 kasan_kmalloc+0x9/0x10 /mm/kasan/common.c:503 __do_kmalloc /mm/slab.c:3660 [inline] __kmalloc_track_caller+0x159/0x750 /mm/slab.c:3675 kstrdup+0x2c/0x60 /mm/util.c:52 kstrdup_const+0x1f/0x30 /mm/util.c:74 kvasprintf_const+0xce/0x140 /lib/kasprintf.c:48 kobject_set_name_vargs+0x46/0x120 /lib/kobject.c:289 kobject_add_varg /lib/kobject.c:384 [inline] kobject_init_and_add+0xa9/0x120 /lib/kobject.c:473 bus_add_driver+0x1ca/0x4f0 /drivers/base/bus.c:638 driver_register+0x18e/0x320 /drivers/base/driver.c:170 acpi_bus_register_driver+0xf3/0x130 /drivers/acpi/bus.c:871 crb_acpi_driver_init+0x10/0x12 /drivers/char/tpm/tpm_crb.c:695 do_one_initcall+0xbc/0x545 /init/main.c:915 do_initcall_level /init/main.c:983 [inline] do_initcalls /init/main.c:991 [inline] do_basic_setup /init/main.c:1009 [inline] kernel_init_freeable+0x461/0x500 /init/main.c:1169 kernel_init+0xc/0x107 /init/main.c:1087 ret_from_fork+0x24/0x30 /arch/x86/entry/entry_64.S:352 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8880a42813c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 28 bytes to the right of 32-byte region [ffff8880a42813c0, ffff8880a42813e0) The buggy address belongs to the page: page:ffffea000290a040 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a4281fc1 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002a90308 ffffea00028fba08 ffff8880aa4001c0 raw: ffff8880a4281fc1 ffff8880a4281000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a4281280: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc ffff8880a4281300: 00 00 fc fc fc fc fc fc 00 00 fc fc fc fc fc fc >ffff8880a4281380: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc ^ ffff8880a4281400: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a4281480: fb fb fb fb fc fc fc fc 07 fc fc fc fc fc fc fc ==================================================================