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 6985D1A8F7F for ; Fri, 31 Jan 2025 11:31:20 +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=1738323081; cv=none; b=Zzk11v13C0CAo28PTD94bqQZ3MCGZoBBFQwBzvXVrjCtiScAFXKPpY1Rf55SLzptpTsIebQQud8/ZssdN+JBXAIzjpsDC/K+zXWsAv9J2TOkwDBKq03z/WDeEWwiqSQv1R5Pnu8ezVFriXvxCmnhmJsI5KpB+cPjgBAvgTrsgV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738323081; c=relaxed/simple; bh=f65wIeSLCSrzFdwL6uw4ylHe4ZPFw+NEHIINZ0SHTrw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=bGX3x9ntOJEFc5KrV2uDimRRHL4kKy2ViYHMp2usxv1mieVOtSmHSeGPyRV8FthS4gcccZ4mGphY70NXpkwjQK1G3fomacGdCla+Bw6nnswsxs9QR1yVvLWscRDT5W6G849NruvHeTPBFIzItN8zQJltZtAzZ96I8lrsLQ2kTbI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d3wejJAv; 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="d3wejJAv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D984C4CED1; Fri, 31 Jan 2025 11:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738323080; bh=f65wIeSLCSrzFdwL6uw4ylHe4ZPFw+NEHIINZ0SHTrw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=d3wejJAv9Uck8tuVH8bA0rM+CA2uoJ5ANEZKLIIId3d9jlMBxWGBD0G5Z3MDHfff3 jtF3bkOyHR5xZPqQZ/lzritdfgaF/W+PAOXGRzTkF69gzLpY+eG0YDJdxBfsJIQjQC BJzVtEQDv5V6pa9PDFjoKejgdUmSNNijH0e03lgY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21676: net: fec: handle page_pool_dev_alloc_pages error Date: Fri, 31 Jan 2025 12:31:08 +0100 Message-ID: <2025013101-CVE-2025-21676-3d08@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2721; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=f65wIeSLCSrzFdwL6uw4ylHe4ZPFw+NEHIINZ0SHTrw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlztpSu+ejOczlO6EDA849zmaJ2TJ8qLZJ3aLP76apW/ sKpjduSO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiZfMZFhxbdnI9s2fdNfWJ DRv4xPNeNRn2n2CYzT6vbe5k5yuh/MULjs9ce7Wzc8o9FwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net: fec: handle page_pool_dev_alloc_pages error The fec_enet_update_cbd function calls page_pool_dev_alloc_pages but did not handle the case when it returned NULL. There was a WARN_ON(!new_page) but it would still proceed to use the NULL pointer and then crash. This case does seem somewhat rare but when the system is under memory pressure it can happen. One case where I can duplicate this with some frequency is when writing over a smbd share to a SATA HDD attached to an imx6q. Setting /proc/sys/vm/min_free_kbytes to higher values also seems to solve the problem for my test case. But it still seems wrong that the fec driver ignores the memory allocation error and can crash. This commit handles the allocation error by dropping the current packet. The Linux kernel CVE team has assigned CVE-2025-21676 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1 with commit 95698ff6177b5f1f13f251da60e7348413046ae4 and fixed in 6.6.74 with commit 8a0097db0544b658c159ac787319737712063a23 Issue introduced in 6.1 with commit 95698ff6177b5f1f13f251da60e7348413046ae4 and fixed in 6.12.11 with commit 1425cb829556398f594658512d49292f988a2ab0 Issue introduced in 6.1 with commit 95698ff6177b5f1f13f251da60e7348413046ae4 and fixed in 6.13 with commit 001ba0902046cb6c352494df610718c0763e77a5 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-21676 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/freescale/fec_main.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/8a0097db0544b658c159ac787319737712063a23 https://git.kernel.org/stable/c/1425cb829556398f594658512d49292f988a2ab0 https://git.kernel.org/stable/c/001ba0902046cb6c352494df610718c0763e77a5