From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: Edward Adam Davis <eadavis@qq.com>,
syzbot+01cf2dbcbe2022454388@syzkaller.appspotmail.com
Cc: jfs-discussion@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] jfs: fix uaf in jfs_evict_inode
Date: Wed, 1 Nov 2023 10:48:25 -0500 [thread overview]
Message-ID: <e3c0e7aa-2ee5-4958-99c5-74c25c3869e4@oracle.com> (raw)
In-Reply-To: <tencent_69E996EDCACDBC79A66CB02F956C3494D80A@qq.com>
On 10/31/23 12:39AM, Edward Adam Davis wrote:
> When the execution of diMount(ipimap) fails, the object ipimap that has been
> released may be accessed in diFreeSpecial(). Asynchronous ipimap release occurs
> when rcu_core() calls jfs_free_node().
>
> Therefore, when diMount(ipimap) fails, sbi->ipimap should not be initialized as
> ipimap.
>
> Reported-and-tested-by: syzbot+01cf2dbcbe2022454388@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Looks good.
Thanks,
Shaggy
> ---
> fs/jfs/jfs_mount.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/jfs/jfs_mount.c b/fs/jfs/jfs_mount.c
> index 415eb65a36ff..9b5c6a20b30c 100644
> --- a/fs/jfs/jfs_mount.c
> +++ b/fs/jfs/jfs_mount.c
> @@ -172,15 +172,15 @@ int jfs_mount(struct super_block *sb)
> }
> jfs_info("jfs_mount: ipimap:0x%p", ipimap);
>
> - /* map further access of per fileset inodes by the fileset inode */
> - sbi->ipimap = ipimap;
> -
> /* initialize fileset inode allocation map */
> if ((rc = diMount(ipimap))) {
> jfs_err("jfs_mount: diMount failed w/rc = %d", rc);
> goto err_ipimap;
> }
>
> + /* map further access of per fileset inodes by the fileset inode */
> + sbi->ipimap = ipimap;
> +
> return rc;
>
> /*
prev parent reply other threads:[~2023-11-01 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 5:15 [syzbot] [jfs?] KASAN: slab-use-after-free Read in jfs_evict_inode syzbot
2023-10-31 5:39 ` [PATCH] jfs: fix uaf " Edward Adam Davis
2023-11-01 15:48 ` Dave Kleikamp [this message]
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=e3c0e7aa-2ee5-4958-99c5-74c25c3869e4@oracle.com \
--to=dave.kleikamp@oracle.com \
--cc=eadavis@qq.com \
--cc=jfs-discussion@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+01cf2dbcbe2022454388@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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).