net: Use ns_capable_noaudit() when determining net sysctl permissions
authorTyler Hicks <tyhicks@canonical.com>
Fri, 3 Jun 2016 04:43:22 +0000 (23:43 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:50 +0000 (08:27 +0200)
commit6af4737361aa55ac90ecb9b41915cd8fd5cade77
tree6a7193356c67a809ebe2cccc4af7359fe525244d
parentad7c1399b7d0c6788b8f5fdb5c274110f3ce6017
net: Use ns_capable_noaudit() when determining net sysctl permissions

commit d6e0d306449bcb5fa3c80e7a3edf11d45abf9ae9 upstream.

The capability check should not be audited since it is only being used
to determine the inode permissions. A failed check does not indicate a
violation of security policy but, when an LSM is enabled, a denial audit
message was being generated.

The denial audit message caused confusion for some application authors
because root-running Go applications always triggered the denial. To
prevent this confusion, the capability check in net_ctl_permissions() is
switched to the noaudit variant.

BugLink: https://launchpad.net/bugs/1465724
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sysctl_net.c