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] [day] [month] [year] [list]
Message-ID: <20250708060421.2b388dc6@kernel.org>
Date: Tue, 8 Jul 2025 06:04:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: veritas501 <hxzene@...il.com>
Cc: davem@...emloft.net, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Ingo Molnar
 <mingo@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, Herbert Xu
 <herbert@...dor.apana.org.au>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: appletalk: Fix device refcount leak in
 atrtr_create()

On Tue,  8 Jul 2025 09:04:30 +0000 veritas501 wrote:
> When updating an existing route entry in atrtr_create(), the old device
> reference was not being released before assigning the new device,
> leading to a device refcount leak. Fix this by calling dev_put() to
> release the old device reference before holding the new one.
> 
> Fixes: c7f905f0f6d4 ("[ATALK]: Add missing dev_hold() to atrtr_create().")
> Signed-off-by: veritas501 <hxzene@...il.com>

we need your real name

> diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
> index 73ea7e67f05a..e5708870a249 100644
> --- a/net/appletalk/ddp.c
> +++ b/net/appletalk/ddp.c
> @@ -576,6 +576,8 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
>  
>  	/* Fill in the routing entry */
>  	rt->target  = ta->sat_addr;
> +	if (rt->dev)
> +		dev_put(rt->dev); /* Release old device */

null check is not necessary before dev_put()
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ