From: Joseph Qi <joseph.qi@linux.alibaba.com>
To: Lizhi Xu <lizhi.xu@windriver.com>, akpm <akpm@linux-foundation.org>
Cc: heming.zhao@suse.com, jlbec@evilplan.org,
linux-kernel@vger.kernel.org, mark@fasheh.com,
ocfs2-devel@lists.linux.dev,
syzbot+ab134185af9ef88dfed5@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH V4 2/2] ocfs2: Fix possible null-ptr-deref in ocfs2_set_buffer_uptodate
Date: Wed, 21 Aug 2024 15:59:20 +0800 [thread overview]
Message-ID: <b1e6e5af-696c-4bfb-a233-7a0821246ce4@linux.alibaba.com> (raw)
In-Reply-To: <20240821061450.3478602-1-lizhi.xu@windriver.com>
On 8/21/24 2:14 PM, Lizhi Xu wrote:
> When doing cleanup, if flags without OCFS2_BH_READAHEAD, it may trigger
> NULL pointer dereference in the following ocfs2_set_buffer_uptodate() if
> bh is NULL.
>
> Reported-and-suggested-by: Heming Zhao <heming.zhao@suse.com>
> Signed-off-by: Lizhi Xu <lizhi.xu@windriver.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
> ---
> V3 -> V4: Update comments and subject
>
> fs/ocfs2/buffer_head_io.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ocfs2/buffer_head_io.c b/fs/ocfs2/buffer_head_io.c
> index e62c7e1de4eb..8f714406528d 100644
> --- a/fs/ocfs2/buffer_head_io.c
> +++ b/fs/ocfs2/buffer_head_io.c
> @@ -388,7 +388,8 @@ int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr,
> /* Always set the buffer in the cache, even if it was
> * a forced read, or read-ahead which hasn't yet
> * completed. */
> - ocfs2_set_buffer_uptodate(ci, bh);
> + if (bh)
> + ocfs2_set_buffer_uptodate(ci, bh);
> }
> ocfs2_metadata_cache_io_unlock(ci);
>
next prev parent reply other threads:[~2024-08-21 7:59 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-18 17:06 [syzbot] [ocfs2?] WARNING: bad unlock balance in ocfs2_read_blocks syzbot
2024-08-19 2:01 ` [syzbot] " syzbot
2024-08-19 2:51 ` [PATCH] ocfs2: remove unreasonable unlock Lizhi Xu
2024-08-20 4:04 ` heming.zhao
2024-08-20 5:59 ` Lizhi Xu
2024-08-20 6:55 ` [PATCH V2 1/2] " Lizhi Xu
2024-08-20 6:55 ` [PATCH V2 2/2] ocfs2: Fix uaf in ocfs2_read_blocks Lizhi Xu
2024-08-20 7:15 ` Heming Zhao
2024-08-20 7:37 ` [PATCH V3] ocfs2: Fix uaf in ocfs2_set_buffer_uptodate Lizhi Xu
2024-08-20 8:32 ` Heming Zhao
2024-08-20 9:45 ` [PATCH V3 1/2] ocfs2: remove unreasonable unlock Lizhi Xu
2024-08-20 9:45 ` [PATCH V3 2/2] ocfs2: Fix uaf in ocfs2_set_buffer_uptodate Lizhi Xu
2024-08-20 11:32 ` Heming Zhao
2024-08-20 13:44 ` [PATCH] ocfs2: remove unreasonable unlock Lizhi Xu
2024-08-21 0:08 ` [PATCH V3 2/2] ocfs2: Fix uaf in ocfs2_set_buffer_uptodate Joseph Qi
2024-08-21 2:34 ` Joseph Qi
2024-08-21 2:39 ` Heming Zhao
2024-08-21 5:55 ` Lizhi Xu
2024-08-21 6:14 ` [PATCH V4 2/2] ocfs2: Fix possible null-ptr-deref " Lizhi Xu
2024-08-21 6:23 ` heming.zhao
2024-08-21 6:55 ` Lizhi Xu
2024-08-21 7:37 ` heming.zhao
2024-08-21 7:58 ` Joseph Qi
2024-08-21 9:14 ` Lizhi Xu
2024-08-21 11:40 ` Heming Zhao
2024-08-21 21:39 ` Andrew Morton
2024-09-02 0:54 ` Andrew Morton
2024-09-02 1:03 ` Heming Zhao
2024-09-02 2:20 ` Joseph Qi
2024-09-02 14:23 ` Lizhi Xu
2024-08-21 7:59 ` Joseph Qi [this message]
2024-08-20 23:55 ` [PATCH V3 1/2] ocfs2: remove unreasonable unlock Joseph Qi
2024-08-20 7:28 ` [PATCH V2 " Heming Zhao
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=b1e6e5af-696c-4bfb-a233-7a0821246ce4@linux.alibaba.com \
--to=joseph.qi@linux.alibaba.com \
--cc=akpm@linux-foundation.org \
--cc=heming.zhao@suse.com \
--cc=jlbec@evilplan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizhi.xu@windriver.com \
--cc=mark@fasheh.com \
--cc=ocfs2-devel@lists.linux.dev \
--cc=syzbot+ab134185af9ef88dfed5@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
all inboxes | Powered by JetHome®