# CVE-2024-57839: Revert "readahead: properly shorten readahead when falling back to do_page_cache_ra()"

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-01-11T14:30:56.149Z
- Modified: 2026-06-17T08:14:05.727Z
- Weaknesses: CWE-704
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

Revert "readahead: properly shorten readahead when falling back to do_page_cache_ra()"

This reverts commit 7c877586da3178974a8a94577b6045a48377ff25.

Anders and Philippe have reported that recent kernels occasionally hang
when used with NFS in readahead code.  The problem has been bisected to
7c877586da3 ("readahead: properly shorten readahead when falling back to
do_page_cache_ra()").  The cause of the problem is that ra->size can be
shrunk by read_pages() call and subsequently we end up calling
do_page_cache_ra() with negative (read huge positive) number of pages. 
Let's revert 7c877586da3 for now until we can find a proper way how the
logic in read_pages() and page_cache_ra_order() can coexist.  This can
lead to reduced readahead throughput due to readahead window confusion but
that's better than outright hangs.

(As written by CVE List.)

## Affected

- Linux Linux: from 7c877586da3178974a8a94577b6045a48377ff25 before 85351e4941a253e4c50fb7048bfc19b60b4ec44b; from 7c877586da3178974a8a94577b6045a48377ff25 before a220d6b95b1ae12c7626283d7609f0a1438e6437; 6.11 (not affected: before 6.11; from 6.12.5 up to 6.12.*; from 6.13 up to *)
- linux linux_kernel: from 6.11 before 6.12.5; 6.13

## References

- <https://git.kernel.org/stable/c/85351e4941a253e4c50fb7048bfc19b60b4ec44b> (patch)
- <https://git.kernel.org/stable/c/a220d6b95b1ae12c7626283d7609f0a1438e6437> (patch)

## Sources

- CVE List: [CVE-2024-57839](https://www.cve.org/CVERecord?id=CVE-2024-57839), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-57839](https://nvd.nist.gov/vuln/detail/CVE-2024-57839), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-57839 · Whole record: https://cve.day/CVE-2024-57839.json · Rebuilt by cve.day 2026-11-25T22:58:50.938Z
