EXT4-fs error (device loop7): htree_dirblock_to_tree:1112: inode #2: block 13: comm syz.7.9275: bad entry in directory: rec_len % 4 != 0 - offset=108, inode=17, rec_len=3657, size=1024 fake=0 ================================================================== BUG: KCSAN: data-race in _prb_read_valid / prb_reserve write to 0xffffffff8673b5b8 of 8 bytes by task 29946 on cpu 1: prb_reserve+0x740/0xb60 vprintk_store+0x558/0x870 kernel/printk/printk.c:2326 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408 vprintk_default+0x26/0x30 kernel/printk/printk.c:2447 vprintk+0x75/0x80 kernel/printk/printk_safe.c:86 _printk+0x7a/0xa0 kernel/printk/printk.c:2457 batadv_hardif_enable_interface+0x3b8/0x640 net/batman-adv/hard-interface.c:751 batadv_softif_slave_add+0x62/0xd0 net/batman-adv/soft-interface.c:844 do_set_master net/core/rtnetlink.c:2917 [inline] rtnl_newlink_create+0x4e9/0x5d0 net/core/rtnetlink.c:3803 __rtnl_newlink net/core/rtnetlink.c:3897 [inline] rtnl_newlink+0xe9f/0x1250 net/core/rtnetlink.c:4012 rtnetlink_rcv_msg+0x651/0x710 net/core/rtnetlink.c:6922 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2542 rtnetlink_rcv+0x1c/0x30 net/core/rtnetlink.c:6949 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:726 ____sys_sendmsg+0x312/0x410 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x19d/0x230 net/socket.c:2669 __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2672 x64_sys_call+0x2734/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffffff8673b5b8 of 8 bytes by task 29943 on cpu 0: desc_read kernel/printk/printk_ringbuffer.c:486 [inline] desc_read_finalized_seq kernel/printk/printk_ringbuffer.c:1874 [inline] prb_read kernel/printk/printk_ringbuffer.c:1922 [inline] _prb_read_valid+0x1ec/0xba0 kernel/printk/printk_ringbuffer.c:2113 desc_update_last_finalized kernel/printk/printk_ringbuffer.c:1515 [inline] prb_final_commit+0x144/0x1f0 kernel/printk/printk_ringbuffer.c:1782 vprintk_store+0x75d/0x870 kernel/printk/printk.c:2352 vprintk_emit+0x15e/0x680 kernel/printk/printk.c:2408 vprintk_default+0x26/0x30 kernel/printk/printk.c:2447 vprintk+0x75/0x80 kernel/printk/printk_safe.c:86 _printk+0x7a/0xa0 kernel/printk/printk.c:2457 __ext4_error_inode+0x30b/0x400 fs/ext4/super.c:856 __ext4_check_dir_entry+0x478/0x500 fs/ext4/dir.c:117 htree_dirblock_to_tree+0x272/0x630 fs/ext4/namei.c:1109 ext4_htree_fill_tree+0x423/0x9b0 fs/ext4/namei.c:1220 ext4_dx_readdir fs/ext4/dir.c:598 [inline] ext4_readdir+0x1653/0x1ba0 fs/ext4/dir.c:143 iterate_dir+0x11d/0x310 fs/readdir.c:108 get_name fs/exportfs/expfs.c:325 [inline] exportfs_get_name+0x235/0x2a0 fs/exportfs/expfs.c:36 reconnect_one fs/exportfs/expfs.c:142 [inline] reconnect_path+0x15a/0x3f0 fs/exportfs/expfs.c:222 exportfs_decode_fh_raw+0x249/0x4d0 fs/exportfs/expfs.c:485 do_handle_to_path+0x68/0xd0 fs/fhandle.c:267 handle_to_path fs/fhandle.c:387 [inline] do_handle_open+0x4b4/0x580 fs/fhandle.c:405 __do_sys_open_by_handle_at fs/fhandle.c:446 [inline] __se_sys_open_by_handle_at fs/fhandle.c:437 [inline] __x64_sys_open_by_handle_at+0x46/0x50 fs/fhandle.c:437 x64_sys_call+0x2cca/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:305 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x0000000000003e6d -> 0x0000000000005e6d Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 29943 Comm: syz.7.9275 Not tainted 6.13.0-rc6-syzkaller-00290-gbe548645527a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ==================================================================