{"api_version":"1","generated_at":"2026-11-25T00:09:36+00:00","cve":"CVE-2026-99643","urls":{"html":"https://cve.report/CVE-2026-99643","api":"https://cve.report/api/cve/CVE-2026-99643.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99643","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99643"},"summary":{"title":"khugepaged: fix readahead lock inversion in collapse_file()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nkhugepaged: fix readahead lock inversion in collapse_file()\n\ncollapse_file() can call page_cache_sync_readahead() while still holding\nsource folios locked. If truncate holds mapping->invalidate_lock\nexclusively and waits for one of those folios, readahead waits for\ninvalidate_lock and neither side can make progress.\n\nWe need to release those folio locks before starting readahead. On a page\ncache miss, roll back first, populate the collapse range, and retry once.\nDoing readahead after rollback avoids an extra pass when all folios are\nalready present. If another miss occurs on retry, give up rather than keep\nretrying while truncate or reclaim removes folios.\n\nKeep page_cache_sync_readahead() and wait for read I/O with\nfilemap_lock_folio(), releasing each folio before moving to the next. The\nexisting uptodate check during collapse still handles read errors.\n\nShmem uses shmem_get_folio() for swapin and fallocated folios without\ntaking mapping->invalidate_lock, so it is unaffected.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:17:57","updated_at":"2026-11-23 08:18:05"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/eadce52a9ef657d561b3e76c9b5f178bd99735f5","name":"https://git.kernel.org/stable/c/eadce52a9ef657d561b3e76c9b5f178bd99735f5","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/8a82f4c7658c221fd45509c44fd1df152b24e27d","name":"https://git.kernel.org/stable/c/8a82f4c7658c221fd45509c44fd1df152b24e27d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/b9b3c367faf1929fb8192a846b3604ad7eced008","name":"https://git.kernel.org/stable/c/b9b3c367faf1929fb8192a846b3604ad7eced008","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/fb558d0a6a0c0f650327fbaf1876697c7f668e04","name":"https://git.kernel.org/stable/c/fb558d0a6a0c0f650327fbaf1876697c7f668e04","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99643","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99643","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 730633f0b7f951726e87f912a6323641f674ae34 8a82f4c7658c221fd45509c44fd1df152b24e27d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 730633f0b7f951726e87f912a6323641f674ae34 fb558d0a6a0c0f650327fbaf1876697c7f668e04 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 730633f0b7f951726e87f912a6323641f674ae34 b9b3c367faf1929fb8192a846b3604ad7eced008 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 730633f0b7f951726e87f912a6323641f674ae34 eadce52a9ef657d561b3e76c9b5f178bd99735f5 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"99643","cve":"CVE-2026-99643","epss":"0.001680000","percentile":"0.061900000","score_date":"2026-11-23","updated_at":"2026-11-24 00:07:46"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/khugepaged.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"8a82f4c7658c221fd45509c44fd1df152b24e27d","status":"affected","version":"730633f0b7f951726e87f912a6323641f674ae34","versionType":"git"},{"lessThan":"fb558d0a6a0c0f650327fbaf1876697c7f668e04","status":"affected","version":"730633f0b7f951726e87f912a6323641f674ae34","versionType":"git"},{"lessThan":"b9b3c367faf1929fb8192a846b3604ad7eced008","status":"affected","version":"730633f0b7f951726e87f912a6323641f674ae34","versionType":"git"},{"lessThan":"eadce52a9ef657d561b3e76c9b5f178bd99735f5","status":"affected","version":"730633f0b7f951726e87f912a6323641f674ae34","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/khugepaged.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.15"},{"lessThan":"5.15","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"5.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"5.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"5.15","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"5.15","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nkhugepaged: fix readahead lock inversion in collapse_file()\n\ncollapse_file() can call page_cache_sync_readahead() while still holding\nsource folios locked. If truncate holds mapping->invalidate_lock\nexclusively and waits for one of those folios, readahead waits for\ninvalidate_lock and neither side can make progress.\n\nWe need to release those folio locks before starting readahead. On a page\ncache miss, roll back first, populate the collapse range, and retry once.\nDoing readahead after rollback avoids an extra pass when all folios are\nalready present. If another miss occurs on retry, give up rather than keep\nretrying while truncate or reclaim removes folios.\n\nKeep page_cache_sync_readahead() and wait for read I/O with\nfilemap_lock_folio(), releasing each folio before moving to the next. The\nexisting uptodate check during collapse still handles read errors.\n\nShmem uses shmem_get_folio() for swapin and fallocated folios without\ntaking mapping->invalidate_lock, so it is unaffected."}],"providerMetadata":{"dateUpdated":"2026-11-23T08:05:28.064Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/8a82f4c7658c221fd45509c44fd1df152b24e27d"},{"url":"https://git.kernel.org/stable/c/fb558d0a6a0c0f650327fbaf1876697c7f668e04"},{"url":"https://git.kernel.org/stable/c/b9b3c367faf1929fb8192a846b3604ad7eced008"},{"url":"https://git.kernel.org/stable/c/eadce52a9ef657d561b3e76c9b5f178bd99735f5"}],"title":"khugepaged: fix readahead lock inversion in collapse_file()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99643","datePublished":"2026-11-20T05:49:58.391Z","dateReserved":"2026-09-25T10:25:14.426Z","dateUpdated":"2026-11-23T08:05:28.064Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:17:57","lastModifiedDate":"2026-11-23 08:18:05","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99643","Ordinal":"1","Title":"khugepaged: fix readahead lock inversion in collapse_file()","CVE":"CVE-2026-99643","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99643","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nkhugepaged: fix readahead lock inversion in collapse_file()\n\ncollapse_file() can call page_cache_sync_readahead() while still holding\nsource folios locked. If truncate holds mapping->invalidate_lock\nexclusively and waits for one of those folios, readahead waits for\ninvalidate_lock and neither side can make progress.\n\nWe need to release those folio locks before starting readahead. On a page\ncache miss, roll back first, populate the collapse range, and retry once.\nDoing readahead after rollback avoids an extra pass when all folios are\nalready present. If another miss occurs on retry, give up rather than keep\nretrying while truncate or reclaim removes folios.\n\nKeep page_cache_sync_readahead() and wait for read I/O with\nfilemap_lock_folio(), releasing each folio before moving to the next. The\nexisting uptodate check during collapse still handles read errors.\n\nShmem uses shmem_get_folio() for swapin and fallocated folios without\ntaking mapping->invalidate_lock, so it is unaffected.","Type":"Description","Title":"khugepaged: fix readahead lock inversion in collapse_file()"}]}}}