================================================================== BUG: KASAN: slab-out-of-bounds in do_jit.isra.0+0x4c35/0x5630 /arch/x86/net/bpf_jit_comp.c:966 Read of size 4 at addr ffff8880a1a8783c by task syz-executor377/9196 CPU: 0 PID: 9196 Comm: syz-executor377 Not tainted 5.2.0+ #37 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+0xd4/0x306 /mm/kasan/report.c:351 __kasan_report.cold+0x1b/0x36 /mm/kasan/report.c:482 kasan_report+0x12/0x20 /mm/kasan/common.c:612 __asan_report_load4_noabort+0x14/0x20 /mm/kasan/generic_report.c:131 do_jit.isra.0+0x4c35/0x5630 /arch/x86/net/bpf_jit_comp.c:966 bpf_int_jit_compile+0x374/0xda0 /arch/x86/net/bpf_jit_comp.c:1132 bpf_prog_select_runtime+0x4cd/0x7d0 /kernel/bpf/core.c:1726 bpf_prog_load+0xe9b/0x1670 /kernel/bpf/syscall.c:1702 __do_sys_bpf+0xa46/0x42f0 /kernel/bpf/syscall.c:2849 __se_sys_bpf /kernel/bpf/syscall.c:2808 [inline] __x64_sys_bpf+0x73/0xb0 /kernel/bpf/syscall.c:2808 do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4402c9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd5e0fbe88 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004402c9 RDX: 0000000000000046 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000401b50 R13: 0000000000401be0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8603: save_stack+0x23/0x90 /mm/kasan/common.c:69 set_track /mm/kasan/common.c:77 [inline] __kasan_kmalloc /mm/kasan/common.c:487 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 /mm/kasan/common.c:460 kasan_kmalloc+0x9/0x10 /mm/kasan/common.c:501 __do_kmalloc /mm/slab.c:3655 [inline] __kmalloc+0x163/0x780 /mm/slab.c:3664 kmalloc /./include/linux/slab.h:557 [inline] tomoyo_add_entry /security/tomoyo/common.c:2029 [inline] tomoyo_supervisor+0xd40/0xef0 /security/tomoyo/common.c:2101 tomoyo_audit_path_number_log /security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x42f/0x520 /security/tomoyo/file.c:734 tomoyo_file_ioctl+0x23/0x30 /security/tomoyo/tomoyo.c:335 security_file_ioctl+0x77/0xc0 /security/security.c:1369 ksys_ioctl+0x57/0xd0 /fs/ioctl.c:711 __do_sys_ioctl /fs/ioctl.c:720 [inline] __se_sys_ioctl /fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 /fs/ioctl.c:718 do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8603: save_stack+0x23/0x90 /mm/kasan/common.c:69 set_track /mm/kasan/common.c:77 [inline] __kasan_slab_free+0x102/0x150 /mm/kasan/common.c:449 kasan_slab_free+0xe/0x10 /mm/kasan/common.c:457 __cache_free /mm/slab.c:3425 [inline] kfree+0x10a/0x2c0 /mm/slab.c:3756 tomoyo_add_entry /security/tomoyo/common.c:2043 [inline] tomoyo_supervisor+0xc2e/0xef0 /security/tomoyo/common.c:2101 tomoyo_audit_path_number_log /security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x42f/0x520 /security/tomoyo/file.c:734 tomoyo_file_ioctl+0x23/0x30 /security/tomoyo/tomoyo.c:335 security_file_ioctl+0x77/0xc0 /security/security.c:1369 ksys_ioctl+0x57/0xd0 /fs/ioctl.c:711 __do_sys_ioctl /fs/ioctl.c:720 [inline] __se_sys_ioctl /fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 /fs/ioctl.c:718 do_syscall_64+0xfd/0x6a0 /arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a1a87800 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 28 bytes to the right of 32-byte region [ffff8880a1a87800, ffff8880a1a87820) The buggy address belongs to the page: page:ffffea000286a1c0 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a1a87fc1 flags: 0x1fffc0000000200(slab) raw: 01fffc0000000200 ffffea0002802788 ffffea00028fd588 ffff8880aa4001c0 raw: ffff8880a1a87fc1 ffff8880a1a87000 000000010000003c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a1a87700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a1a87780: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a1a87800: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc ^ ffff8880a1a87880: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a1a87900: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================