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]
Date:   Tue, 06 Aug 2019 14:35:25 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     nishkadg.linux@...il.com
Cc:     andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH] net: dsa: qca8k: Add of_node_put() in
 qca8k_setup_mdio_bus()

From: Nishka Dasgupta <nishkadg.linux@...il.com>
Date: Sun,  4 Aug 2019 21:00:18 +0530

> Each iteration of for_each_available_child_of_node() puts the previous
> node, but in the case of a return from the middle of the loop, there
> is no put, thus causing a memory leak. Hence add an of_node_put() before
> the return.
> Additionally, the local variable ports in the function 
> qca8k_setup_mdio_bus() takes the return value of of_get_child_by_name(),
> which gets a node but does not put it. If the function returns without
> putting ports, it may cause a memory leak. Hence put ports before the
> mid-loop return statement, and also outside the loop after its last usage
> in this function.
> Issues found with Coccinelle.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@...il.com>

Appplied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ