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: <1510690743.4757.16.camel@kernel.org>
Date:   Tue, 14 Nov 2017 15:19:03 -0500
From:   Jeff Layton <jlayton@...nel.org>
To:     Vitaly Lipatov <lav@...rsoft.ru>
Cc:     wine-patches <wine-patches@...ehq.org>,
        "J. Bruce Fields" <bfields@...ldses.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v3] fs/fcntl: restore checking against COMPAT_LOFF_T_MAX
 for F_GETLK64

On Tue, 2017-11-14 at 22:25 +0300, Vitaly Lipatov wrote:
> Jeff Layton писал 14.11.17 22:12:
> ...
> > Wait...
> > 
> > Does this do anything at all in the case where you pass in
> > COMPAT_LOFF_T_MAX? l_start and l_len are either off_t or loff_t
> > (depending on arch).
> > 
> > Either one will fit in the F_GETLK64/F_OFD_GETLK struct, so I don't see
> > a need to check here.
> 
> I am not sure, can off_t be bigger than loff_t ?

I don't think so, at least not in any possible situation we care about
here.

> If not, we have just skip checking against COMPAT_LOFF_T_MAX.
> 
> ...
> > > @@ -644,7 +644,7 @@ COMPAT_SYSCALL_DEFINE3(fcntl64, unsigned int, fd, 
> > > unsigned int, cmd,
> > >  		err = fcntl_getlk(f.file, convert_fcntl_cmd(cmd), &flock);
> > >  		if (err)
> > >  			break;
> > > -		err = fixup_compat_flock(&flock);
> > > +		err = fixup_compat_flock(&flock, COMPAT_LOFF_T_MAX);
> > >  		if (err)
> > >  			return err;
> > >  		err = put_compat_flock64(&flock, compat_ptr(arg));
> > 
> > Maybe a simpler fix would be to just remove the fixup_compat_flock call
> > above?
> > 

Ok. If you have a test for this, mind testing and sending a patch?

Thanks,
-- 
Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ