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: <alpine.LNX.2.00.0902011036470.6140@titan.stealer.net>
Date:	Sun, 1 Feb 2009 11:22:40 +0100 (CET)
From:	Sven Wegener <sven.wegener@...aler.net>
To:	Peter Zijlstra <peterz@...radead.org>
cc:	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dave Chinner <david@...morbit.com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: Fix dirty_bytes/dirty_background_bytes sysctls on
 64bit arches

On Sun, 1 Feb 2009, Peter Zijlstra wrote:

> On Sun, 2009-02-01 at 02:22 +0100, Sven Wegener wrote:
> > We need to pass an unsigned long as the minimum, because it gets casted
> > to an unsigned long in the sysctl handler. If we pass an int, we'll
> > access four more bytes on 64bit arches, resulting in a random minimum
> > value.
> 
> If that's so, how can any of those other limit values still be good?

The problem here is that we use proc_doulongvec_minmax(), which expects an 
unsigned long. Most other sysctls use the dointvec versions and are safe, 
as long as they pass an int. If they pass a char or a short, they're 
subject to the same problem.

The other sysctls in sysctl.c that use proc_doulongvec_minmax() don't pass 
a min/max value. The others in the kernel I checked do the same or pass a 
proper unsigned long.

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