# CVE-2026-99643: khugepaged: fix readahead lock inversion in collapse\_file()

- Priority: **Routine**
- Reason: Not severe (CVSS 5.7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-20 · Modified: 2026-11-23
- Aliases: DEBIAN-CVE-2026-99643, UBUNTU-CVE-2026-99643, CGA-6vxv-vw9w-9pf6, CGA-8j72-mq3w-7hxq, CGA-fhxq-2w66-cvr9, CGA-j44g-6pm6-3xxf, CGA-mfjm-2pc4-4j22, CGA-w72r-fq7c-85g4, CGA-2m9p-5xrp-vc69, CGA-2v8m-x7x6-vh7q, CGA-2wfc-7vjq-c646, CGA-3cpg-6fvp-w2fp, CGA-3g79-3r3w-mw29, CGA-3vhm-mrr6-3cw2, CGA-42c2-5xf6-c2h6, CGA-4q9x-mj24-j7m8, CGA-4vwq-3fxg-h575, CGA-5qhm-rjh7-j9fh, CGA-78w5-246r-6gvr, CGA-7gfw-fhwq-j9p3, CGA-7p5m-hj5f-m3r3, CGA-7pq9-v8j8-vcgw, CGA-7x3m-hw52-mw3g, CGA-7xcm-f3j3-m9xm, CGA-86cp-f363-2x9q, CGA-8hc8-vc4r-mhx8, CGA-96p9-24gg-c2gv, CGA-9rcr-2h8x-57gw, CGA-c24m-6cj7-9cwm, CGA-c86p-rhxw-4w52, CGA-c98v-cvch-vq2f, CGA-cj97-g78h-7vf6, CGA-cjg2-866h-5m3r, CGA-cxj3-mrc3-hq46, CGA-fjhw-j792-pv2f, CGA-fp3g-p2qx-6xjq, CGA-fxq5-gmjp-66g4, CGA-g529-228g-553c, CGA-g5h3-rjqc-9w94, CGA-ghhj-ch4f-x9x9, CGA-gj43-vv7j-8x2j, CGA-gmvr-hvqh-4qx8, CGA-hxj3-2wrg-9m8p, CGA-j4wh-qvp2-xcr4, CGA-j7p7-c9qr-j7mr, CGA-jfp3-8895-jc88, CGA-jrhg-5798-4mpc, CGA-m273-h7q6-49rj, CGA-mc45-xffv-v9f7, CGA-mrh5-v8g5-hm68, CGA-p694-xpvc-77gx, CGA-q8q3-m4hr-3mwf, CGA-qfg5-p9q8-6hj9, CGA-qxj6-c55v-58g7, CGA-v68f-hmwm-2v8f, CGA-v6gf-vf3c-37jm, CGA-w2h9-xfj2-684v, CGA-w5mq-9cxv-3qmc, CGA-wfjm-6p3f-fc6v, CGA-ww9g-5xhg-vm5g, CGA-x5jr-vch9-3mqf, CGA-x9ww-9jf9-6frh, CGA-xff3-886w-7fjf, CGA-xfpx-gh64-7c57, CGA-3h3c-3fvg-hc7m, CGA-4hrx-8q49-p39r, CGA-4vx9-qhj3-g2cx, CGA-7552-jj37-qcgh, CGA-7w29-hr66-9q9j, CGA-965v-9m6p-rmvm, CGA-96hr-43h5-2mx9, CGA-9c7p-5wg6-p3vh, CGA-9cwc-f8jh-4ff5, CGA-fr6g-8377-vpm2, CGA-frhm-wrvm-3mg2, CGA-gf4g-r3hc-xcxx, CGA-j96v-h3jf-rwxp, CGA-m2j6-ffgx-mv4r, CGA-p5h5-2fvp-cgwp, CGA-pw9h-v89c-v74m, CGA-qmvq-qx34-p6xv, CGA-rqxp-rhfc-367g, CGA-v7cm-9rpp-6cgf, CGA-w263-6r73-wr64, CGA-w95p-f9x6-h2rx, CGA-x72h-cmff-hhq2, CGA-x7rh-h8p8-mjcf, CGA-2jr9-ppw9-pw8w, CGA-4f3v-h633-6jp2, CGA-9383-6v58-9w8q, CGA-g6ph-8rqg-mcx6, CGA-mcrh-gh49-67gj, CGA-qv32-7x8q-m74g
- Record: https://cvemate.com/vulnerability/CVE-2026-99643 · JSON: https://cvemate.com/vulnerability/CVE-2026-99643/json

## Description

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

khugepaged: fix readahead lock inversion in collapse_file()

collapse_file() can call page_cache_sync_readahead() while still holding
source folios locked. If truncate holds mapping->invalidate_lock
exclusively and waits for one of those folios, readahead waits for
invalidate_lock and neither side can make progress.

We need to release those folio locks before starting readahead. On a page
cache miss, roll back first, populate the collapse range, and retry once.
Doing readahead after rollback avoids an extra pass when all folios are
already present. If another miss occurs on retry, give up rather than keep
retrying while truncate or reclaim removes folios.

Keep page_cache_sync_readahead() and wait for read I/O with
filemap_lock_folio(), releasing each folio before moving to the next. The
existing uptodate check during collapse still handles read errors.

Shmem uses shmem_get_folio() for swapin and fallocated folios without
taking mapping->invalidate_lock, so it is unaffected.
```

## Signals

- CVSS: 5.7 medium (v4.0, OSV · Ubuntu) CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- EPSS: 0.201%, percentile 10.466%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 201)

- chainguard linux-aws-6.18 (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-aws-6.18-bootc-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-fips-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-headers (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-modules (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-aws-6.18-nestkvm-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-6.18 (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-6.18-bootc (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-6.18-bootc-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-6.18-headers (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-6.18-modules (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-desktop-7.2 (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-bootc-boot-installed (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-headers (Chainguard): All versions (No fix recorded)
- chainguard linux-desktop-7.2-modules (Chainguard): All versions (No fix recorded)
- chainguard linux-gcp-6.18 (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0
- chainguard linux-gcp-6.18-boot-installed (Chainguard): All versions (No fix recorded) \| \< 6.18.66-r0

## References

- <https://git.kernel.org/stable/c/b9b3c367faf1929fb8192a846b3604ad7eced008>
- <https://git.kernel.org/stable/c/eadce52a9ef657d561b3e76c9b5f178bd99735f5>
- <https://security-tracker.debian.org/tracker/CVE-2026-99643>
- <https://git.kernel.org/stable/c/8a82f4c7658c221fd45509c44fd1df152b24e27d>
- <https://git.kernel.org/stable/c/fb558d0a6a0c0f650327fbaf1876697c7f668e04>
- <https://ubuntu.com/security/CVE-2026-99643>
- <https://www.cve.org/CVERecord?id=CVE-2026-99643>
- <https://git.kernel.org/linus/eadce52a9ef657d561b3e76c9b5f178bd99735f5>

---

Data as of 2026-12-05T14:03:42.018Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
