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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18482.1492778840@warthog.procyon.org.uk>
Date:   Fri, 21 Apr 2017 13:47:20 +0100
From:   David Howells <dhowells@...hat.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     dhowells@...hat.com,
        "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
        lkml <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>, hch@...radead.org
Subject: Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?]

David Howells <dhowells@...hat.com> wrote:

> > Similarly, there appears to be no check for invalid flags in the
> > 'flags' argument of statx(). Why is there also not such a check
> > there?
> 
> Like this?
> 
> 	if (mask & STATX__RESERVED)
> 		return -EINVAL;

Sorry, I misread.  You referred to flags, not mask.  There's this in
sys_statx:

	if ((flags & AT_STATX_SYNC_TYPE) == AT_STATX_SYNC_TYPE)
		return -EINVAL;

this in vfs_statx:

	if ((flags & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
		       AT_EMPTY_PATH | KSTAT_QUERY_FLAGS)) != 0)
		return -EINVAL;

and this in vfs_statx_fd:

	if (query_flags & ~KSTAT_QUERY_FLAGS)
		return -EINVAL;

I don't necessarily agree with that last one, but other people think it should
be there.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ