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 D8BAE14D433 for ; Thu, 1 May 2025 13:08:34 +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=1746104915; cv=none; b=OSjeoC75YJ27G3fCyc17IxOZ5SU58NXgx3PQAUWjO7iWuKvTi2VuuIWf7uXC1XWA8HVDiI8qhrrCqKymhHx5/O87AMfhig6v7Swurexx9a7RqTwxiLJ+54H5BhNMuizTDQMHq2F+QSAPQycUdfqJI7exJK5mRF4O/qHUdjCM6l0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104915; c=relaxed/simple; bh=ERxdj7lsiIjxMY1v6CQhylJiUtBDQITgkQiTfJ6/HUc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=p0DENsN4KOLf6KUV8HZYi9DuNVLiO8KddiVBwgxXzeatVK9dHhfJshijqIBNdLnLXf8WFWcqo8HAHdY7qQZng+/YigvCM2tHHYgXWzTdAmYW9GFIDh0UMFDx13hIKdqmtIaLSvvETFuRGqNPvju0CqKp0NPRvU4/nXUbXAySekM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OSZqY2Ng; 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="OSZqY2Ng" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2932C4CEE3; Thu, 1 May 2025 13:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104914; bh=ERxdj7lsiIjxMY1v6CQhylJiUtBDQITgkQiTfJ6/HUc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OSZqY2NgX/+keyD7Z2LIXIEZlZXqZ/0rJwQykkr/uGU3RQuAvvEFqPj9rK/VJy4k/ MiGZ1hAFt2gSqGAvoHOOj7ara3gAGIcZXT1Ppdk/vZSj7/jJ/ynmrVwVVYcw5hzCNU g0udj9ugHOHpMweDw/WzF7riTjdtym4poMVLzBQA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37788: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path Date: Thu, 1 May 2025 15:07:35 +0200 Message-ID: <2025050119-CVE-2025-37788-fd43@gregkh> X-Mailer: git-send-email 2.49.0 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=2871; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fyS8xecv2neZOpIDnVrvIYYxC6KxYW+Uqv8tVX281/w=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCRexzpB9f7enc1Gm0z+mN9e64RW/5Ok/kJ983z78g+ eeYgkNSRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEZgrD/IyAIGeN1wvSCv// znt9ns96u//EWIYFDRuYp5ROY5W5acwoZHS/Sv3rXLbzAA== 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: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration are freed. Fix that by freeing the loc_array in the bmap allocation error path. The Linux kernel CVE team has assigned CVE-2025-37788 to this issue. Affected and fixed versions =========================== Issue introduced in 5.9 with commit d915c299f1da68a7dbb43895b8741c7b916c9d08 and fixed in 6.1.135 with commit fa2d7708955e4f8212fd69bab1da604e60cb0b15 Issue introduced in 5.9 with commit d915c299f1da68a7dbb43895b8741c7b916c9d08 and fixed in 6.6.88 with commit 08aa59c0be768596467552c129e9f82166779a67 Issue introduced in 5.9 with commit d915c299f1da68a7dbb43895b8741c7b916c9d08 and fixed in 6.12.25 with commit dafb6e433ab2333b67be05433dc9c6ccbc7b1284 Issue introduced in 5.9 with commit d915c299f1da68a7dbb43895b8741c7b916c9d08 and fixed in 6.14.4 with commit 76deedea08899885f076aba0bb80bd1276446822 Issue introduced in 5.9 with commit d915c299f1da68a7dbb43895b8741c7b916c9d08 and fixed in 6.15-rc3 with commit 00ffb3724ce743578163f5ade2884374554ca021 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-37788 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/chelsio/cxgb4/cxgb4_ethtool.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/fa2d7708955e4f8212fd69bab1da604e60cb0b15 https://git.kernel.org/stable/c/08aa59c0be768596467552c129e9f82166779a67 https://git.kernel.org/stable/c/dafb6e433ab2333b67be05433dc9c6ccbc7b1284 https://git.kernel.org/stable/c/76deedea08899885f076aba0bb80bd1276446822 https://git.kernel.org/stable/c/00ffb3724ce743578163f5ade2884374554ca021