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]
Message-Id: <20121205133853.770451ca.akpm@linux-foundation.org>
Date:	Wed, 5 Dec 2012 13:38:53 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Alan Cox <alan@...rguk.ukuu.org.uk>, Andreas Mohr <andi@...as.de>,
	linux-kernel@...r.kernel.org, Li Shaohua <shaohua.li@...el.com>,
	linux-acpi@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: Look Ma, da kernel is b0rken

On Wed, 5 Dec 2012 16:31:21 +0100
Borislav Petkov <bp@...en8.de> wrote:

> On Wed, Dec 05, 2012 at 03:27:56PM +0000, Alan Cox wrote:
> > On Wed, 5 Dec 2012 15:29:35 +0100
> > Borislav Petkov <bp@...en8.de> wrote:
> > 
> > > On Wed, Dec 05, 2012 at 08:09:01AM +0100, Andreas Mohr wrote:
> > > > Hi,
> > > > 
> > > > drivers/pnp/pnpacpi/core.c: In function 'ispnpidacpi':
> > > > drivers/pnp/pnpacpi/core.c:65:2: warning: logical 'or' of collectively
> > > > exhaustive tests is always true [-Wlogical-op]
> > > > drivers/pnp/pnpacpi/core.c:66:2: warning: logical 'or' of collectively
> > > > exhaustive tests is always true [-Wlogical-op]
> > > > drivers/pnp/pnpacpi/core.c:67:2: warning: logical 'or' of collectively
> > > > exhaustive tests is always true [-Wlogical-op]
> > > > 
> > > > 
> > > > That's already the second less enticing -Wlogical-op issue
> > > > which was discovered by accident during less than two days
> > 
> > No it's not. It's been reported in bugzilla. I sent patches ages ago.
> > They were ignored. Coverity has had it tagged for years (and a ton more
> > of them you've not noticed yet)
> > 
> > http://article.gmane.org/gmane.linux.acpi.devel/56753/match=test_alpha
> > 
> > This isn't discovered, this is in the "If you stick your fingers in your
> > ears and hum you can't hear the screaming" category.
> 
> Hillarious!
> 
> Andrew, would you please pick up Alan's patch? It clearly fixes an
> ancient bug in the pnpacpi code.
> 

Bjorn had a review comment which appears to remain unaddressed:

: The original is definitely broken.
: 
: I think the corrected test allows PNP IDs containing '@', which
: doesn't appear legal per sec 6.1.5 of the ACPI 5.0 spec.  Should this
: be
: 
: +       if (!('A' <= (c) && (c) <= 'Z')) \
: 
: instead?

Also, the original patch is missing a signed-off-by.  Here's what I
have queued:

From: Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: pnpacpi: fix incorrect TEST_ALPHA() test

TEST_ALPHA() is broken and always returns 0.

[akpm@...ux-foundation.org: return false for '@' as well, per Bjorn]
Signed-off-by: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Andreas Mohr <andi@...as.de>
Cc: Li Shaohua <shaohua.li@...el.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 drivers/pnp/pnpacpi/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/pnp/pnpacpi/core.c~pnpacpi-fix-incorrect-test_alpha-test drivers/pnp/pnpacpi/core.c
--- a/drivers/pnp/pnpacpi/core.c~pnpacpi-fix-incorrect-test_alpha-test
+++ a/drivers/pnp/pnpacpi/core.c
@@ -58,7 +58,7 @@ static inline int __init is_exclusive_de
 	if (!(('0' <= (c) && (c) <= '9') || ('A' <= (c) && (c) <= 'F'))) \
 		return 0
 #define TEST_ALPHA(c) \
-	if (!('@' <= (c) || (c) <= 'Z')) \
+	if (!('A' <= (c) && (c) <= 'Z')) \
 		return 0
 static int __init ispnpidacpi(const char *id)
 {
_

--
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