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:	Fri, 30 Sep 2011 13:30:10 -0500
From:	Steve French <smfrench@...il.com>
To:	Jeff Layton <jlayton@...ba.org>
Cc:	Anton Altaparmakov <aia21@....ac.uk>,
	Steve French <sfrench@...ba.org>, linux-cifs@...r.kernel.org,
	samba-technical@...ts.samba.org,
	LKML <linux-kernel@...r.kernel.org>,
	PWF Linux <pwf-linux@....cam.ac.uk>
Subject: Re: CIFS kernel module bug

On Fri, Sep 30, 2011 at 1:04 PM, Jeff Layton <jlayton@...ba.org> wrote:
> On Fri, 30 Sep 2011 14:58:58 +0100
> Anton Altaparmakov <aia21@....ac.uk> wrote:
>
>> Hi,
>>
>> Looking at the current kernel (in Linus' repository on github) there is a silly logic bug in the cifs module in fs/cifs/cifsfs.c::cifs_llseek() there is this bit of code:
>>
>>       /*
>>        * origin == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate
>>        * the cached file length
>>        */
>>       if (origin != SEEK_SET || origin != SEEK_CUR) {
>>
>> The logical or should be a logical and, i.e. this should be:
>>
>>       if (origin != SEEK_SET && origin != SEEK_CUR) {
>>
>> As the code is at present that line is ALWAYS true because origin is ALWAYS either != SEEK_SET or != SEEK_CUR as if it equals one it cannot equal the other and vice versa…
>>
>> So at the moment it always does the revalidation instead of only for SEEK_END, SEEK_DATA, and SEEK_HOLE.
>>
>> Best regards,
>>
>>       Anton
>
>
> Haha, good catch. Care to roll up a patch to fix that?
>
> --
> Jeff Layton <jlayton@...ba.org>
>


Yes - obviously that code was wrong, fortunately not a disaster.
Thanks for pointing this out.  If you don't want to write up
the patch let us know and we will make the trivial fix.



-- 
Thanks,

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