ntfs: avoid heap allocation for free-cluster readahead state
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 40ee64e633e5e413f2255bb48c063977d8c86f34 and Kernel c05132077df57a384919f61d7f8a8e76d748a6d4.
In the Linux kernel, the following vulnerability has been resolved: ntfs: avoid heap allocation for free-cluster readahead state get_nr_free_clusters() allocates a temporary file_ra_state before it publishes the precomputed free cluster count, sets NVolFreeClusterKnown(), and wakes vol->free_waitq. 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 file_ra_state_init() only sets ra_pages and prev_pos. Apply the same treatment to __get_nr_free_mft_records(), which scans the MFT bitmap with the same short-lived readahead state.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | =7.1, >=6251f0b0de7d645e3591931ca4c11d8322c1866f <40ee64e633e5e413f2255bb48c063977d8c86f34, >=6251f0b0de7d645e3591931ca4c11d8322c1866f <c05132077df57a384919f61d7f8a8e76d748a6d4 | 40ee64e633e5e413f2255bb48c063977d8c86f34, c05132077df57a384919f61d7f8a8e76d748a6d4 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket