Re: [syzbot] [v9fs?] UBSAN: shift-out-of-bounds in v9fs_get_tree

Edward Adam Davis
2025-08-22T14:33:54Z

#syz test

diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index f6065b5e0e5d..cc2056dd0bef 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -50,7 +50,7 @@ static int v9fs_fill_super(struct super_block *sb, struct fs_context *fc)
{
int ret;
struct v9fs_context *ctx = fc->fs_private;
- struct v9fs_session_info *v9ses = &ctx->v9ses;
+ struct v9fs_session_info *v9ses = sb->s_fs_info;

sb->s_maxbytes = MAX_LFS_FILESIZE;
sb->s_blocksize_bits = fls(v9ses->maxdata - 1);