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 C8ED61A5BAB for ; Thu, 27 Feb 2025 02:19:03 +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=1740622743; cv=none; b=CB6dMzau1ulMLn6wXAU3phDCHSv9/iyMOedZTgRbAJX5mDIWk3WOAkaSP/2BrLc5cqsJ/2+jci9fxj6YPKmrFZkG/kn303h7qU/AUVxE7QFbwvoorxkocWEiXdler8GJxhzBWLw2p+9BomblVd6JSe7G6/HLDGVv8CtXPpjYVkU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740622743; c=relaxed/simple; bh=X8ox7qOHQGt4tw0tY4G0t0cIlP/NeGfADOUedjkLCG0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QiGSXpccBPZE4RwTYQXoNQsTokxv2kZks+SCQIRzCYCg12P02g8eSbC+oX3YIjBRLU6ba5YIBngddp2uzdD+VuSp1HRiqXfLrJ/3AYpb/OdMwAcvwaO6lXBQTQEPmxr89L1Vm08jNh+5IkKUA+PjsDQR6mG+Ux7OjZOFI0NM4pI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rMn2rVEX; 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="rMn2rVEX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B460C4CEE8; Thu, 27 Feb 2025 02:19:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740622743; bh=X8ox7qOHQGt4tw0tY4G0t0cIlP/NeGfADOUedjkLCG0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rMn2rVEXEmH6T2V7+oWxhNioaVpAms5ytrpkBqmfEsbtVAcLxiJ4C3/CEaOtVrSDv o1ixmjrCQcz4pGYGpZKC3N+VWHZeV2uj5Z9a/xC0ZrNvLO9LfqEveEghBXIEbLciuI Vs81jHykfq/24dUiDMcaOcwlcl+5zATFiHTdoMpM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21788: net: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases Date: Wed, 26 Feb 2025 18:17:44 -0800 Message-ID: <2025022609-CVE-2025-21788-2619@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=2514; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=X8ox7qOHQGt4tw0tY4G0t0cIlP/NeGfADOUedjkLCG0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7T6v6Jwl+UzZet331xUn2h13MrXqd6w/sMWC+ee1XS 5a7RuKljlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIognDPFuLC6HmDEeNZuX9 TonvORjHNr9WiGGuvHzbtGWPn153mPC2/P6n3QIzlgUYAAA= 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: ethernet: ti: am65-cpsw: fix memleak in certain XDP cases If the XDP program doesn't result in XDP_PASS then we leak the memory allocated by am65_cpsw_build_skb(). It is pointless to allocate SKB memory before running the XDP program as we would be wasting CPU cycles for cases other than XDP_PASS. Move the SKB allocation after evaluating the XDP program result. This fixes the memleak. A performance boost is seen for XDP_DROP test. XDP_DROP test: Before: 460256 rx/s 0 err/s After: 784130 rx/s 0 err/s The Linux kernel CVE team has assigned CVE-2025-21788 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 and fixed in 6.12.16 with commit 1bba1d042107167164a0ae3a843fdf650ab005d7 Issue introduced in 6.10 with commit 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 and fixed in 6.13.4 with commit dc11f049612b9d926aca2e55f8dc9d82850d0da3 Issue introduced in 6.10 with commit 8acacc40f7337527ff84cd901ed2ef0a2b95b2b6 and fixed in 6.14-rc3 with commit 5db843258de1e4e6b1ef1cbd1797923c9e3de548 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-21788 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/ti/am65-cpsw-nuss.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/1bba1d042107167164a0ae3a843fdf650ab005d7 https://git.kernel.org/stable/c/dc11f049612b9d926aca2e55f8dc9d82850d0da3 https://git.kernel.org/stable/c/5db843258de1e4e6b1ef1cbd1797923c9e3de548