<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/9p/acl.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-11-20T01:01:44Z</updated>
<entry>
<title>posix_acl: Clear SGID bit when setting file permissions</title>
<updated>2016-11-20T01:01:44Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2016-09-19T15:39:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a06d3be52bce98746341cfb290203603fd028290'/>
<id>urn:sha1:a06d3be52bce98746341cfb290203603fd028290</id>
<content type='text'>
commit 073931017b49d9458aa351605b43a7e34598caef upstream.

When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok().  Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't clear the setgid bit in
a similar way; this allows to bypass the check in chmod(2).  Fix that.

References: CVE-2016-7097
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
[bwh: Backported to 3.2:
 - Drop changes to ceph, f2fs, hfsplus, orangefs
 - Use capable() instead of capable_wrt_inode_uidgid()
 - Update ext3 and generic_acl.c as well
 - In gfs2, jfs, and xfs, take care to avoid leaking the allocated ACL if
   posix_acl_update_mode() determines it's not needed
 - Adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>switch posix_acl_equiv_mode() to umode_t *</title>
<updated>2011-08-01T06:10:06Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T22:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6952123b53cc8b334df69bba2cd0063b0d88f68'/>
<id>urn:sha1:d6952123b53cc8b334df69bba2cd0063b0d88f68</id>
<content type='text'>
... so that &amp;inode-&gt;i_mode could be passed to it

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>switch posix_acl_create() to umode_t *</title>
<updated>2011-08-01T06:09:42Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T22:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d3fb612076eebec6f67257db0c7a9666ac7e5892'/>
<id>urn:sha1:d3fb612076eebec6f67257db0c7a9666ac7e5892</id>
<content type='text'>
so we can pass &amp;inode-&gt;i_mode to it

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>p9: avoid unused variable warning</title>
<updated>2011-07-26T06:43:53Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2011-07-26T06:43:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e08dc1325feaf49eec392ee52feb2974ec3f5155'/>
<id>urn:sha1:e08dc1325feaf49eec392ee52feb2974ec3f5155</id>
<content type='text'>
Commit 4e34e719e457 ("fs: take the ACL checks to common code") removed
the use of the 'acl' variable in v9fs_iop_get_acl(), but left the
variable definition around.  Remove it to get rid of the warning:

  fs/9p/acl.c: In function ‘v9fs_iop_get_acl’:
  fs/9p/acl.c:101:20: warning: unused variable ‘acl’

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs: take the ACL checks to common code</title>
<updated>2011-07-25T18:30:23Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-07-23T15:37:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e34e719e457f2e031297175410fc0bd4016a085'/>
<id>urn:sha1:4e34e719e457f2e031297175410fc0bd4016a085</id>
<content type='text'>
Replace the -&gt;check_acl method with a -&gt;get_acl method that simply reads an
ACL from disk after having a cache miss.  This means we can replace the ACL
checking boilerplate code with a single implementation in namei.c.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>kill boilerplates around posix_acl_create_masq()</title>
<updated>2011-07-25T18:27:32Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T07:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=826cae2f2b4d726b925f43bc208a571639da4761'/>
<id>urn:sha1:826cae2f2b4d726b925f43bc208a571639da4761</id>
<content type='text'>
new helper: posix_acl_create(&amp;acl, gfp, mode_p).  Replaces acl with
modified clone, on failure releases acl and replaces with NULL.
Returns 0 or -ve on error.  All callers of posix_acl_create_masq()
switched.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>kill boilerplate around posix_acl_chmod_masq()</title>
<updated>2011-07-25T18:27:30Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T04:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc26ab5f65ae41b71df86ea46df3c3833d1d8d83'/>
<id>urn:sha1:bc26ab5f65ae41b71df86ea46df3c3833d1d8d83</id>
<content type='text'>
new helper: posix_acl_chmod(&amp;acl, gfp, mode).  Replaces acl with modified
clone or with NULL if that has failed; returns 0 or -ve on error.  All
callers of posix_acl_chmod_masq() switched to that - they'd been doing
exactly the same thing.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>9p: do no return 0 from -&gt;check_acl without actually checking</title>
<updated>2011-07-25T18:25:38Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-07-23T15:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebbb0ef2871bf3f529987313a9146cc42419a8a8'/>
<id>urn:sha1:ebbb0ef2871bf3f529987313a9146cc42419a8a8</id>
<content type='text'>
If we do not want to use ACLs we at least need to perform normal Unix
permission checks.  From the comment I'm not quite sure that's what
is intended, but if 0p wants to do permission checks entirely on the
server it needs to do so in -&gt;permission, not in -&gt;check_acl.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: move ACL cache lookup into generic code</title>
<updated>2011-07-25T18:23:39Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2011-07-23T02:30:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e77819e57f0817c6dc7cadd061acd70c604cbce2'/>
<id>urn:sha1:e77819e57f0817c6dc7cadd061acd70c604cbce2</id>
<content type='text'>
This moves logic for checking the cached ACL values from low-level
filesystems into generic code.  The end result is a streamlined ACL
check that doesn't need to load the inode-&gt;i_op-&gt;check_acl pointer at
all for the common cached case.

The filesystems also don't need to check for a non-blocking RCU walk
case in their acl_check() functions, because that is all handled at a
VFS layer.

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>9p: close ACL leaks</title>
<updated>2011-07-24T14:10:18Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T06:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ec95bf34d976b38897d1977b155a544d77b05e7'/>
<id>urn:sha1:1ec95bf34d976b38897d1977b155a544d77b05e7</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
