{"id":"CVE-2024-57839","state":"PUBLISHED","title":"Revert \"readahead: properly shorten readahead when falling back to do_page_cache_ra()\"","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"readahead: properly shorten readahead when falling back to do_page_cache_ra()\"\n\nThis reverts commit 7c877586da3178974a8a94577b6045a48377ff25.\n\nAnders and Philippe have reported that recent kernels occasionally hang\nwhen used with NFS in readahead code.  The problem has been bisected to\n7c877586da3 (\"readahead: properly shorten readahead when falling back to\ndo_page_cache_ra()\").  The cause of the problem is that ra->size can be\nshrunk by read_pages() call and subsequently we end up calling\ndo_page_cache_ra() with negative (read huge positive) number of pages. \nLet's revert 7c877586da3 for now until we can find a proper way how the\nlogic in read_pages() and page_cache_ra_order() can coexist.  This can\nlead to reduced readahead throughput due to readahead window confusion but\nthat's better than outright hangs.","publishedAt":"2025-01-11T14:30:56.149Z","updatedAt":"2026-05-11T20:59:23.493Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7c877586da3178974a8a94577b6045a48377ff25","status":"affected","lessThan":"85351e4941a253e4c50fb7048bfc19b60b4ec44b","versionType":"git"},{"version":"7c877586da3178974a8a94577b6045a48377ff25","status":"affected","lessThan":"a220d6b95b1ae12c7626283d7609f0a1438e6437","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/readahead.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/readahead.c"]}],"references":["https://git.kernel.org/stable/c/85351e4941a253e4c50fb7048bfc19b60b4ec44b","https://git.kernel.org/stable/c/a220d6b95b1ae12c7626283d7609f0a1438e6437"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/57xxx/CVE-2024-57839.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-57839","state":"PUBLISHED","datePublished":"2025-01-11T14:30:56.149Z","dateUpdated":"2026-05-11T20:59:23.493Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-01-11T12:34:02.622Z"},"containers":{"cna":{"title":"Revert \"readahead: properly shorten readahead when falling back to do_page_cache_ra()\"","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"readahead: properly shorten readahead when falling back to do_page_cache_ra()\"\n\nThis reverts commit 7c877586da3178974a8a94577b6045a48377ff25.\n\nAnders and Philippe have reported that recent kernels occasionally hang\nwhen used with NFS in readahead code.  The problem has been bisected to\n7c877586da3 (\"readahead: properly shorten readahead when falling back to\ndo_page_cache_ra()\").  The cause of the problem is that ra->size can be\nshrunk by read_pages() call and subsequently we end up calling\ndo_page_cache_ra() with negative (read huge positive) number of pages. \nLet's revert 7c877586da3 for now until we can find a proper way how the\nlogic in read_pages() and page_cache_ra_order() can coexist.  This can\nlead to reduced readahead throughput due to readahead window confusion but\nthat's better than outright hangs."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7c877586da3178974a8a94577b6045a48377ff25","status":"affected","lessThan":"85351e4941a253e4c50fb7048bfc19b60b4ec44b","versionType":"git"},{"version":"7c877586da3178974a8a94577b6045a48377ff25","status":"affected","lessThan":"a220d6b95b1ae12c7626283d7609f0a1438e6437","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/readahead.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.12.5","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/readahead.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/85351e4941a253e4c50fb7048bfc19b60b4ec44b"},{"url":"https://git.kernel.org/stable/c/a220d6b95b1ae12c7626283d7609f0a1438e6437"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:59:23.493Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}