Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1628210
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] |
| Date | 2017-04-21 14:50 +0200 |
| Message-ID | <tyGaB-5Ri-3@gated-at.bofh.it> (permalink) |
| References | <tyGaB-5Ri-5@gated-at.bofh.it> <tyFHz-5HC-1@gated-at.bofh.it> <tyGaB-5Ri-5@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
David Howells <dhowells@redhat.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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Unchecked flags in statx(2) [Should be fixed before 4.11-final?] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-21 14:20 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-21 14:30 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] David Howells <dhowells@redhat.com> - 2017-04-21 14:50 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] David Howells <dhowells@redhat.com> - 2017-04-21 14:50 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] David Howells <dhowells@redhat.com> - 2017-04-21 15:10 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-21 15:20 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] Andreas Dilger <adilger@dilger.ca> - 2017-04-21 20:50 +0200
Re: Unchecked flags in statx(2) [Should be fixed before 4.11-final?] "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2017-04-21 21:20 +0200
csiph-web