AppArmor really should restrict NFS access only via the file-path rules,
not via the network rules, since if an application accesses a file via
NFS, all related network traffic is initiated and controlled by the
kernel (or by kernel helper processes like automount, rpc.gssd and
nfsidmap), and not by the application.

Workaround (for /usr/bin/man only):

Add to /etc/apparmor.d/local/usr.bin.man the lines

  # TCP/UDP network access for NFS
  network inet  stream,
  network inet6 stream,
  network inet  dgram,
  network inet6 dgram,

then run

# systemctl reload apparmor

This really should be fixed in the kernel, but until then, perhaps
adding a widely-included /etc/apparmor.d/abstractions/nfs with the above
lines would be useful, as /usr/bin/man is just one example of an
affected application.

See also bug #1662552

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1784499

Title:
  AppArmor treats regular NFS file access as network op

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1784499/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to