]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: apparmor: Don't audit denied access of special apparmor .null file
authorJohn Johansen <john.johansen@canonical.com>
Wed, 1 Feb 2017 09:05:57 +0000 (01:05 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 8 Mar 2017 13:35:44 +0000 (10:35 -0300)
commit38567b0e3dafaecaafdfc8b2c1f8e4487be9d09a
tree155f9c36aacbe87694dc04a2bc0e18647c40adcc
parent848b65c32ca431c0ef9b74eba4b8ec4b98e4da9d
UBUNTU: SAUCE: apparmor: Don't audit denied access of special apparmor .null file

When an fd is disallowed from being inherited during exec, instead of
closed it is duped to a special apparmor/.null file. This prevents the
fd from being reused by another file in case the application expects
the original file on a give fd (eg stdin/stdout etc). This results in
a denial message like
[32375.561535] audit: type=1400 audit(1478825963.441:358): apparmor="DENIED" operation="file_inherit" namespace="root//lxd-t_<var-lib-lxd>" profile="/sbin/dhclient" name="/dev/pts/1" pid=16795 comm="dhclient" requested_mask="wr" denied_mask="wr" fsuid=165536 ouid=165536

Further access to the fd is resultin in the rather useless denial message
of
[32375.566820] audit: type=1400 audit(1478825963.445:359): apparmor="DENIED" operation="file_perm" namespace="root//lxd-t_<var-lib-lxd>" profile="/sbin/dhclient" name="/apparmor/.null" pid=16795 comm="dhclient" requested_mask="w" denied_mask="w" fsuid=165536 ouid=0

since we have the original denial, the noisy and useless .null based
denials can be skipped.

BugLink: http://bugs.launchpad.net/bugs/1660836
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
security/apparmor/lsm.c