------------[ cut here ]------------ ================================================================== kernel BUG at mm/slab.c:4421! BUG: KASAN: use-after-free in _copy_to_user+0xe9/0x110 lib/usercopy.c:27 invalid opcode: 0000 [#1] SMP KASAN Read of size 1024 at addr ffff8801913ffffc by task syz-executor5/7799 CPU: 1 PID: 7756 Comm: syz-executor5 Not tainted 4.18.0-rc3+ #58 CPU: 0 PID: 7799 Comm: syz-executor5 Not tainted 4.18.0-rc3+ #58 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__check_heap_object+0xa7/0xb5 mm/slab.c:4446 Call Trace: Code: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 48 c7 c7 e0 8b print_address_description+0x6c/0x20b mm/kasan/report.c:256 c0 88 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 e8 check_memory_region_inline mm/kasan/kasan.c:260 [inline] check_memory_region+0x13e/0x1b0 mm/kasan/kasan.c:267 87 7a kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 08 _copy_to_user+0xe9/0x110 lib/usercopy.c:27 00 copy_to_user include/linux/uaccess.h:155 [inline] bpf_test_finish.isra.7+0xee/0x1f0 net/bpf/test_run.c:59 5d c3 41 bpf_prog_test_run_skb+0x7d7/0xa30 net/bpf/test_run.c:144 8b 91 04 01 00 00 48 29 bpf_prog_test_run+0x130/0x1a0 kernel/bpf/syscall.c:1686 c7 __do_sys_bpf kernel/bpf/syscall.c:2323 [inline] __se_sys_bpf kernel/bpf/syscall.c:2267 [inline] __x64_sys_bpf+0x3d8/0x510 kernel/bpf/syscall.c:2267 48 39 d7 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 77 be 48 01 d0 48 29 entry_SYSCALL_64_after_hwframe+0x49/0xbe c8 RIP: 0033:0x455ab9 48 Code: 39 1d f0 ba 72 b3 fb ff 5d c3 c3 66 <0f> 0b 2e 48 c7 0f c7 1f e0 8b 84 00 c0 00 88 00 00 e8 6d 00 66 81 90 48 08 89 f8 00 48 44 89 89 f7 e1 48 89 4c d6 8d 45 48 c4 89 48 ca 4d RSP: 0018:ffff88019993fa10 EFLAGS: 00010246 89 c2 4d RAX: 0000000000000001 RBX: 1ffff10033327f49 RCX: 0000000000000015 89 RDX: ffff880192800140 RSI: 0000000000000400 RDI: ffff880192bffffc c8 4c RBP: ffff88019993fa10 R08: ffff8801d3ece740 R09: ffff8801da802c80 8b 4c R10: 00000000003fdec4 R11: 0000000000000001 R12: ffff880192bffffc 24 R13: 0000000000000400 R14: 0000000000000001 R15: ffffea00064a0000 08 0f FS: 00007fab14bb8700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 05 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <48> 3d CR2: 00000000025b5cc8 CR3: 00000001d64f9000 CR4: 00000000001406e0 01 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 f0 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ff Call Trace: ff check_heap_object mm/usercopy.c:236 [inline] __check_object_size+0x4db/0x5f2 mm/usercopy.c:259 0f 83 eb b9 check_object_size include/linux/thread_info.h:119 [inline] check_copy_size include/linux/thread_info.h:150 [inline] copy_to_user include/linux/uaccess.h:154 [inline] bpf_test_finish.isra.7+0xd9/0x1f0 net/bpf/test_run.c:59 fb ff c3 66 2e 0f bpf_prog_test_run_skb+0x7d7/0xa30 net/bpf/test_run.c:144 1f 84 00 00 00 00 bpf_prog_test_run+0x130/0x1a0 kernel/bpf/syscall.c:1686 __do_sys_bpf kernel/bpf/syscall.c:2323 [inline] __se_sys_bpf kernel/bpf/syscall.c:2267 [inline] __x64_sys_bpf+0x3d8/0x510 kernel/bpf/syscall.c:2267 RSP: 002b:00007fab14b75c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fab14b766d4 RCX: 0000000000455ab9 RDX: 0000000000000028 RSI: 0000000020000080 RDI: 000000000000000a do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 RBP: 000000000072bff0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004bb71f R14: 00000000004c8b00 R15: 0000000000000002 The buggy address belongs to the page: page:ffffea000644ffc0 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x2fffc0000000000() entry_SYSCALL_64_after_hwframe+0x49/0xbe raw: 02fffc0000000000 ffffea000644ffc8 ffffea000644ffc8 0000000000000000 RIP: 0033:0x455ab9 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 Code: page dumped because: kasan: bad access detected 1d ba Memory state around the buggy address: fb ffff8801913ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801913fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff c3 >ffff8801913fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 66 ^ 2e ffff880191400000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0f ffff880191400080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1f ================================================================== 84 00