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, 6 Jan 2022 11:14:19 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>, jk@...abs.org,
        joel@....id.au, alistair@...ple.id.au, eajames@...ux.ibm.com,
        andrew@...id.au, linux-fsi@...ts.ozlabs.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] fsi: Aspeed: Fix a potential double free

On Mon, Dec 27, 2021 at 07:29:07AM +0100, Greg KH wrote:
> On Sun, Dec 26, 2021 at 05:56:02PM +0100, Christophe JAILLET wrote:
> > 'aspeed' is a devm_alloc'ed, so there is no need to free it explicitly or
> > there will be a double free().
> 
> A struct device can never be devm_alloced for obvious reasons.  Perhaps
> that is the real problem here?
> 

I don't understand how "aspeed" is a struct device.

I've been working on understanding device managed memory recently for
Smatch.  It's really complicated.  There are a bunch of rules/heuristics
that I'm slowly creating to generate new warnings but I'm a long way
from understanding it well myself.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ