From: Dominique Martinet <asmadeus@codewreck.org>
To: Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: "Linux regression tracking (Thorsten Leemhuis)"
<regressions@leemhuis.info>,
v9fs@lists.linux.dev, linux-kernel@vger.kernel.org,
Dominique Martinet <asmadeus@codewreck.org>,
Will Deacon <will@kernel.org>,
stable@vger.kernel.org
Subject: [PATCH 3/4] Revert "fs/9p: fix uaf in in v9fs_stat2inode_dotl"
Date: Thu, 24 Oct 2024 08:52:12 +0900 [thread overview]
Message-ID: <20241024-revert_iget-v1-3-4cac63d25f72@codewreck.org> (raw)
In-Reply-To: <20241024-revert_iget-v1-0-4cac63d25f72@codewreck.org>
This reverts commit 11763a8598f888dec631a8a903f7ada32181001f.
This is a requirement to revert commit 724a08450f74 ("fs/9p: simplify
iget to remove unnecessary paths"), see that revert for details.
Fixes: 724a08450f74 ("fs/9p: simplify iget to remove unnecessary paths")
Reported-by: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20240923100508.GA32066@willie-the-truck
Cc: stable@vger.kernel.org # v6.9+
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
---
fs/9p/vfs_inode_dotl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 2b313fe7003e..ef9db3e03506 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -78,11 +78,11 @@ struct inode *v9fs_fid_iget_dotl(struct super_block *sb, struct p9_fid *fid)
retval = v9fs_init_inode(v9ses, inode, &fid->qid,
st->st_mode, new_decode_dev(st->st_rdev));
- v9fs_stat2inode_dotl(st, inode, 0);
kfree(st);
if (retval)
goto error;
+ v9fs_stat2inode_dotl(st, inode, 0);
v9fs_set_netfs_context(inode);
v9fs_cache_inode_get_cookie(inode);
retval = v9fs_get_acl(inode, fid);
--
2.46.0
next prev parent reply other threads:[~2024-10-23 23:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 23:52 [PATCH 0/4] 9p: revert broken inode lookup simplifications Dominique Martinet
2024-10-23 23:52 ` [PATCH 1/4] Revert " fs/9p: mitigate inode collisions" Dominique Martinet
2024-10-23 23:52 ` [PATCH 2/4] Revert "fs/9p: remove redundant pointer v9ses" Dominique Martinet
2024-10-23 23:52 ` Dominique Martinet [this message]
2024-10-23 23:52 ` [PATCH 4/4] Revert "fs/9p: simplify iget to remove unnecessary paths" Dominique Martinet
2024-10-24 12:16 ` [PATCH 0/4] 9p: revert broken inode lookup simplifications Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241024-revert_iget-v1-3-4cac63d25f72@codewreck.org \
--to=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=regressions@leemhuis.info \
--cc=stable@vger.kernel.org \
--cc=v9fs@lists.linux.dev \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).