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: <20191029133756.qpqk5vf6txapqm35@ltop.local>
Date:   Tue, 29 Oct 2019 14:37:57 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Dan Carpenter <dan.carpenter@...cle.co>,
        linux-sparse@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: detecting misuse of of_get_property

On Tue, Oct 29, 2019 at 03:55:19PM +0300, Dan Carpenter wrote:
> On Tue, Oct 29, 2019 at 12:47:50PM +0100, Luc Van Oostenryck wrote:
> > On Tue, Oct 29, 2019 at 01:50:58PM +0300, Dan Carpenter wrote:
> > > +static void match_of_get_property(const char *fn, struct expression *expr, void *unused)
> > > +{
> > > +	struct expression *left = expr->left;
> > > +	struct symbol *type;
> > > +
> > > +	type = get_type(left);
> > > +	if (!type || type->type != SYM_PTR)
> > > +		return;
> > > +	type = get_base_type(type);
> > > +	if (type_bits(type) == 8)
> > > +		return;
> > > +	if (type->type == SYM_RESTRICT)
> > > +		return;
> > 
> > Wouldn't this also silently accept assignments to any bitwise
> > type: __le32, __be16, ... ? 
> 
> It does, yes.  I'm not sure how big of an issue that is...

Probably not much if it's just a one shot for Rasmus and
probably not much more otherwise.

> I always
> just throw a check together and test it before I decide if it's worth
> investing more time into it.

Sure, but I was thinking about false negatives here.

Regards,
-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ