Commit 17d64568 authored by Osama Muhammad's avatar Osama Muhammad Committed by Baokun Li
Browse files

gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump

stable inclusion
from stable-v5.10.209
commit 5c28478af371a1c3fdb570ca67f110e1ae60fc37
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I932W3
CVE: CVE-2023-52448

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5c28478af371a1c3fdb570ca67f110e1ae60fc37



--------------------------------

[ Upstream commit 8877243beafa7c6bfc42022cbfdf9e39b25bd4fa ]

Syzkaller has reported a NULL pointer dereference when accessing
rgd->rd_rgl in gfs2_rgrp_dump().  This can happen when creating
rgd->rd_gl fails in read_rindex_entry().  Add a NULL pointer check in
gfs2_rgrp_dump() to prevent that.

Reported-and-tested-by: default avatar <syzbot+da0fc229cc1ff4bb2e6d@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?extid=da0fc229cc1ff4bb2e6d


Fixes: 72244b6b ("gfs2: improve debug information when lvb mismatches are found")
Signed-off-by: default avatarOsama Muhammad <osmtendev@gmail.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent 87e496fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment