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:	Wed, 24 Feb 2010 23:24:23 +0100
From:	roel kluin <roel.kluin@...il.com>
To:	Paul Walmsley <paul@...an.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-omap@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] OMAP: Dereference of NULL autodep in _autodep_lookup()

> Thanks for the patch, but I don't understand what problem you're
> pointing out.  If autodeps is NULL entering clkdm_init(), then the
> for-loop won't even be entered.

My first patch was wrong, but there's something I think could
be wrong. In clkdm_init() we have:

for (autodep = autodeps; autodep->pwrdm.ptr; autodep++)
        _autodep_lookup(autodep);

In _autodep_lookup() we ensure that we don't dereference
autodep by:

if (!autodep)
        return;

but if autodep can be NULL we already dereferenced it in
the aforementioned for loop, so shouldn't that be:

for (autodep = autodeps; autodep && autodep->pwrdm.ptr; autodep++)
        _autodep_lookup(autodep);

Then since this is the only call to _autodep_lookup() we can remove
that test there. Do you agree?

> It looks like there may be a problem, however, in _clkdm_add_autodeps()
> and _clkdm_del_autodeps() if no autodeps were passed in.  What do you
> think about something like the following instead?
>
>
> - Paul

Your suggested patch looks right to me as well.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ