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 EFF1F23C8AE for ; Fri, 24 Apr 2026 14:47:41 +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=1777042062; cv=none; b=FeIZCYB8mPrMasrgicSWSkLAcJNMjbs4IPZnyWaotwzmw7VZ0nYO/NrAR9TUdpLic53pd9U+HJVYi6/pZTW8XvhnWyTF+EFGVWxRiAlbYygvUVgjQno1t0HILkiXXzxvkabdP+t464p+8um0Rw3Lx9s2d6DdKlKiycegSPAjhoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777042062; c=relaxed/simple; bh=09AcLoIxc+epz702CmETGLGwcOfMsS/ONz5zOKrZHsM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OY5Ww6IaIDCaWW6HRYgUR8aDHzVj3NBpPXIjx3Tw2Ga0lY8PLT7aROO+Y/YfyLLdZMurI6tojqPbc1rIseS1YrBfMKTIm4/dpaeINSbfEaketauTi1IYKINS6tTqgMIKCSOCYWcmzMj/5PyMwQ2Mvw0NI/APsxOoyO4EgaAuJLM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=emrSKLX1; 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="emrSKLX1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8708EC19425; Fri, 24 Apr 2026 14:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777042061; bh=09AcLoIxc+epz702CmETGLGwcOfMsS/ONz5zOKrZHsM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=emrSKLX1yu+P9v031kLDACEODxuIxxGudci2rxPymIEOhu9cuViLXUB1X3p2ztOdG ZA3NtgWPX8wZgjceZUYeXoTCZyVwKDcIj/rZJ6r/L5gRAmNToFHo6FHM3ZLFhzAuF2 fX0lp4dVWFo2cE8xGGvlOwTjgZHugShXsh20yzUE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31644: net: lan966x: fix use-after-free and leak in lan966x_fdma_reload() Date: Fri, 24 Apr 2026 16:46:06 +0200 Message-ID: <2026042458-CVE-2026-31644-34ba@gregkh> X-Mailer: git-send-email 2.53.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=3146; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Zn0TBEYi+ROIMKZMr9/iHYXzYP1O2cnr5Lr6v3cC7eU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmvm9Ra7UJUS7xkPl0MdWVkauoI955QLPfB735/5erEG F5FAeWOWBYGQSYGWTFFli/beI7urzik6GVoexpmDisTyBAGLk4BmIiBCMP8qPzZ0xTu7ai2uHnN qN2xSdd49sLbDHO4LrhVJ0kvj5jzd6pqxNRsp5ApW7oB 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: net: lan966x: fix use-after-free and leak in lan966x_fdma_reload() When lan966x_fdma_reload() fails to allocate new RX buffers, the restore path restarts DMA using old descriptors whose pages were already freed via lan966x_fdma_rx_free_pages(). Since page_pool_put_full_page() can release pages back to the buddy allocator, the hardware may DMA into memory now owned by other kernel subsystems. Additionally, on the restore path, the newly created page pool (if allocation partially succeeded) is overwritten without being destroyed, leaking it. Fix both issues by deferring the release of old pages until after the new allocation succeeds. Save the old page array before the allocation so old pages can be freed on the success path. On the failure path, the old descriptors, pages and page pool are all still valid, making the restore safe. Also ensure the restore path re-enables NAPI and wakes the netdev, matching the success path. The Linux kernel CVE team has assigned CVE-2026-31644 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 89ba464fcf548d64bc7215dfe769f791330ae8b6 and fixed in 6.12.82 with commit 691082c0b93c13a5e068c0905f673060bddc204e Issue introduced in 6.12 with commit 89ba464fcf548d64bc7215dfe769f791330ae8b6 and fixed in 6.18.23 with commit 92a673019943770930e2a8bfd52e1aad47a1fc1f Issue introduced in 6.12 with commit 89ba464fcf548d64bc7215dfe769f791330ae8b6 and fixed in 6.19.13 with commit 9950e9199b3dfdfbde0b8d96ba947d7b11243801 Issue introduced in 6.12 with commit 89ba464fcf548d64bc7215dfe769f791330ae8b6 and fixed in 7.0 with commit 59c3d55a946cacdb4181600723c20ac4f4c20c84 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-31644 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: drivers/net/ethernet/microchip/lan966x/lan966x_fdma.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/691082c0b93c13a5e068c0905f673060bddc204e https://git.kernel.org/stable/c/92a673019943770930e2a8bfd52e1aad47a1fc1f https://git.kernel.org/stable/c/9950e9199b3dfdfbde0b8d96ba947d7b11243801 https://git.kernel.org/stable/c/59c3d55a946cacdb4181600723c20ac4f4c20c84