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: <20260123-hospitable-chinchilla-of-ampleness-3a3dc9-mkl@pengutronix.de>
Date: Fri, 23 Jan 2026 15:31:32 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Zilin Guan <zilin@....edu.cn>
Cc: mailhol@...nel.org, nicolas.ferre@...rochip.com, 
	alexandre.belloni@...tlin.com, claudiu.beznea@...on.dev, linux-can@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] can: at91_can: Fix memory leak in at91_can_probe()

On 22.01.2026 11:41:28, Zilin Guan wrote:
> In at91_can_probe(), the dev structure is allocated via alloc_candev().
> However, if the subsequent call to devm_phy_optional_get() fails, the
> code jumps directly to exit_iounmap, missing the call to free_candev().
> This results in a memory leak of the allocated net_device structure.
>
> Fix this by jumping to the exit_free label instead, which ensures that
> free_candev() is called to properly release the memory.
>
> Compile tested only. Issue found using a prototype static analysis tool
> and code review.
>
> Fixes: 3ecc09856afb ("can: at91_can: add CAN transceiver support")
> Signed-off-by: Zilin Guan <zilin@....edu.cn>

Applied to linux-can.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ