<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/security/smack/smack_access.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-01-10T22:16:06Z</updated>
<entry>
<title>LSM: generalize flag passing to security_capable</title>
<updated>2019-01-10T22:16:06Z</updated>
<author>
<name>Micah Morton</name>
</author>
<published>2019-01-08T00:10:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f'/>
<id>urn:sha1:c1a85a00ea66cb6f0bd0f14e47c28c2b0999799f</id>
<content type='text'>
This patch provides a general mechanism for passing flags to the
security_capable LSM hook. It replaces the specific 'audit' flag that is
used to tell security_capable whether it should log an audit message for
the given capability check. The reason for generalizing this flag
passing is so we can add an additional flag that signifies whether
security_capable is being called by a setid syscall (which is needed by
the proposed SafeSetID LSM).

Signed-off-by: Micah Morton &lt;mortonm@chromium.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: James Morris &lt;james.morris@microsoft.com&gt;
</content>
</entry>
<entry>
<title>Smack: Abstract use of cred security blob</title>
<updated>2019-01-08T21:18:44Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2018-11-10T00:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b17103a8b8ae9c9ecc5e1e6501b1478ee2dc6fe4'/>
<id>urn:sha1:b17103a8b8ae9c9ecc5e1e6501b1478ee2dc6fe4</id>
<content type='text'>
Don't use the cred-&gt;security pointer directly.
Provide a helper function that provides the security blob pointer.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
[kees: adjusted for ordered init series]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>Smack: Privilege check on key operations</title>
<updated>2018-01-10T17:29:14Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2018-01-08T18:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d19dfe58b7ecbef3bd0c403c650200c57913ba1b'/>
<id>urn:sha1:d19dfe58b7ecbef3bd0c403c650200c57913ba1b</id>
<content type='text'>
Smack: Privilege check on key operations

Operations on key objects are subjected to Smack policy
even if the process is privileged. This is inconsistent
with the general behavior of Smack and may cause issues
with authentication by privileged daemons. This patch
allows processes with CAP_MAC_OVERRIDE to access keys
even if the Smack rules indicate otherwise.

Reported-by: Jose Bollo &lt;jobol@nonadev.net&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Use cap_capable in privilege check</title>
<updated>2017-06-01T16:27:21Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2017-05-31T20:23:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f28e783ff668cf5757182f6b00d488be37226bff'/>
<id>urn:sha1:f28e783ff668cf5757182f6b00d488be37226bff</id>
<content type='text'>
Use cap_capable() rather than capable() in the Smack privilege
check as the former does not invoke other security module
privilege check, while the later does. This becomes important
when stacking. It may be a problem even with minor modules.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Use GFP_KERNEL for smk_netlbl_mls().</title>
<updated>2017-04-04T22:41:15Z</updated>
<author>
<name>Tetsuo Handa</name>
</author>
<published>2016-11-14T11:12:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196'/>
<id>urn:sha1:af96f0d6394a0af59c4dd71d6bcd3b1ddfba5196</id>
<content type='text'>
Since all callers of smk_netlbl_mls() are GFP_KERNEL context
(smk_set_cipso() calls memdup_user_nul(), init_smk_fs() calls
__kernfs_new_node(), smk_import_entry() calls kzalloc(GFP_KERNEL)),
it is safe to use GFP_KERNEL from netlbl_catmap_setbit().

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Remove unnecessary smack_known_invalid</title>
<updated>2016-11-15T17:34:39Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2016-11-14T17:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=152f91d4d11a30106b9cc0b27b47e0e80b633ee8'/>
<id>urn:sha1:152f91d4d11a30106b9cc0b27b47e0e80b633ee8</id>
<content type='text'>
The invalid Smack label ("") and the Huh ("?") Smack label
serve the same purpose and having both is unnecessary.
While pulling out the invalid label it became clear that
the use of smack_from_secid() was inconsistent, so that
is repaired. The setting of inode labels to the invalid
label could never happen in a functional system, has
never been observed in the wild and is not what you'd
really want for a failure behavior in any case. That is
removed.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>vfs: make the string hashes salt the hash</title>
<updated>2016-06-11T03:21:46Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2016-06-10T14:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8387ff2577eb9ed245df9a39947f66976c6bcd02'/>
<id>urn:sha1:8387ff2577eb9ed245df9a39947f66976c6bcd02</id>
<content type='text'>
We always mixed in the parent pointer into the dentry name hash, but we
did it late at lookup time.  It turns out that we can simplify that
lookup-time action by salting the hash with the parent pointer early
instead of late.

A few other users of our string hashes also wanted to mix in their own
pointers into the hash, and those are updated to use the same mechanism.

Hash users that don't have any particular initial salt can just use the
NULL pointer as a no-salt.

Cc: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Cc: George Spelvin &lt;linux@sciencehorizons.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Smack: limited capability for changing process label</title>
<updated>2015-10-19T19:06:47Z</updated>
<author>
<name>Zbigniew Jasinski</name>
</author>
<published>2015-10-19T16:23:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38416e53936ecf896948fdeffc36b76979117952'/>
<id>urn:sha1:38416e53936ecf896948fdeffc36b76979117952</id>
<content type='text'>
This feature introduces new kernel interface:

- &lt;smack_fs&gt;/relabel-self - for setting transition labels list

This list is used to control smack label transition mechanism.
List is set by, and per process. Process can transit to new label only if
label is on the list. Only process with CAP_MAC_ADMIN capability can add
labels to this list. With this list, process can change it's label without
CAP_MAC_ADMIN but only once. After label changing, list is unset.

Changes in v2:
* use list_for_each_entry instead of _rcu during label write
* added missing description in security/Smack.txt

Changes in v3:
* squashed into one commit

Changes in v4:
* switch from global list to per-task list
* since the per-task list is accessed only by the task itself
  there is no need to use synchronization mechanisms on it

Changes in v5:
* change smackfs interface of relabel-self to the one used for onlycap
  multiple labels are accepted, separated by space, which
  replace the previous list upon write

Signed-off-by: Zbigniew Jasinski &lt;z.jasinski@samsung.com&gt;
Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Kernel threads excluded from smack checks</title>
<updated>2015-08-10T22:15:50Z</updated>
<author>
<name>Roman Kubiak</name>
</author>
<published>2015-08-10T14:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41a2d5751616e38d1e293e3cb35a6e2bc7a03473'/>
<id>urn:sha1:41a2d5751616e38d1e293e3cb35a6e2bc7a03473</id>
<content type='text'>
Adds an ignore case for kernel tasks,
so that they can access all resources.

Since kernel worker threads are spawned with
floor label, they are severely restricted by
Smack policy. It is not an issue without onlycap,
as these processes also run with root,
so CAP_MAC_OVERRIDE kicks in. But with onlycap
turned on, there is no way to change the label
for these processes.

Signed-off-by: Roman Kubiak &lt;r.kubiak@samsung.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: allow multiple labels in onlycap</title>
<updated>2015-06-02T18:53:42Z</updated>
<author>
<name>Rafal Krypa</name>
</author>
<published>2015-06-02T09:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c0d77c884461fc0dec0411e49797dc3f3651c31b'/>
<id>urn:sha1:c0d77c884461fc0dec0411e49797dc3f3651c31b</id>
<content type='text'>
Smack onlycap allows limiting of CAP_MAC_ADMIN and CAP_MAC_OVERRIDE to
processes running with the configured label. But having single privileged
label is not enough in some real use cases. On a complex system like Tizen,
there maybe few programs that need to configure Smack policy in run-time
and running them all with a single label is not always practical.
This patch extends onlycap feature for multiple labels. They are configured
in the same smackfs "onlycap" interface, separated by spaces.

Signed-off-by: Rafal Krypa &lt;r.krypa@samsung.com&gt;
</content>
</entry>
</feed>
