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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 3 Feb 2019 08:02:46 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Kishon Vijay Abraham I <kishon@...com>
cc:     Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        linux-kernel@...r.kernel.org
Subject: question about drivers/phy/renesas/phy-rcar-gen2.c

Hello,

I was wondering whether phy-rcar-gen2.c would use dynamically allocated
device nodes?  If so, it looks like the following code could cause a
use-after-free, due to not incrementing th reference count:

	for_each_child_of_node(dev->of_node, np) {
		struct rcar_gen2_channel *channel = drv->channels + i;
		u32 channel_num;
		int error, n;

		channel->of_node = np;
		...
	}

On the other hand, if the reference cound it incrememnted, preventing
memory leaks in the case where the probe function fails would entail some
complex rewriting of the code, so I thought it would be better to ask
first.

thanks,
julia

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ