[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025050900-CVE-2025-37874-81e8@gregkh>
Date: Fri, 9 May 2025 08:44:08 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-37874: net: ngbe: fix memory leak in ngbe_probe() error path
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: ngbe: fix memory leak in ngbe_probe() error path
When ngbe_sw_init() is called, memory is allocated for wx->rss_key
in wx_init_rss_key(). However, in ngbe_probe() function, the subsequent
error paths after ngbe_sw_init() don't free the rss_key. Fix that by
freeing it in error path along with wx->mac_table.
Also change the label to which execution jumps when ngbe_sw_init()
fails, because otherwise, it could lead to a double free for rss_key,
when the mac_table allocation fails in wx_sw_init().
The Linux kernel CVE team has assigned CVE-2025-37874 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.2 with commit 02338c484ab6250b81f0266ffb40d53c3efe0f47 and fixed in 6.6.88 with commit 7c2b66a31c7a4866400f7e6fb43cb32021bfca01
Issue introduced in 6.2 with commit 02338c484ab6250b81f0266ffb40d53c3efe0f47 and fixed in 6.12.25 with commit 8335a3feb9d0d97e5e8f76d38b6bb8573d5b4a29
Issue introduced in 6.2 with commit 02338c484ab6250b81f0266ffb40d53c3efe0f47 and fixed in 6.14.4 with commit 397487338eff1891c4654ce7deaafbf72a1688b2
Issue introduced in 6.2 with commit 02338c484ab6250b81f0266ffb40d53c3efe0f47 and fixed in 6.15-rc3 with commit 88fa80021b77732bc98f73fb69d69c7cc37b9f0d
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-37874
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/wangxun/ngbe/ngbe_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/7c2b66a31c7a4866400f7e6fb43cb32021bfca01
https://git.kernel.org/stable/c/8335a3feb9d0d97e5e8f76d38b6bb8573d5b4a29
https://git.kernel.org/stable/c/397487338eff1891c4654ce7deaafbf72a1688b2
https://git.kernel.org/stable/c/88fa80021b77732bc98f73fb69d69c7cc37b9f0d
Powered by blists - more mailing lists