From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154148; b=hdjr5eUBwgSsu3Ch0KewOjKXWM5ZHjErrYpcl9vMlCl3IM9tjqSpUcUmkegwDiPknyOu NslclbUmOFKvhEpAptkGzPoHK7zuwmWJnWLbtbtb1v9Ik7W4s8HIa3FL/9Op7kMR31hXT wENPMTdGwQdBwVg3pUo9PxQacYvrggdK0p0AZ19dSSitvFT0CywDR3/T5DKLhOS8fo8xe YhmaT8VYsukVo1vAGbLBH4i5KCGjNT9HP51OEwen9Q4qCK1kmYWvhkcByTMRPZsXi8yOv kAYUDcZvgCmDr3R5jlWFCF2kYUWAyqkI6T8NKK6GsT10vlghkMbHKbUNmKVl7KvsEAw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154148; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=CtQa81bK3PDDiqyTEbkboYpbTQZMpbav8ujVMlMb1MI=; b=fais9zohS8usBdM8MyDu1hu3ZVWZNVEFlpd/BEY7S/ezJnYZKBAFuHeA962CP9SsmaZT XEpm8YyBQmpwffTADW3t7j2v5ya1D9xNMLZrR6jxKP3Q9Kg8rbLNfpGYiE9Cz+dOv1yml iAx9dO6ekmVmqrwrXY4KVsjGwD0VmFibDnCAt9Adf2hKBWV0MH0rYuZfYqmN9cgskL4MQ 8xAw2sBmkdPizAQuL4MCcJqpf+6vUgdNc6p91pYA0wM3vJesiJq1+HffAfa11O0tw0Z+m JgSiPrmO65RkDX/2BkfYQ15SOGuYkSa4Y0Sr8uunmTX6i0pZTAVRGNInx9IObH7t+sA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0rZ01PqC; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37FA5606A320 for ; Fri, 20 Nov 2026 05:55:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0rZ01PqC Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D0681F000C6; Fri, 20 Nov 2026 05:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154147; bh=CtQa81bK3PDDiqyTEbkboYpbTQZMpbav8ujVMlMb1MI=; h=From:To:Cc:Subject:Date:Reply-To; b=0rZ01PqCW50W8Lx3f+98rUaF3obHpvgq3Jo0eQiU+D5YFMu66b+5q6wlMoUl0ktHc F0j2ryO48ydFVkXB8ayjq0eP+Lnm81KoI3qIoYQ1+goJtA3ArxFEqpD5P1EbuYzVT/ wAvcY4B8Yg1kjmH0bkh7+llUJhNjYzxO3HeJFGAI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99643: khugepaged: fix readahead lock inversion in collapse_file() Date: Fri, 20 Nov 2026 06:50:29 +0100 Message-ID: <2026112041-CVE-2026-99643-0664@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2706; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HSSuCc6HZxZHIR0nmc7NNKAw8sWYg4h8rFcPDa/j+Rk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/75dGOM3qVT/zyMajQyNJbZ+s4rSPtuu4TXhXLtZb5 ZZ4r21jRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk/AmGBQcEnBcs6T8/50bi LNFcvUfSn80T5jAsWJI7yS/xkdHpT8ce1KW6P/G7Mzs1EgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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. The Linux kernel CVE team has assigned CVE-2026-99643 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 7.3.5 with commit b9b3c367faf1929fb8192a846b3604ad7eced008 Issue introduced in 5.15 with commit 730633f0b7f951726e87f912a6323641f674ae34 and fixed in 7.4-rc2 with commit eadce52a9ef657d561b3e76c9b5f178bd99735f5 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-99643 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: mm/khugepaged.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/b9b3c367faf1929fb8192a846b3604ad7eced008 https://git.kernel.org/stable/c/eadce52a9ef657d561b3e76c9b5f178bd99735f5