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-prev] [day] [month] [year] [list]
Date:	Thu, 14 May 2015 01:22:57 -0700
From:	Joe Perches <joe@...ches.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Ron Mercer <ron.mercer@...gic.com>, linux-driver@...gic.com,
	netdev <netdev@...r.kernel.org>
Subject: Re: qla3xxx: Odd likely incorrect use of test_bit in qla3xxx.c

On Thu, 2015-05-14 at 11:01 +0300, Dan Carpenter wrote:
> On Wed, May 13, 2015 at 10:34:51AM -0700, Joe Perches wrote:
> > In case the patches you found weren't of this type,
> > there are other possibly suspicious uses with & like:
> > drivers/usb/host/ehci-tegra.c:		set_bit((wIndex & 0xff) - 1, &ehci->suspended_ports);
> That's puzzling, yes, but my instinct without looking at the context is
> that it's probably valid.

It may be valid, but at a minimum it's bad code.

Assuming wIndex is guaranteed non-zero, it likely
should be something like:

(wIndex % BITS_PER_LONG) - 1

or suspended_ports should be more than a single ulong

Anyway, thanks.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ