From: Andreas Gruenbacher <agruenba@redhat.com> mainline inclusion from mainline-v7.0-rc1 commit 22150a7d401d9e9169b9b68e05bed95f7f49bf69 category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/15128 CVE: CVE-2026-45861 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- Commit a475c5dd16e5 ("gfs2: Free quota data objects synchronously") started freeing quota data objects during filesystem shutdown instead of putting them back onto the LRU list, but it failed to remove these objects from the LRU list, causing LRU list corruption. This caused use-after-free when the shrinker (gfs2_qd_shrink_scan) tried to access already-freed objects on the LRU list. Fix this by removing qd objects from the LRU list before freeing them in qd_put(). Initial fix from Deepanshu Kartikey <kartikey406@gmail.com>. Fixes: a475c5dd16e5 ("gfs2: Free quota data objects synchronously") Reported-by: syzbot+046b605f01802054bff0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=046b605f01802054bff0 Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Conflicts: fs/gfs2/quota.c [lhb: context conflict] Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- fs/gfs2/quota.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 1b2b36fad5d4..04e8bdbddec6 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -336,6 +336,7 @@ static void qd_put(struct gfs2_quota_data *qd) lockref_mark_dead(&qd->qd_lockref); spin_unlock(&qd->qd_lockref.lock); + list_lru_del(&gfs2_qd_lru, &qd->qd_lru); gfs2_qd_dispose(qd); return; } -- 2.34.1