CVE-2026-23002: lib/buildid: use __kernel_read() for sleepable context
In the Linux kernel, the following vulnerability has been resolved:
lib/buildid: use kernelread() for sleepable context
Prevent a "BUG: unable to handle kernel NULL pointer dereference in filemapreadfolio".
For the sleepable context, convert freader to use kernelread() instead of direct page cache access via readcachefolio(). This simplifies the faultable code path by using the standard kernel file reading interface which handles all the complexity of reading file data.
At the moment we are not changing the code for non-sleepable context which uses filemapgetfolio() and only succeeds if the target folios are already in memory and up-to-date. The reason is to keep the patch simple and easier to backport to stable kernels.
Syzbot repro does not crash the kernel anymore and the selftests run successfully.
In the follow up we will make kernelread() with IOCBNOWAIT work for non-sleepable contexts. In addition, I would like to replace the secretmem check with a more generic approach and will add fstest for the buildid code.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-23002?
CVE-2026-23002 is classified as a medium severity vulnerability.
How do I fix CVE-2026-23002?
To fix CVE-2026-23002, update your Linux kernel to the latest stable version that includes the patch for this vulnerability.
What systems are affected by CVE-2026-23002?
CVE-2026-23002 affects various versions of the Linux kernel that utilize the affected lib/buildid functionalities.
What are the consequences of exploiting CVE-2026-23002?
Exploiting CVE-2026-23002 could lead to kernel panics due to inability to handle NULL pointer dereferences.
Is CVE-2026-23002 a remote vulnerability?
CVE-2026-23002 is not a remote vulnerability; it requires local access to exploit.