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]
Date:   Thu, 22 Oct 2020 13:28:14 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Oliver Hartkopp" <socketcan@...tkopp.net>
Cc:     kjlu@....edu, "Wolfgang Grandegger" <wg@...ndegger.com>,
        "Marc Kleine-Budde" <mkl@...gutronix.de>,
        "David S. Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>, linux-can@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH] can: vxcan: Fix memleak in vxcan_newlink

> 
> On 21.10.20 07:21, Dinghao Liu wrote:
> > When rtnl_configure_link() fails, peer needs to be
> > freed just like when register_netdevice() fails.
> > 
> > Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> 
> Acked-by: Oliver Hartkopp <socketcan@...tkopp.net>
> 
> Btw. as the vxcan.c driver bases on veth.c the same issue can be found 
> there!
> 
> At this point:
> https://elixir.bootlin.com/linux/latest/source/drivers/net/veth.c#L1398
> 
> err_register_dev:
>          /* nothing to do */
> err_configure_peer:
>          unregister_netdevice(peer);
>          return err; <<<<<<<<<<<<<<<<<<<<<<<
> 
> err_register_peer:
>          free_netdev(peer);
>          return err;
> }
> 
> IMO the return must be removed to fall through the next label and free 
> the netdevice too.
> 
> Would you like so send a patch for veth.c too?
> 

Sure.

Regards,
Dinghao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ