abi <abi/3.0>,
include <tunables/global>
/usr/local/bin/vt {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/ssl_certs>
/home/*/** r,
deny owner /home/*/denied-dir/ r,
/etc/hosts r,
/etc/nsswitch.conf r,
/run/systemd/resolve/stub-resolv.conf r,
/usr/local/bin/vt mr,
owner /home/*/.cache/.vt.relationships.cache rw,
owner /home/*/.vt.toml rw,
}
Steps to reproduce
Launch an Ubuntu VM (I use this Vagrant-based VM implementation).
Install
vtto /usr/local/bin as root.Setting up an API key.
Run the following command to create a directory to be denied by AppArmor:
mkdir -p ~/denied-dirCreate the
/etc/apparmor.d/usr.local.bin.vtApparmor profile file as root with the following content:Run the following command as root to load the AppArmor profile in enforcing mode:
Run the following command to trigger the crash:
vt scan file -r ~/denied-dirCurrent behavior
The program crashed with:
Expected behavior
No crash
Version
1.3.0