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=1795154555; b=WAKK1g81a8jlNpmnjPvJPcT5HFJFOKr/TnJ1ZzkT6nxeK8sbOYw1daindePHdX2r9T65 sI+8ZCJ1Ae/w7D8HjAb9gFE5b3buYl4EoePBOTadGDgDRIQC/nZedUXh1t6OCOqgMarDn FWCOEQ1x3U0XtCYPxmUvO4yV/x7iKoj7f9/QnGkD2ARbyv1mqerS1DJrYU6FFezM99kmg cVNgFxBxBZ6t8RIMRwZh4yDvz2jMsGjMhYhw4kN7X8LaTeGXMVoL12thnNSzozyW9Vfn+ kQ+6TZA3/E3zD29xCR63sUn4HJz7CtqHmGLCWWupdIslIlmWedhyr5xSmoDfbaW4kxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154555; 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=+qt5BlbL23Ml617K1u5tKEymMcv4d8xZs3EgwF/UHvg=; b=HZTVZIZIvZZn1lyY0TRfB9YoMAv3AjN1mCwVSuTKvxufCysxWQe3+zVWhkF58EQl+t6I nLrbxK62OIvZnhpZ+3fe0IUKN4i6/ItgyYml8WRhvil/Ec0q+yc8ERnyBhNanbp0NdH1a 6vJwK6KCp6PAw45BNf/j5QVjf/6NqVQ6u3umjVwGyjXpH7rHAp8/tC2Fhq8XIcXiT0ao0 OHaeXdiSbmMnfhqngKr77+aOh7b3hiso1oSngx/tyDfB3Ubi56v2bw5lh2XE+z+yacAFJ bjxKMp3DbyirOElhRnm3uacFP4bwmIFixp8RP2/M833U5Fi+zxB/PvROOIO/mQfETkw== 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=pFHiUQoP; 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 1DF15606A520 for ; Fri, 20 Nov 2026 06:02:34 +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=pFHiUQoP Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E44B1F000CA; Fri, 20 Nov 2026 06:02:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154554; bh=+qt5BlbL23Ml617K1u5tKEymMcv4d8xZs3EgwF/UHvg=; h=From:To:Cc:Subject:Date:Reply-To; b=pFHiUQoP45a30nPgxDICliWMRYnMOfDUo6qzuC8Rgal3A4i9c93QI1SlcfMRN3OXj C7VYbPLrxv17sNnQ+AFtpZJpa+ZLKBF1aIue6K0AyRjqKSBvDhB6Tm3V3tpiA/K9Kc jrr3Yx5JCa4mv4W134Yq8L2N/Qvf79paldHbk7qE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99757: btrfs: sysfs: restore NOFS context on early return in btrfs_sysfs_add_block_group_type() Date: Fri, 20 Nov 2026 06:52:23 +0100 Message-ID: <2026112023-CVE-2026-99757-97bb@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=3072; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ATpsegWgmPoTaglax/HoFtDCHdWWYxHjTmChjU8r0nI=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/78+P6I9k2qTGkN9z1DD86HyXv+Fy5yQjTt3nzfrLF Onw7czjjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIvTPD/FjXqT/87pXNLXx4 fpNIhvDJ2Rce/GCYHxrpaW+yeK3BvVcHHRUET+29J79jBQA= 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: btrfs: sysfs: restore NOFS context on early return in btrfs_sysfs_add_block_group_type() btrfs_sysfs_add_block_group_type() sets up a NOFS context with memalloc_nofs_save() because kobject_add() performs GFP_KERNEL allocations deep in its call chain, and the function may be called while holding a transaction handle or a lock required for a transaction commit, where reclaim could deadlock. Every other return path of this function calls memalloc_nofs_restore() except the early return taken when another thread has already created the kobject for the same raid index (this can happen when restriping). Taking that path leaves PF_MEMALLOC_NOFS set on the calling task, so all subsequent memory allocations performed by that task remain restricted to the NOFS scope, which may lead to unexpected allocation failures or deadlocks later on. Restore the NOFS context before returning from that path. The Linux kernel CVE team has assigned CVE-2026-99757 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 49ea112da0e6e323bb923315ec54ee920759bf19 and fixed in 6.12.118 with commit fa34d172c9e3ee25162f515c77e04247ea780083 Issue introduced in 5.10 with commit 49ea112da0e6e323bb923315ec54ee920759bf19 and fixed in 6.18.64 with commit b72664c8d0e6aada7f48277968266867fd127ea7 Issue introduced in 5.10 with commit 49ea112da0e6e323bb923315ec54ee920759bf19 and fixed in 7.3.5 with commit c7011ad8d6941e1a53882c486145935dc5664c6f Issue introduced in 5.10 with commit 49ea112da0e6e323bb923315ec54ee920759bf19 and fixed in 7.4-rc2 with commit 4172be965c2ce887ebfb1117c634a68555be8c11 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-99757 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: fs/btrfs/sysfs.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/fa34d172c9e3ee25162f515c77e04247ea780083 https://git.kernel.org/stable/c/b72664c8d0e6aada7f48277968266867fd127ea7 https://git.kernel.org/stable/c/c7011ad8d6941e1a53882c486145935dc5664c6f https://git.kernel.org/stable/c/4172be965c2ce887ebfb1117c634a68555be8c11