linux/fs/gfs2
Juntong Deng bdcb8aa434 gfs2: Fix slab-use-after-free in gfs2_qd_dealloc
In gfs2_put_super(), whether withdrawn or not, the quota should
be cleaned up by gfs2_quota_cleanup().

Otherwise, struct gfs2_sbd will be freed before gfs2_qd_dealloc (rcu
callback) has run for all gfs2_quota_data objects, resulting in
use-after-free.

Also, gfs2_destroy_threads() and gfs2_quota_cleanup() is already called
by gfs2_make_fs_ro(), so in gfs2_put_super(), after calling
gfs2_make_fs_ro(), there is no need to call them again.

Reported-by: syzbot+29c47e9e51895928698c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=29c47e9e51895928698c
Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2023-11-06 01:51:26 +01:00
..
acl.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
acl.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
aops.c gfs2: Convert gfs2_internal_read to folios 2023-11-06 01:51:26 +01:00
aops.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
bmap.c gfs2: Get rid of gfs2_alloc_blocks generation parameter 2023-11-06 01:51:25 +01:00
bmap.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
dentry.c Reinstate "GFS2: free disk inode which is deleted by remote node -V2" 2023-03-23 19:37:56 +01:00
dir.c gfs2: Get rid of gfs2_alloc_blocks generation parameter 2023-11-06 01:51:25 +01:00
dir.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
export.c Change calling conventions for filldir_t 2022-08-17 17:25:04 -04:00
file.c gfs2: Clean up gfs2_alloc_parms initializers 2023-11-02 20:10:00 +01:00
gfs2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
glock.c gfs2: fix glock shrinker ref issues 2023-09-18 16:00:50 +02:00
glock.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
glops.c gfs2: Remove freeze_go_demote_ok 2023-09-18 23:13:21 +02:00
glops.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
incore.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
inode.c gfs2: Silence "suspicious RCU usage in gfs2_permission" warning 2023-11-06 01:51:26 +01:00
inode.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
lock_dlm.c gfs2: Remove LM_FLAG_PRIORITY flag 2023-09-05 15:58:16 +02:00
log.c gfs2: Sanitize kthread stopping 2023-09-05 15:58:17 +02:00
log.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
lops.c gfs2: Use mapping->gfp_mask for metadata inodes 2023-09-05 15:58:15 +02:00
lops.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
main.c gfs2: Rename "freeze_workqueue" to "gfs2_freeze" 2023-09-05 15:58:17 +02:00
Makefile
meta_io.c gfs2: replace obvious uses of b_page with b_folio 2023-01-18 17:12:40 -08:00
meta_io.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
ops_fstype.c gfs2: Rename gfs2_lookup_{ simple => meta } 2023-11-06 01:51:26 +01:00
quota.c gfs2: Clean up quota.c:print_message 2023-11-02 20:10:00 +01:00
quota.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
recovery.c gfs2: Rename "gfs_recovery" workqueue to "gfs2_recovery" 2023-09-05 15:58:17 +02:00
recovery.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
rgrp.c gfs2: Get rid of gfs2_alloc_blocks generation parameter 2023-11-06 01:51:25 +01:00
rgrp.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
super.c gfs2: Fix slab-use-after-free in gfs2_qd_dealloc 2023-11-06 01:51:26 +01:00
super.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
sys.c gfs2 fixes 2023-09-05 13:00:28 -07:00
sys.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
trace_gfs2.h gfs2: Remove 'first' trace_gfs2_promote argument 2021-10-25 08:42:19 +02:00
trans.c gfs2: Fix freeze consistency check in gfs2_trans_add_meta 2023-08-07 18:40:51 +02:00
trans.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
util.c gfs2: Fix withdraw race 2023-09-05 15:58:17 +02:00
util.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00
xattr.c gfs2: Get rid of gfs2_alloc_blocks generation parameter 2023-11-06 01:51:25 +01:00
xattr.h gfs2: No longer use 'extern' in function declarations 2023-11-06 01:51:26 +01:00