------------[ 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-executor0/10295 CPU: 1 PID: 10223 Comm: syz-executor0 Not tainted 4.18.0-rc3+ #58 CPU: 0 PID: 10295 Comm: syz-executor0 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 Call Trace: RIP: 0010:__check_heap_object+0xa7/0xb5 mm/slab.c:4446 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 Code: 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 kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272 7a _copy_to_user+0xe9/0x110 lib/usercopy.c:27 08 copy_to_user include/linux/uaccess.h:155 [inline] bpf_test_finish.isra.7+0xee/0x1f0 net/bpf/test_run.c:59 00 5d c3 bpf_prog_test_run_skb+0x7d7/0xa30 net/bpf/test_run.c:144 41 8b 91 04 01 00 bpf_prog_test_run+0x130/0x1a0 kernel/bpf/syscall.c:1686 00 __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 29 c7 48 39 d7 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 77 be 48 01 d0 48 entry_SYSCALL_64_after_hwframe+0x49/0xbe 29 c8 RIP: 0033:0x455ab9 48 Code: 39 1d f0 ba 72 fb b3 ff 5d c3 c3 66 <0f> 2e 0b 0f 1f 48 c7 84 c7 00 00 e0 00 8b 00 c0 00 88 66 e8 90 48 6d 89 81 f8 08 48 00 89 44 f7 89 48 e1 89 4c d6 8d 48 45 89 c4 ca 48 4d 89 RSP: 0018:ffff88019a6dfa10 EFLAGS: 00010246 c2 4d RAX: 0000000000000001 RBX: 1ffff100334dbf49 RCX: 0000000000000015 89 RDX: ffff88019d400080 RSI: 0000000000000400 RDI: ffff88019d7ffffc c8 4c RBP: ffff88019a6dfa10 R08: ffff8801ae256040 R09: ffff8801da802c80 8b R10: 00000000003fdf84 R11: 0000000000000001 R12: ffff88019d7ffffc 4c R13: 0000000000000400 R14: 0000000000000001 R15: ffffea0006750000 24 FS: 00007fd899e46700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000 08 0f CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 05 CR2: 00007ffda9476d60 CR3: 0000000197533000 CR4: 00000000001406e0 <48> DR0: 0000000020000000 DR1: 0000000020000000 DR2: 0000000000000000 3d DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 01 Call Trace: f0 ff check_heap_object mm/usercopy.c:236 [inline] __check_object_size+0x4db/0x5f2 mm/usercopy.c:259 ff 0f 83 eb 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 b9 fb ff bpf_prog_test_run_skb+0x7d7/0xa30 net/bpf/test_run.c:144 c3 66 2e 0f 1f 84 00 bpf_prog_test_run+0x130/0x1a0 kernel/bpf/syscall.c:1686 00 00 __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 00 RSP: 002b:00007fd899e03c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 RAX: ffffffffffffffda RBX: 00007fd899e046d4 RCX: 0000000000455ab9 RDX: 0000000000000028 RSI: 0000000020000080 RDI: 000000000000000a 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 entry_SYSCALL_64_after_hwframe+0x49/0xbe flags: 0x2fffc0000000000() RIP: 0033:0x455ab9 raw: 02fffc0000000000 ffffea000644ffc8 ffffea000644ffc8 0000000000000000 Code: 1d raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 ba page dumped because: kasan: bad access detected fb ff Memory state around the buggy address: c3 ffff8801913ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 66 2e ffff8801913fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 0f >ffff8801913fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 1f ^ 84 00 ffff880191400000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff880191400080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== 00