Re: [syzbot] [PATCH] Test np in autofs_fill_super
From: syzbot
Date: Mon Nov 13 2023 - 21:18:02 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.
***
Subject: [PATCH] Test np in autofs_fill_super
Author: eadavis@xxxxxx
please test null ptr in autofs_fill_super
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 4bbdb725a36b
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c
index a5083d447a62..f2e89a444edf 100644
--- a/fs/autofs/inode.c
+++ b/fs/autofs/inode.c
@@ -331,6 +331,9 @@ static int autofs_fill_super(struct super_block *s, struct fs_context *fc)
goto fail;
root_inode = autofs_get_inode(s, S_IFDIR | 0755);
+ if (!root_inode)
+ goto fail;
+
root_inode->i_uid = ctx->uid;
root_inode->i_gid = ctx->gid;