<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/jffs2/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>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>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>fix jffs2 ACLs on big-endian with 16bit mode_t</title>
<updated>2011-07-24T14:12:01Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-23T22:18:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=963945bf93e46b9bf71a07bf9c78183e0f57733a'/>
<id>urn:sha1:963945bf93e46b9bf71a07bf9c78183e0f57733a</id>
<content type='text'>
casting int * to mode_t * is not a good thing - on a *lot* of big-endian
architectures mode_t happens to be smaller than int and there it breaks
quite spectaculary...

Fucked-up-by: commit cfc8dc6f6f69ede939e09c2af06a01adee577285
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>-&gt;permission() sanitizing: don't pass flags to -&gt;check_acl()</title>
<updated>2011-07-20T05:43:21Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-06-20T23:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e40145eb111a5192e6d819f764db9d6828d1abb'/>
<id>urn:sha1:7e40145eb111a5192e6d819f764db9d6828d1abb</id>
<content type='text'>
not used in the instances anymore.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>-&gt;permission() sanitizing: pass MAY_NOT_BLOCK to -&gt;check_acl()</title>
<updated>2011-07-20T05:43:19Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-06-20T23:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c2c703929e4c41210cfa6e3f599514421bab8dc'/>
<id>urn:sha1:9c2c703929e4c41210cfa6e3f599514421bab8dc</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
