HomeFreeBSD

Linux: Fix zfs_prune panics

Description

Linux: Fix zfs_prune panics

by protecting against sb->s_shrink eviction on umount with newer kernels

deactivate_locked_super calls shrinker_free and only then
sops->kill_sb cb, resulting in UAF on umount when trying
to reach for the shrinker functions in zpl_prune_sb of
in-umount dataset

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Adam Moss <c@yotes.com>
Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
Closes #16770

Details

Provenance
Pavel Snajdr <snajpa@snajpa.net>Authored on Nov 21 2024, 11:30 PM
GitHub <noreply@github.com>Committed on Nov 21 2024, 11:30 PM
Parents
rGae1d11882d10: BRT: Clear bv_entcount_dirty on destroy
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG38c0324c0fb6: Linux: Fix zfs_prune panics (authored by Pavel Snajdr <snajpa@snajpa.net>).Nov 21 2024, 11:30 PM