<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/security/apparmor, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/security/apparmor?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/security/apparmor?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-01T21:34:39Z</updated>
<entry>
<title>-&gt;getprocattr(): attribute name is const char *, TYVM...</title>
<updated>2022-09-01T21:34:39Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2022-01-31T00:57:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c8e477c649b40c1a073b7a843d89e51dc0037db7'/>
<id>urn:sha1:c8e477c649b40c1a073b7a843d89e51dc0037db7</id>
<content type='text'>
cast of -&gt;d_name.name to char * is completely wrong - nothing is
allowed to modify its contents.

Reviewed-by: Christian Brauner (Microsoft) &lt;brauner@kernel.org&gt;
Acked-by: Paul Moore &lt;paul@paul-moore.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>apparmor: correct config reference to intended one</title>
<updated>2022-07-20T20:22:19Z</updated>
<author>
<name>Lukas Bulwahn</name>
<email>lukas.bulwahn@gmail.com</email>
</author>
<published>2022-07-20T12:04:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=79eb2711c919e6db10ed2b8fb22ab605121e80ea'/>
<id>urn:sha1:79eb2711c919e6db10ed2b8fb22ab605121e80ea</id>
<content type='text'>
Commit 5bfcbd22ee4e ("apparmor: Enable tuning of policy paranoid load for
embedded systems") introduces the config SECURITY_APPARMOR_PARANOID_LOAD,
but then refers in the code to SECURITY_PARANOID_LOAD; note the missing
APPARMOR in the middle.

Correct this to the introduced and intended config option.

Fixes: 5bfcbd22ee4e ("apparmor: Enable tuning of policy paranoid load for embedded systems")
Signed-off-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: move ptrace mediation to more logical task.{h,c}</title>
<updated>2022-07-19T11:14:22Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2021-11-23T07:28:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=eac931254d99c5aeb12ace02366dd338c4371164'/>
<id>urn:sha1:eac931254d99c5aeb12ace02366dd338c4371164</id>
<content type='text'>
AppArmor split out task oriented controls to their own logical file
a while ago. Ptrace mediation is better grouped with task than
ipc, so move it.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: extend policydb permission set by making use of the xbits</title>
<updated>2022-07-19T09:57:15Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2022-03-25T12:20:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f567e7fada03d4c9c5f646a439ad2356371c4147'/>
<id>urn:sha1:f567e7fada03d4c9c5f646a439ad2356371c4147</id>
<content type='text'>
The policydb permission set has left the xbits unused. Make them available
for mediation.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: allow label to carry debug flags</title>
<updated>2022-07-19T09:55:45Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2022-03-26T08:46:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c1ed5da197652318341fd36333d45e8e6d5c3359'/>
<id>urn:sha1:c1ed5da197652318341fd36333d45e8e6d5c3359</id>
<content type='text'>
Allow labels to have debug flags that can be used to trigger debug output
only from profiles/labels that are marked. This can help reduce debug
output by allowing debug to be target to a specific confinement condition.

Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: fix overlapping attachment computation</title>
<updated>2022-07-19T09:52:36Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2022-03-26T08:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2504db207146543736e877241f3b3de005cbe056'/>
<id>urn:sha1:2504db207146543736e877241f3b3de005cbe056</id>
<content type='text'>
When finding the profile via patterned attachments, the longest left
match is being set to the static compile time value and not using the
runtime computed value.

Fix this by setting the candidate value to the greater of the
precomputed value or runtime computed value.

Fixes: 21f606610502 ("apparmor: improve overlapping domain attachment resolution")
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: fix setting unconfined mode on a loaded profile</title>
<updated>2022-07-19T09:43:12Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2022-03-26T08:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3bbb7b2e9bbcd22e539e23034da753898fe3b4dc'/>
<id>urn:sha1:3bbb7b2e9bbcd22e539e23034da753898fe3b4dc</id>
<content type='text'>
When loading a profile that is set to unconfined mode, that label
flag is not set when it should be. Ensure it is set so that when
used in a label the unconfined check will be applied correctly.

Fixes: 038165070aa5 ("apparmor: allow setting any profile into the unconfined state")
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: Fix some kernel-doc comments</title>
<updated>2022-07-19T09:39:15Z</updated>
<author>
<name>Yang Li</name>
<email>yang.lee@linux.alibaba.com</email>
</author>
<published>2022-07-18T06:30:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f378973698657404f059687025e1e35f229b124c'/>
<id>urn:sha1:f378973698657404f059687025e1e35f229b124c</id>
<content type='text'>
Remove warnings found by running scripts/kernel-doc, which is caused by
using 'make W=1'.
security/apparmor/policy_ns.c:65: warning: Function parameter or member 'curr' not described in 'aa_ns_name'
security/apparmor/policy_ns.c:65: warning: Function parameter or member 'view' not described in 'aa_ns_name'
security/apparmor/policy_ns.c:65: warning: Function parameter or member 'subns' not described in 'aa_ns_name'
security/apparmor/policy_ns.c:65: warning: expecting prototype for aa_na_name(). Prototype was for aa_ns_name() instead
security/apparmor/policy_ns.c:214: warning: Function parameter or member 'view' not described in '__aa_lookupn_ns'
security/apparmor/policy_ns.c:214: warning: Excess function parameter 'base' description in '__aa_lookupn_ns'
security/apparmor/policy_ns.c:297: warning: expecting prototype for aa_create_ns(). Prototype was for __aa_find_or_create_ns() instead

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Signed-off-by: Yang Li &lt;yang.lee@linux.alibaba.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: Mark alloc_unconfined() as static</title>
<updated>2022-07-19T09:38:34Z</updated>
<author>
<name>Souptick Joarder (HPE)</name>
<email>jrdr.linux@gmail.com</email>
</author>
<published>2022-07-19T02:12:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a3f215ef088f1fc3e751dc9a5fa4c1a22f16212b'/>
<id>urn:sha1:a3f215ef088f1fc3e751dc9a5fa4c1a22f16212b</id>
<content type='text'>
Kernel test robot throws below warning -&gt;
security/apparmor/policy_ns.c:83:20: warning: no previous prototype
for function 'alloc_unconfined' [-Wmissing-prototypes]

Mark it as static.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Souptick Joarder (HPE) &lt;jrdr.linux@gmail.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
<entry>
<title>apparmor: disable showing the mode as part of a secid to secctx</title>
<updated>2022-07-14T00:18:29Z</updated>
<author>
<name>John Johansen</name>
<email>john.johansen@canonical.com</email>
</author>
<published>2020-10-06T21:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=524d8e14258a3c31bcaf915db5762e41249eb924'/>
<id>urn:sha1:524d8e14258a3c31bcaf915db5762e41249eb924</id>
<content type='text'>
Displaying the mode as part of the seectx takes up unnecessary memory,
makes it so we can't use refcounted secctx so we need to alloc/free on
every conversion from secid to secctx and introduces a space that
could be potentially mishandled by tooling.

Eg. In an audit record we get

  subj_type=firefix (enforce)

Having the mode reported is not necessary, and might even be confusing
eg. when writing an audit rule to match the above record field you
would use

  -F subj_type=firefox

ie. the mode is not included. AppArmor provides ways to find the mode
without reporting as part of the secctx. So disable this by default
before its use is wide spread and we can't. For now we add a sysctl
to control the behavior as we can't guarantee no one is using this.

Acked-by: Andrea Righi &lt;andrea.righi@canonical.com&gt;
Signed-off-by: John Johansen &lt;john.johansen@canonical.com&gt;
</content>
</entry>
</feed>
