audit: type=1804 audit(1677638120.823:3): pid=10364 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.2" name="/root/syzkaller-testdir2097423786/syzkaller.6kdXeA/52/bus/bus" dev="loop2" ino=4 res=1 ================================================================== audit: type=1804 audit(1677638120.823:4): pid=10364 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="ToMToU" comm="syz-executor.2" name="/root/syzkaller-testdir2097423786/syzkaller.6kdXeA/52/bus/bus" dev="loop2" ino=4 res=1 BUG: KASAN: slab-out-of-bounds in __roll_back_blkaddrs fs/f2fs/file.c:1001 [inline] BUG: KASAN: slab-out-of-bounds in __exchange_data_block+0x2dbc/0x30a0 fs/f2fs/file.c:1137 Read of size 4 at addr ffff88804b775220 by task syz-executor.2/10364 CPU: 0 PID: 10364 Comm: syz-executor.2 Not tainted 4.14.307-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023 XFS (loop5): Mounting V4 Filesystem Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:251 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:350 kasan_report mm/kasan/report.c:408 [inline] __asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:428 XFS (loop5): totally zeroed log __roll_back_blkaddrs fs/f2fs/file.c:1001 [inline] __exchange_data_block+0x2dbc/0x30a0 fs/f2fs/file.c:1137 XFS (loop5): Ending clean mount f2fs_insert_range fs/f2fs/file.c:1404 [inline] f2fs_fallocate+0x1368/0x26f0 fs/f2fs/file.c:1501 vfs_fallocate+0x346/0x790 fs/open.c:319 SYSC_fallocate fs/open.c:342 [inline] SyS_fallocate+0x4a/0x80 fs/open.c:336 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f9f53bcb0f9 RSP: 002b:00007f9f5213d168 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f9f53ceaf80 RCX: 00007f9f53bcb0f9 RDX: 0000000000000000 RSI: 0000000000000020 RDI: 0000000000000007 RBP: 00007f9f53c26ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000ff8000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd98ada46f R14: 00007f9f5213d300 R15: 0000000000022000 Allocated by task 10364: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x84/0xc0 mm/util.c:432 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] __exchange_data_block+0x132/0x30a0 fs/f2fs/file.c:1111 f2fs_insert_range fs/f2fs/file.c:1404 [inline] f2fs_fallocate+0x1368/0x26f0 fs/f2fs/file.c:1501 vfs_fallocate+0x346/0x790 fs/open.c:319 SYSC_fallocate fs/open.c:342 [inline] SyS_fallocate+0x4a/0x80 fs/open.c:336 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88804b771280 which belongs to the cache kmalloc-16384 of size 16384 The buggy address is located 16288 bytes inside of 16384-byte region [ffff88804b771280, ffff88804b775280) The buggy address belongs to the page: page:ffffea00012ddc00 count:1 mapcount:0 mapping:ffff88804b771280 index:0x0 compound_mapcount: 0 flags: 0xfff00000008100(slab|head) raw: 00fff00000008100 ffff88804b771280 0000000000000000 0000000100000001 raw: ffffea00012de620 ffff88813fe64c48 ffff88813fe65200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804b775100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804b775180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804b775200: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804b775280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88804b775300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================