<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/security.c, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-01-16T23:41:11Z</updated>
<entry>
<title>LSM: Check for NULL cred-security on free</title>
<updated>2019-01-16T23:41:11Z</updated>
<author>
<name>James Morris</name>
<email>james.morris@microsoft.com</email>
</author>
<published>2019-01-16T23:41:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5795fd38ee8194451ba3f281f075301a3696ce2'/>
<id>urn:sha1:a5795fd38ee8194451ba3f281f075301a3696ce2</id>
<content type='text'>
From: Casey Schaufler &lt;casey@schaufler-ca.com&gt;

Check that the cred security blob has been set before trying
to clean it up. There is a case during credential initialization
that could result in this.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Acked-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: James Morris &lt;james.morris@microsoft.com&gt;
Reported-by: syzbot+69ca07954461f189e808@syzkaller.appspotmail.com
</content>
</entry>
<entry>
<title>Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2019-01-05T21:25:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-01-05T21:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=505b050fdf42097883b2d37b8e796e1f11dbef50'/>
<id>urn:sha1:505b050fdf42097883b2d37b8e796e1f11dbef50</id>
<content type='text'>
Pull vfs mount API prep from Al Viro:
 "Mount API prereqs.

  Mostly that's LSM mount options cleanups. There are several minor
  fixes in there, but nothing earth-shattering (leaks on failure exits,
  mostly)"

* 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (27 commits)
  mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT
  smack: rewrite smack_sb_eat_lsm_opts()
  smack: get rid of match_token()
  smack: take the guts of smack_parse_opts_str() into a new helper
  LSM: new method: -&gt;sb_add_mnt_opt()
  selinux: rewrite selinux_sb_eat_lsm_opts()
  selinux: regularize Opt_... names a bit
  selinux: switch away from match_token()
  selinux: new helper - selinux_add_opt()
  LSM: bury struct security_mnt_opts
  smack: switch to private smack_mnt_opts
  selinux: switch to private struct selinux_mnt_opts
  LSM: hide struct security_mnt_opts from any generic code
  selinux: kill selinux_sb_get_mnt_opts()
  LSM: turn sb_eat_lsm_opts() into a method
  nfs_remount(): don't leak, don't ignore LSM options quietly
  btrfs: sanitize security_mnt_opts use
  selinux; don't open-code a loop in sb_finish_set_opts()
  LSM: split -&gt;sb_set_mnt_opts() out of -&gt;sb_kern_mount()
  new helper: security_sb_eat_lsm_opts()
  ...
</content>
</entry>
<entry>
<title>LSM: new method: -&gt;sb_add_mnt_opt()</title>
<updated>2018-12-21T16:50:02Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-15T04:42:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=757cbe597fe8490c7c0a9650ebe5d60195f151d4'/>
<id>urn:sha1:757cbe597fe8490c7c0a9650ebe5d60195f151d4</id>
<content type='text'>
Adding options to growing mnt_opts.  NFS kludge with passing
context= down into non-text-options mount switched to it, and
with that the last use of -&gt;sb_parse_opts_str() is gone.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>LSM: hide struct security_mnt_opts from any generic code</title>
<updated>2018-12-21T16:48:34Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-13T18:41:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=204cc0ccf1d49c6292aeef4c8edd1b3d10ff933c'/>
<id>urn:sha1:204cc0ccf1d49c6292aeef4c8edd1b3d10ff933c</id>
<content type='text'>
Keep void * instead, allocate on demand (in parse_str_opts, at the
moment).  Eventually both selinux and smack will be better off
with private structures with several strings in those, rather than
this "counter and two pointers to dynamically allocated arrays"
ugliness.  This commit allows to do that at leisure, without
disrupting anything outside of given module.

Changes:
	* instead of struct security_mnt_opt use an opaque pointer
initialized to NULL.
	* security_sb_eat_lsm_opts(), security_sb_parse_opts_str() and
security_free_mnt_opts() take it as var argument (i.e. as void **);
call sites are unchanged.
	* security_sb_set_mnt_opts() and security_sb_remount() take
it by value (i.e. as void *).
	* new method: -&gt;sb_free_mnt_opts().  Takes void *, does
whatever freeing that needs to be done.
	* -&gt;sb_set_mnt_opts() and -&gt;sb_remount() might get NULL as
mnt_opts argument, meaning "empty".

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>LSM: turn sb_eat_lsm_opts() into a method</title>
<updated>2018-12-21T16:47:41Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-13T01:13:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5b4002391153acebce2557af318bbdc17e235134'/>
<id>urn:sha1:5b4002391153acebce2557af318bbdc17e235134</id>
<content type='text'>
Kill -&gt;sb_copy_data() - it's used only in combination with immediately
following -&gt;sb_parse_opts_str().  Turn that combination into a new
method.

This is just a mechanical move - cleanups will be the next step.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>btrfs: sanitize security_mnt_opts use</title>
<updated>2018-12-21T16:47:08Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-10T22:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a65001e8a4d465693d0191297a6fd864c96b3147'/>
<id>urn:sha1:a65001e8a4d465693d0191297a6fd864c96b3147</id>
<content type='text'>
1) keeping a copy in btrfs_fs_info is completely pointless - we never
use it for anything.  Getting rid of that allows for simpler calling
conventions for setup_security_options() (caller is responsible for
freeing mnt_opts in all cases).

2) on remount we want to use -&gt;sb_remount(), not -&gt;sb_set_mnt_opts(),
same as we would if not for FS_BINARY_MOUNTDATA.  Behaviours *are*
close (in fact, selinux sb_set_mnt_opts() ought to punt to
sb_remount() in "already initialized" case), but let's handle
that uniformly.  And the only reason why the original btrfs changes
didn't go for security_sb_remount() in btrfs_remount() case is that
it hadn't been exported.  Let's export it for a while - it'll be
going away soon anyway.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>LSM: split -&gt;sb_set_mnt_opts() out of -&gt;sb_kern_mount()</title>
<updated>2018-12-21T16:46:42Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-05T16:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a10d7c22b34bcf744679019269bfb33ebf0b75ee'/>
<id>urn:sha1:a10d7c22b34bcf744679019269bfb33ebf0b75ee</id>
<content type='text'>
... leaving the "is it kernel-internal" logics in the caller.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>new helper: security_sb_eat_lsm_opts()</title>
<updated>2018-12-21T16:46:00Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-11-17T17:09:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f5c0c26d9008b355babb6d16f3d7c4de3bada0e7'/>
<id>urn:sha1:f5c0c26d9008b355babb6d16f3d7c4de3bada0e7</id>
<content type='text'>
combination of alloc_secdata(), security_sb_copy_data(),
security_sb_parse_opt_str() and free_secdata().

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>LSM: lift extracting and parsing LSM options into the caller of -&gt;sb_remount()</title>
<updated>2018-12-21T16:45:41Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-02T04:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c039bc3c2498724946304a8f964244a9b6af1043'/>
<id>urn:sha1:c039bc3c2498724946304a8f964244a9b6af1043</id>
<content type='text'>
This paves the way for retaining the LSM options from a common filesystem
mount context during a mount parameter parsing phase to be instituted prior
to actual mount/reconfiguration actions.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>LSM: lift parsing LSM options into the caller of -&gt;sb_kern_mount()</title>
<updated>2018-12-21T16:45:30Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2018-12-02T03:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6be8750b4cba8c37170f46b29841d112f1be749b'/>
<id>urn:sha1:6be8750b4cba8c37170f46b29841d112f1be749b</id>
<content type='text'>
This paves the way for retaining the LSM options from a common filesystem
mount context during a mount parameter parsing phase to be instituted prior
to actual mount/reconfiguration actions.

Reviewed-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
