CVE-2026-72202: ntfs: avoid heap allocation for free-cluster readahead state
In the Linux kernel, the following vulnerability has been resolved:
ntfs: avoid heap allocation for free-cluster readahead state
getnrfreeclusters() allocates a temporary filerastate before it publishes the precomputed free cluster count, sets NVolFreeClusterKnown(), and wakes vol->freewaitq. If that allocation fails, the worker returns without setting the flag or waking waiters, so callers waiting for the free count can block indefinitely.
The readahead state is only used synchronously while scanning the bitmap. Keep it on the stack and pass it by address to the readahead helper. This eliminates the early allocation failure path instead of adding a special case that publishes a conservative count and wakes the waitqueue. Zero-initialize the on-stack state because filerastateinit() only sets rapages and prevpos.
Apply the same treatment to getnrfreemftrecords(), which scans the MFT bitmap with the same short-lived readahead state.