]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gfs2: check for empty rgrp tree in gfs2_ri_update
authorBob Peterson <rpeterso@redhat.com>
Tue, 24 Nov 2020 15:44:36 +0000 (10:44 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Wed, 25 Nov 2020 17:10:55 +0000 (18:10 +0100)
commit778721510e84209f78e31e2ccb296ae36d623f5e
tree96707ce63859f1cd210625c8b9da7701190d907a
parent515b269d5bd29a986d5e1c0a0cba87fa865a48b4
gfs2: check for empty rgrp tree in gfs2_ri_update

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>
fs/gfs2/rgrp.c