================================================================== BUG: KASAN: use-after-free in ex_handler_refcount+0x14b/0x170 arch/x86/mm/extable.c:57 Write of size 4 at addr ffff8881c8f1ff80 by task syz-executor.3/7816 CPU: 1 PID: 7816 Comm: syz-executor.3 Tainted: G W 5.4.61-syzkaller-00873-ge15cc541b749 #0 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+0x14a/0x1ce lib/dump_stack.c:118 print_address_description+0x93/0x620 mm/kasan/report.c:374 __kasan_report+0x16d/0x1e0 mm/kasan/report.c:506 kasan_report+0x36/0x60 mm/kasan/common.c:634 ex_handler_refcount+0x14b/0x170 arch/x86/mm/extable.c:57 fixup_exception+0x92/0xd0 arch/x86/mm/extable.c:228 do_trap_no_signal arch/x86/kernel/traps.c:207 [inline] do_trap+0x148/0x340 arch/x86/kernel/traps.c:251 do_error_trap arch/x86/kernel/traps.c:278 [inline] do_invalid_op+0xfb/0x110 arch/x86/kernel/traps.c:291 invalid_op+0x1e/0x30 arch/x86/entry/entry_64.S:1029 RIP: 0010:csum_partial_copy_generic+0xa2e/0x3ed0 Code: 0f 0b 49 8d 0f 0f 0b 49 8d 4d f4 0f 0b 48 8d 4d 00 0f 0b 49 8d 0e 0f 0b 49 8d 0e 0f 0b 49 8d 0f 0f 0b 48 8d 08 0f 0b 49 8d 0f <0f> 0b 49 8d 8c 24 b0 00 00 00 0f 0b 48 8d 8b 94 00 00 00 0f 0b 48 RSP: 0018:ffff888151e67e38 EFLAGS: 00010296 RAX: 7ea9d40f31b68a00 RBX: ffff8881c722ac08 RCX: ffff8881c8f1ff80 RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff8881c8f1ff88 RBP: dffffc0000000000 R08: 0000000000000010 R09: ffff888151e67d80 R10: ffffed10391e3ff2 R11: 0000000000000000 R12: ffff8881c722ab40 R13: 1ffff1103b2fd610 R14: 00000000000e0003 R15: ffff8881c8f1ff80 __fput+0x27d/0x6c0 fs/file_table.c:280 task_work_run+0x176/0x1a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:163 [inline] prepare_exit_to_usermode+0x286/0x2e0 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007faa40063c78 EFLAGS: 00000246 ORIG_RAX: 00000000000000e9 RAX: 0000000000000000 RBX: 0000000000002ac0 RCX: 000000000045d5b9 RDX: 0000000000000005 RSI: 0000000000000001 RDI: 000000000000000f RBP: 000000000118cf88 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffe212b65df R14: 00007faa400649c0 R15: 000000000118cf4c Allocated by task 7816: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] __kasan_kmalloc+0x12c/0x1c0 mm/kasan/common.c:510 kmem_cache_alloc_trace+0xc3/0x280 mm/slub.c:2820 kmalloc include/linux/slab.h:556 [inline] do_eventfd+0x81/0x250 fs/eventfd.c:418 __do_sys_eventfd2 fs/eventfd.c:438 [inline] __se_sys_eventfd2 fs/eventfd.c:436 [inline] __x64_sys_eventfd2+0x56/0x60 fs/eventfd.c:436 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 7815: save_stack mm/kasan/common.c:69 [inline] set_track mm/kasan/common.c:77 [inline] kasan_set_free_info mm/kasan/common.c:332 [inline] __kasan_slab_free+0x181/0x230 mm/kasan/common.c:471 slab_free_hook mm/slub.c:1443 [inline] slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1476 slab_free mm/slub.c:3041 [inline] kfree+0x12b/0x600 mm/slub.c:4002 eventfd_free_ctx fs/eventfd.c:94 [inline] eventfd_free fs/eventfd.c:101 [inline] kref_put include/linux/kref.h:65 [inline] eventfd_ctx_put fs/eventfd.c:113 [inline] eventfd_release+0xbb/0xe0 fs/eventfd.c:122 __fput+0x27d/0x6c0 fs/file_table.c:280 task_work_run+0x176/0x1a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:163 [inline] prepare_exit_to_usermode+0x286/0x2e0 arch/x86/entry/common.c:194 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8881c8f1ff80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff8881c8f1ff80, ffff8881c8f1ffc0) The buggy address belongs to the page: page:ffffea000723c7c0 refcount:1 mapcount:0 mapping:ffff8881da803180 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881da803180 raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c8f1fe80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881c8f1ff00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881c8f1ff80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881c8f20000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc ffff8881c8f20080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================