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:	Sat, 6 Jun 2015 09:13:46 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Helge Deller <deller@....de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] compat: fix possible out-of-bound accesses in
 compat_get_bitmap() and compat_put_bitmap()

On Fri, Jun 5, 2015 at 11:24 AM, Al Viro <viro@...iv.linux.org.uk> wrote:
>
> Yes, but... if we decrement that sucker at all, why do we need to play with
> i at all?  We need exactly nr_compat_longs get_user(), so why not make _that_
> the condition in the single-level loop?

Yeah, I think that code could be clarified further, no argument there.

And wee could just do it the copy in compat_long_t directly on
little-endian and get rid of the complications entirely, but then we'd
have the worry of separate code for big-endian, so I guess that's not
worth it (it's not like this should be hugely performance-sensitive).

I think most of that code falls under "don't touch it if it ain't
broke", with the corollary being "touch it as little as possible even
when it is broke"

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