Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F09D3563D8 for ; Tue, 16 Dec 2025 13:43:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765892625; cv=none; b=UBhz7EFIIU9sVmbI556GjfKXn72jUUIBPsFE3B2PxziXSDOBtBpZS+eBty8T7bVjuG1NisPjNAbj0SmX3a6P2UyQY/e2RthGfLCTNTKnvlBEyqeFdVyEtgQl4lE8Np8tPq1SMtbnj3PlQ9lEoQJv7UBK03T5KYQ+MpSwRfgKtvE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765892625; c=relaxed/simple; bh=HGaeHE/2NH3wKiyhSHZuQ+/ZR2V4p7cNynbuaYW4GJQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bKPWJCpUlZObgw2s9uE1vcfqlzAqy97z3n9PC/cLC6CtvDHTaA1bxgxrgr4hjGeAzOdqNcJGSx44Sf8QeR98J9sAMgHAzmeW0RTyKOBkwjpXQsMV3T37HLXFV8PD4INfrBHa+brsyxxDk/sW16vDuw17ffWHW49GGh8ULx976UA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=imiWVodW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="imiWVodW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3067C4CEF5; Tue, 16 Dec 2025 13:43:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765892625; bh=HGaeHE/2NH3wKiyhSHZuQ+/ZR2V4p7cNynbuaYW4GJQ=; h=From:To:Cc:Subject:Date:Reply-To:From; b=imiWVodWOwmyVDy2PjwsNxO8yWV/KSexEE1I2UW6Fi0/NCORTG6EG931QSbwKvqxK igj31gEIhfhAZxyarZo5WYjeRwnRt+kyZUX6Klrgb4pF64c5rYmHbhNwNWeaFaJMA7 WXEbcE57YiFUjmPSf1o17aBG/KDTvAMZnUKpHhvA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68169: netpoll: Fix deadlock in memory allocation under spinlock Date: Tue, 16 Dec 2025 14:43:30 +0100 Message-ID: <2025121628-CVE-2025-68169-1e23@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3720; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SvmjX84MrtqEP5bFLz3fvvG+2NHoTYdMjsGRTtIdX9c=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOSQxvp6srdufZJN35IJ+83Sq5eOn0067ttxKkbq5O8 5qd0lHUEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNJOsEwT6c+W3rTRV4vvrs+ SkuENbVX7wx8zTDf9cWmIr+dPlc5l3W+1E6/We+6RHE6AA== 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: netpoll: Fix deadlock in memory allocation under spinlock Fix a AA deadlock in refill_skbs() where memory allocation while holding skb_pool->lock can trigger a recursive lock acquisition attempt. The deadlock scenario occurs when the system is under severe memory pressure: 1. refill_skbs() acquires skb_pool->lock (spinlock) 2. alloc_skb() is called while holding the lock 3. Memory allocator fails and calls slab_out_of_memory() 4. This triggers printk() for the OOM warning 5. The console output path calls netpoll_send_udp() 6. netpoll_send_udp() attempts to acquire the same skb_pool->lock 7. Deadlock: the lock is already held by the same CPU Call stack: refill_skbs() spin_lock_irqsave(&skb_pool->lock) <- lock acquired __alloc_skb() kmem_cache_alloc_node_noprof() slab_out_of_memory() printk() console_flush_all() netpoll_send_udp() skb_dequeue() spin_lock_irqsave(&skb_pool->lock) <- deadlock attempt This bug was exposed by commit 248f6571fd4c51 ("netpoll: Optimize skb refilling on critical path") which removed refill_skbs() from the critical path (where nested printk was being deferred), letting nested printk being called from inside refill_skbs() Refactor refill_skbs() to never allocate memory while holding the spinlock. Another possible solution to fix this problem is protecting the refill_skbs() from nested printks, basically calling printk_deferred_{enter,exit}() in refill_skbs(), then, any nested pr_warn() would be deferred. I prefer this approach, given I _think_ it might be a good idea to move the alloc_skb() from GFP_ATOMIC to GFP_KERNEL in the future, so, having the alloc_skb() outside of the lock will be necessary step. There is a possible TOCTOU issue when checking for the pool length, and queueing the new allocated skb, but, this is not an issue, given that an extra SKB in the pool is harmless and it will be eventually used. The Linux kernel CVE team has assigned CVE-2025-68169 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 248f6571fd4c51531f7f8f07f186f7ae98a50afc and fixed in 6.17.8 with commit 06742a3ab884d7428c9050b205ffcf6a8a548397 Issue introduced in 6.15 with commit 248f6571fd4c51531f7f8f07f186f7ae98a50afc and fixed in 6.18 with commit 327c20c21d80e0d87834b392d83ae73c955ad8ff 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-2025-68169 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: net/core/netpoll.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/06742a3ab884d7428c9050b205ffcf6a8a548397 https://git.kernel.org/stable/c/327c20c21d80e0d87834b392d83ae73c955ad8ff