Even though /tmp/confined_interpreter is executing in a profile that doesn't include /usr/bin/perl in any way, the /usr/bin/perl executable is started, as evidenced by failure to load perl libraries:
/usr/bin/perl: error while loading shared libraries: libperl.so.5.18: cannot open shared object file: Permission denied
Okay, I've got a minimal test for this that doesn't rely upon anything outside of these files.
cp ~/Downloads/ confined_ interpreter. c /tmp interpreter interpreter { x86_64- linux-gnu/ libc-2. 19.so rm, confined_ interpreter ix, interpreter
cd /tmp
make confined_
sudo -s
apparmor_parser --replace <<EOF
profile /tmp/confined_
/etc/ld.so.cache r,
/lib/
/tmp/
/tmp/runme.pl wix,
}
EOF
exit
/tmp/confined_
Even though /tmp/confined_ interpreter is executing in a profile that doesn't include /usr/bin/perl in any way, the /usr/bin/perl executable is started, as evidenced by failure to load perl libraries:
/usr/bin/perl: error while loading shared libraries: libperl.so.5.18: cannot open shared object file: Permission denied
type=AVC msg=audit( 1405991249. 694:8453) : apparmor="DENIED" operation="open" profile= "/tmp/confined_ interpreter" name="/ usr/lib/ libperl. so.5.18. 2" pid=13472 comm="runme.pl" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0