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] [day] [month] [year] [list]
Date:	Wed, 30 Jul 2014 09:57:09 -0400
From:	Jonathan Corbet <corbet@....net>
To:	Abhijith Das <adas@...hat.com>
Cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	cluster-devel@...hat.com
Subject: Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and
 supporting functions

On Tue, 29 Jul 2014 18:25:57 -0400 (EDT)
Abhijith Das <adas@...hat.com> wrote:

> > > +	if ((xc->xc_xattr_mask & XSTAT_XATTR_ALL) &&
> > > +		lxd->xd_blob.xb_xattr_count) {  
> > 
> > How can that be right?  lxd is __user, it doesn't seem right to be
> > dereferencing it directly...?  
> 
> Wouldn't the call to access_ok() at the start of the syscall take care of this? All the
> __user pointers point to areas within the user supplied buffer buf and overflow past the
> end of the buffer for the last lxd is checked for.

No, dereferencing user-space pointers in the kernel is never OK.  What
if user space remapped that page after the access_ok() call?  You need
to use copy_*_user() to get at user-space structures from the kernel.

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