netlink: 'syz.0.0': attribute type 10 has an invalid length. syz_tun: entered promiscuous mode bond0: (slave syz_tun): Enslaving as an active interface with an up link ================================================================== BUG: KASAN: use-after-free in ext4_ext_insert_extent+0x41b6/0x4af0 fs/ext4/extents.c:2086 Read of size 4 at addr ffff88801fdf1c18 by task syz.0.0/5333 CPU: 0 UID: 0 PID: 5333 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ext4_ext_insert_extent+0x41b6/0x4af0 fs/ext4/extents.c:2086 ext4_ext_map_blocks+0x19ef/0x69c0 fs/ext4/extents.c:4404 ext4_map_create_blocks fs/ext4/inode.c:613 [inline] ext4_map_blocks+0x82c/0x16f0 fs/ext4/inode.c:816 _ext4_get_block+0x1fa/0x4c0 fs/ext4/inode.c:916 ext4_get_block_unwritten+0x2e/0x100 fs/ext4/inode.c:949 ext4_block_write_begin+0xb03/0x1940 fs/ext4/inode.c:1203 ext4_write_begin+0xb3a/0x1860 fs/ext4/ext4_jbd2.h:-1 ext4_da_write_begin+0x352/0xd30 fs/ext4/inode.c:3130 generic_perform_write+0x2c5/0x900 mm/filemap.c:4314 ext4_buffered_write_iter+0xce/0x3a0 fs/ext4/file.c:299 ext4_file_write_iter+0x292/0x1bc0 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7efc6b58f7c9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007efc6c41e038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007efc6b7e6090 RCX: 00007efc6b58f7c9 RDX: 00000000fffffdef RSI: 00002000000000c0 RDI: 000000000000000c RBP: 00007efc6b613f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007efc6b7e6128 R14: 00007efc6b7e6090 R15: 00007ffe6e7aab48 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1fdf1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea00007f7c48 ffffea00007f7c48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 6, migratetype Movable, gfp_mask 0x8(__GFP_MOVABLE), pid 30, tgid 30 (kcompactd0), ts 76320582903, free_ts 76320595291 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 mark_allocated_noprof mm/compaction.c:85 [inline] release_free_list+0x1cb/0x250 mm/compaction.c:107 compact_zone+0x3f84/0x4760 mm/compaction.c:2725 compact_node+0x1d2/0x280 mm/compaction.c:2916 kcompactd+0xba8/0x1250 mm/compaction.c:3214 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 page last free pid 30 tgid 30 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_pages_ok+0xa83/0xbe0 mm/page_alloc.c:1582 release_free_list+0x1de/0x250 mm/compaction.c:108 compact_zone+0x3f84/0x4760 mm/compaction.c:2725 compact_node+0x1d2/0x280 mm/compaction.c:2916 kcompactd+0xba8/0x1250 mm/compaction.c:3214 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Memory state around the buggy address: ffff88801fdf1b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801fdf1b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88801fdf1c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88801fdf1c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88801fdf1d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================