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]
Date:	Tue, 30 Jan 2007 08:07:51 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...l.org>, Michael Tokarev <mjt@....msk.ru>,
	Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: bug reading /proc/sys/kernel/*: only first byte read.

Oleg Nesterov <oleg@...sign.ru> writes:

> On 01/30, Oleg Nesterov wrote:
>>
>> On 01/30, Andrew Morton wrote:
>> >
>> > +			if (len + pos < maxlen) {
>>                         ^^^^^^^^^^^^^^^^^^^^^^^
>> Shouldn't this be
>> 			if (len < *lenp)
>> 
>> ?
>
> On the other hand. If we may assume that original code was correct,
> we can make a simpler patch?

I think there is an issue worth fixing her.

However as far as I can tell the code has this limitation
deliberately for simplicity.

Getting the string side of this fixed even by itself is
worthwhile, although it might be worth teach people
about sys_uname and /bin/uname.  It seems is the biggest thing
people look at /proc/sys/ for...

For the non-string data the only way we can do this is to
generate it into a temporary buffer and the read out the
part of the buffer the user is requesting.  Isn't there
something in seq_file that will do this?

On the other side I'm fairly certain we can't support
short writes to magic sysctl files on the write side of things.

I do have to say I like Oleg short version of this patch.

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