lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTB5Oqp5ilW5fOpv@horms.kernel.org>
Date: Wed, 3 Dec 2025 17:54:02 +0000
From: Simon Horman <horms@...nel.org>
To: Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Andrew Lunn <andrew+netdev@...n.ch>, netdev@...r.kernel.org,
	Ido Schimmel <idosch@...dia.com>, mlxsw@...dia.com
Subject: Re: [PATCH net 1/3] mlxsw: spectrum_router: Fix possible neighbour
 reference count leak

On Tue, Dec 02, 2025 at 06:44:11PM +0100, Petr Machata wrote:
> From: Ido Schimmel <idosch@...dia.com>
> 
> mlxsw_sp_router_schedule_work() takes a reference on a neighbour,
> expecting a work item to release it later on. However, we might fail to
> schedule the work item, in which case the neighbour reference count will
> be leaked.
> 
> Fix by taking the reference just before scheduling the work item. Note
> that mlxsw_sp_router_schedule_work() can receive a NULL neighbour
> pointer, but neigh_clone() handles that correctly.
> 
> Spotted during code review, did not actually observe the reference count
> leak.
> 
> Fixes: 151b89f6025a ("mlxsw: spectrum_router: Reuse work neighbor initialization in work scheduler")
> Reviewed-by: Petr Machata <petrm@...dia.com>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> Signed-off-by: Petr Machata <petrm@...dia.com>

Reviewed-by: Simon Horman <horms@...nel.org>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ