<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/security/smack/smack.h, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-10-04T14:33:46Z</updated>
<entry>
<title>lsm: infrastructure management of the sock security</title>
<updated>2024-10-04T14:33:46Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2024-07-10T21:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbec4ba70f789cb4d8fed3029d3ddf8a01f68e89'/>
<id>urn:sha1:fbec4ba70f789cb4d8fed3029d3ddf8a01f68e89</id>
<content type='text'>
[ Upstream commit 2aff9d20d50ac45dd13a013ef5231f4fb8912356 ]

Move management of the sock-&gt;sk_security blob out
of the individual security modules and into the security
infrastructure. Instead of allocating the blobs from within
the modules the modules tell the infrastructure how much
space is required, and the space is allocated there.

Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: John Johansen &lt;john.johansen@canonical.com&gt;
Acked-by: Stephen Smalley &lt;stephen.smalley.work@gmail.com&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
[PM: subject tweak]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
Stable-dep-of: 63dff3e48871 ("lsm: add the inode_free_security_rcu() LSM implementation hook")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>smack: Set the SMACK64TRANSMUTE xattr in smack_inode_init_security()</title>
<updated>2023-07-10T17:59:38Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2023-06-10T07:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=baed456a6a2f6b8bec2913a6c6a72cc811252c6e'/>
<id>urn:sha1:baed456a6a2f6b8bec2913a6c6a72cc811252c6e</id>
<content type='text'>
With the newly added ability of LSMs to supply multiple xattrs, set
SMACK64TRASMUTE in smack_inode_init_security(), instead of d_instantiate().
Do it by incrementing SMACK_INODE_INIT_XATTRS to 2 and by calling
lsm_get_xattr_slot() a second time, if the transmuting conditions are met.

The LSM infrastructure passes all xattrs provided by LSMs to the
filesystems through the initxattrs() callback, so that filesystems can
store xattrs in the disk.

After the change, the SMK_INODE_TRANSMUTE inode flag is always set by
d_instantiate() after fetching SMACK64TRANSMUTE from the disk. Before it
was done by smack_inode_post_setxattr() as result of the __vfs_setxattr()
call.

Removing __vfs_setxattr() also prevents invalidating the EVM HMAC, by
adding a new xattr without checking and updating the existing HMAC.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@huawei.com&gt;
Reviewed-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>smack: Record transmuting in smk_transmuted</title>
<updated>2023-05-11T17:05:39Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2023-05-08T17:02:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c085f3a8f23c9b444e8b99d93c15d7ce870fc4e'/>
<id>urn:sha1:2c085f3a8f23c9b444e8b99d93c15d7ce870fc4e</id>
<content type='text'>
smack_dentry_create_files_as() determines whether transmuting should occur
based on the label of the parent directory the new inode will be added to,
and not the label of the directory where it is created.

This helps for example to do transmuting on overlayfs, since the latter
first creates the inode in the working directory, and then moves it to the
correct destination.

However, despite smack_dentry_create_files_as() provides the correct label,
smack_inode_init_security() does not know from passed information whether
or not transmuting occurred. Without this information,
smack_inode_init_security() cannot set SMK_INODE_CHANGED in smk_flags,
which will result in the SMACK64TRANSMUTE xattr not being set in
smack_d_instantiate().

Thus, add the smk_transmuted field to the task_smack structure, and set it
in smack_dentry_create_files_as() to smk_task if transmuting occurred. If
smk_task is equal to smk_transmuted in smack_inode_init_security(), act as
if transmuting was successful but without taking the label from the parent
directory (the inode label was already set correctly from the current
credentials in smack_inode_alloc_security()).

Signed-off-by: Roberto Sassu &lt;roberto.sassu@huawei.com&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>smack: cleanup obsolete mount option flags</title>
<updated>2022-09-27T17:33:03Z</updated>
<author>
<name>Xiu Jianfeng</name>
</author>
<published>2022-09-08T10:35:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc71271f5b793d619f8a7d2ef905374102533c75'/>
<id>urn:sha1:cc71271f5b793d619f8a7d2ef905374102533c75</id>
<content type='text'>
These mount option flags are obsolete since commit 12085b14a444 ("smack:
switch to private smack_mnt_opts"), remove them.

Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>lsm: security_task_getsecid_subj() -&gt; security_current_getsecid_subj()</title>
<updated>2021-11-22T22:52:47Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2021-09-29T15:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6326948f940dc3f77066d5cdc44ba6afe67830c0'/>
<id>urn:sha1:6326948f940dc3f77066d5cdc44ba6afe67830c0</id>
<content type='text'>
The security_task_getsecid_subj() LSM hook invites misuse by allowing
callers to specify a task even though the hook is only safe when the
current task is referenced.  Fix this by removing the task_struct
argument to the hook, requiring LSM implementations to use the
current task.  While we are changing the hook declaration we also
rename the function to security_current_getsecid_subj() in an effort
to reinforce that the hook captures the subjective credentials of the
current task and not an arbitrary task on the system.

Reviewed-by: Serge Hallyn &lt;serge@hallyn.com&gt;
Reviewed-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>smack: mark 'smack_enabled' global variable as __initdata</title>
<updated>2021-07-20T17:34:59Z</updated>
<author>
<name>Austin Kim</name>
</author>
<published>2021-06-29T13:41:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bfc3cac0c76126995737f1b858d2cdb476be5b1d'/>
<id>urn:sha1:bfc3cac0c76126995737f1b858d2cdb476be5b1d</id>
<content type='text'>
Mark 'smack_enabled' as __initdata
since it is only used during initialization code.

Signed-off-by: Austin Kim &lt;austin.kim@lge.com&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2021-05-02T01:50:44Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2021-05-02T01:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17ae69aba89dbfa2139b7f8024b757ab3cc42f59'/>
<id>urn:sha1:17ae69aba89dbfa2139b7f8024b757ab3cc42f59</id>
<content type='text'>
Pull Landlock LSM from James Morris:
 "Add Landlock, a new LSM from Mickaël Salaün.

  Briefly, Landlock provides for unprivileged application sandboxing.

  From Mickaël's cover letter:
    "The goal of Landlock is to enable to restrict ambient rights (e.g.
     global filesystem access) for a set of processes. Because Landlock
     is a stackable LSM [1], it makes possible to create safe security
     sandboxes as new security layers in addition to the existing
     system-wide access-controls. This kind of sandbox is expected to
     help mitigate the security impact of bugs or unexpected/malicious
     behaviors in user-space applications. Landlock empowers any
     process, including unprivileged ones, to securely restrict
     themselves.

     Landlock is inspired by seccomp-bpf but instead of filtering
     syscalls and their raw arguments, a Landlock rule can restrict the
     use of kernel objects like file hierarchies, according to the
     kernel semantic. Landlock also takes inspiration from other OS
     sandbox mechanisms: XNU Sandbox, FreeBSD Capsicum or OpenBSD
     Pledge/Unveil.

     In this current form, Landlock misses some access-control features.
     This enables to minimize this patch series and ease review. This
     series still addresses multiple use cases, especially with the
     combined use of seccomp-bpf: applications with built-in sandboxing,
     init systems, security sandbox tools and security-oriented APIs [2]"

  The cover letter and v34 posting is here:

      https://lore.kernel.org/linux-security-module/20210422154123.13086-1-mic@digikod.net/

  See also:

      https://landlock.io/

  This code has had extensive design discussion and review over several
  years"

Link: https://lore.kernel.org/lkml/50db058a-7dde-441b-a7f9-f6837fe8b69f@schaufler-ca.com/ [1]
Link: https://lore.kernel.org/lkml/f646e1c7-33cf-333f-070c-0a40ad0468cd@digikod.net/ [2]

* tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  landlock: Enable user space to infer supported features
  landlock: Add user and kernel documentation
  samples/landlock: Add a sandbox manager example
  selftests/landlock: Add user space tests
  landlock: Add syscall implementations
  arch: Wire up Landlock syscalls
  fs,security: Add sb_delete hook
  landlock: Support filesystem access-control
  LSM: Infrastructure management of the superblock
  landlock: Add ptrace restrictions
  landlock: Set up the security framework and manage credentials
  landlock: Add ruleset and domain management
  landlock: Add object management
</content>
</entry>
<entry>
<title>LSM: Infrastructure management of the superblock</title>
<updated>2021-04-22T19:22:10Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2021-04-22T15:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1aea7808372eee4ad01f98e064c88c57f1e94855'/>
<id>urn:sha1:1aea7808372eee4ad01f98e064c88c57f1e94855</id>
<content type='text'>
Move management of the superblock-&gt;sb_security blob out of the
individual security modules and into the security infrastructure.
Instead of allocating the blobs from within the modules, the modules
tell the infrastructure how much space is required, and the space is
allocated there.

Cc: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: Mickaël Salaün &lt;mic@linux.microsoft.com&gt;
Reviewed-by: Stephen Smalley &lt;stephen.smalley.work@gmail.com&gt;
Acked-by: Serge Hallyn &lt;serge@hallyn.com&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20210422154123.13086-6-mic@digikod.net
Signed-off-by: James Morris &lt;jamorris@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>smack: differentiate between subjective and objective task credentials</title>
<updated>2021-03-22T19:24:14Z</updated>
<author>
<name>Paul Moore</name>
</author>
<published>2021-02-19T20:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fb057dcde11b355fc9acde95cee3b2caa5dafb0'/>
<id>urn:sha1:1fb057dcde11b355fc9acde95cee3b2caa5dafb0</id>
<content type='text'>
With the split of the security_task_getsecid() into subjective and
objective variants it's time to update Smack to ensure it is using
the correct task creds.

Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Reviewed-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Reviewed-by: John Johansen &lt;john.johansen@canonical.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>Smack: Use the netlabel cache</title>
<updated>2020-09-11T22:31:31Z</updated>
<author>
<name>Casey Schaufler</name>
</author>
<published>2020-08-12T00:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=322dd63c7f98315b5794653bc582d109841219ae'/>
<id>urn:sha1:322dd63c7f98315b5794653bc582d109841219ae</id>
<content type='text'>
Utilize the Netlabel cache mechanism for incoming packet matching.
Refactor the initialization of secattr structures, as it was being
done in two places.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
</feed>
