linux-stable/fs/gfs2
Bob Peterson cd928d387b gfs2: check for empty rgrp tree in gfs2_ri_update
commit 778721510e upstream.

If gfs2 tries to mount a (corrupt) file system that has no resource
groups it still tries to set preferences on the first one, which causes
a kernel null pointer dereference. This patch adds a check to function
gfs2_ri_update so this condition is detected and reported back as an
error.

Reported-by: syzbot+e3f23ce40269a4c9053a@syzkaller.appspotmail.com
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-11 13:23:32 +01:00
..
acl.c
acl.h
aops.c
aops.h
bmap.c gfs2: Never call gfs2_block_zero_range with an open transaction 2020-08-26 10:40:48 +02:00
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c
gfs2.h
glock.c gfs2: Wake up when sd_glock_disposal becomes zero 2020-11-10 12:37:27 +01:00
glock.h
glops.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:40:33 +02:00
glops.h
incore.h gfs2: use-after-free in sysfs deregistration 2020-11-05 11:43:21 +01:00
inode.c gfs2: clean up iopen glock mess in gfs2_create_inode 2020-10-01 13:17:20 +02:00
inode.h
Kconfig
lock_dlm.c
log.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:40:33 +02:00
log.h
lops.c
lops.h
main.c
Makefile
meta_io.c
meta_io.h
ops_fstype.c gfs2: add validation checks for size of superblock 2020-11-05 11:43:21 +01:00
quota.c
quota.h
recovery.c
recovery.h
rgrp.c gfs2: check for empty rgrp tree in gfs2_ri_update 2020-12-11 13:23:32 +01:00
rgrp.h
super.c gfs2: Add missing truncate_inode_pages_final for sd_aspace 2020-11-18 19:20:22 +01:00
super.h
sys.c gfs2: use-after-free in sysfs deregistration 2020-11-05 11:43:21 +01:00
sys.h
trace_gfs2.h
trans.c gfs2: initialize transaction tr_ailX_lists earlier 2020-09-23 12:40:33 +02:00
trans.h
util.c
util.h
xattr.c
xattr.h