protocol 88fb is buggy, dev hsr_slave_0 ================================================================== BUG: KASAN: use-after-free in relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 Read of size 8 at addr ffff888050983898 by task syz-executor.5/32116 CPU: 0 PID: 32116 Comm: syz-executor.5 Not tainted 4.19.50 #22 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+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 relay_switch_subbuf+0x8be/0x920 kernel/relay.c:755 relay_reserve include/linux/relay.h:261 [inline] trace_note.isra.0+0x5b8/0x6e0 kernel/trace/blktrace.c:93 trace_note_tsk kernel/trace/blktrace.c:124 [inline] __blk_add_trace+0xb70/0xe10 kernel/trace/blktrace.c:264 blk_add_trace_bio_remap+0x347/0x4b0 kernel/trace/blktrace.c:1010 trace_block_bio_remap include/trace/events/block.h:559 [inline] blk_partition_remap block/blk-core.c:2237 [inline] generic_make_request_checks+0x16ea/0x24c0 block/blk-core.c:2277 generic_make_request+0x24c/0x12d0 block/blk-core.c:2404 submit_bio+0xba/0x480 block/blk-core.c:2569 submit_bh_wbc+0x5dc/0x790 fs/buffer.c:3095 submit_bh fs/buffer.c:3101 [inline] __sync_dirty_buffer+0x111/0x2e0 fs/buffer.c:3187 sync_dirty_buffer+0x1b/0x20 fs/buffer.c:3200 __ext4_handle_dirty_metadata+0x237/0x570 fs/ext4/ext4_jbd2.c:300 ext4_handle_dirty_dirent_node+0x3cf/0x4f0 fs/ext4/namei.c:389 add_dirent_to_buf+0x410/0x680 fs/ext4/namei.c:1896 ext4_add_entry+0x5cc/0xb70 fs/ext4/namei.c:2087 ext4_add_nondir+0x28/0x90 fs/ext4/namei.c:2416 ext4_create+0x2dc/0x5e0 fs/ext4/namei.c:2458 lookup_open+0x12d5/0x1b10 fs/namei.c:3234 do_last fs/namei.c:3324 [inline] path_openat+0x149a/0x4690 fs/namei.c:3534 do_filp_open+0x1a1/0x280 fs/namei.c:3564 do_sys_open+0x3fe/0x550 fs/open.c:1069 ksys_open include/linux/syscalls.h:1276 [inline] __do_sys_creat fs/open.c:1127 [inline] __se_sys_creat fs/open.c:1125 [inline] __x64_sys_creat+0x61/0x80 fs/open.c:1125 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4592c9 Code: fd b7 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 cb b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6a61f47c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00000000004592c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000340 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f6a61f486d4 R13: 00000000004bf8c8 R14: 00000000004d1100 R15: 00000000ffffffff Allocated by task 27647: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3559 __d_alloc+0x2e/0x9c0 fs/dcache.c:1610 d_alloc+0x4d/0x280 fs/dcache.c:1694 __lookup_hash+0xcd/0x190 fs/namei.c:1542 filename_create+0x1a7/0x4f0 fs/namei.c:3636 user_path_create fs/namei.c:3693 [inline] do_symlinkat+0xf3/0x290 fs/namei.c:4146 __do_sys_symlink fs/namei.c:4172 [inline] __se_sys_symlink fs/namei.c:4170 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4170 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 18: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3765 __d_free+0x20/0x30 fs/dcache.c:257 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 The buggy address belongs to the object at ffff888050983840 which belongs to the cache dentry(65:syz5) of size 288 The buggy address is located 88 bytes inside of 288-byte region [ffff888050983840, ffff888050983960) The buggy address belongs to the page: page:ffffea00014260c0 count:1 mapcount:0 mapping:ffff8880a527d640 index:0x0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffffea00020f9c48 ffffea0001422a08 ffff8880a527d640 raw: 0000000000000000 ffff888050983000 000000010000000b ffff88805d4ee680 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88805d4ee680 Memory state around the buggy address: ffff888050983780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888050983800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888050983880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888050983900: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888050983980: fc fc fc fc fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================