A use-after-free vulnerability in the Linux kernel's fsverity feature was fixed by ensuring the S_VERITY flag is set only after rollback is no longer possible in ext4 and btrfs filesystems. This prevents premature verification enabling that could lead to memory safety issues.