Let dpkg scripts ptrace
Some dpkg maintainer scripts run pidof, which needs the sys_ptrace capability.
Mar 17 15:14:31 caligula kernel: audit(1205766871.788:13): avc: denied {sys_ptrace } for pid=4214 comm="pidof" capability=19 scontext=system_u:system_r:dpkg_script_t:s0 tcontext=system_u:system_r:dpkg_script_t:s0 tclass=capability
Signature · 1 line
Martin Orr
Written by: Martin Orr
Allow dpkg scripts to run pidof
Mar 17 15:14:31 caligula kernel: audit(1205766871.788:13): avc: denied { sys_ptrace } for pid=4214 comm="pidof" capability=19 scontext=system_u:system_r:dpkg_script_t:s0 tcontext=system_u:system_r:dpkg_script_t:s0 tclass=capabilitymodules/admin/dpkg.te renamed from modules/admin/dpkg.te.orig +1 -1
@@ -216,7 +216,7 @@ # # TODO: actually use dpkg_script_t -allow dpkg_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot sys_nice mknod kill }; +allow dpkg_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot sys_nice mknod kill sys_ptrace }; allow dpkg_script_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap }; allow dpkg_script_t self:fd use; allow dpkg_script_t self:fifo_file rw_fifo_file_perms;
Quoted 6 lines · Martin Orr
Some dpkg maintainer scripts run pidof, which needs the
sys_ptracecapability.Mar 17 15:14:31 caligula kernel: audit(1205766871.788:13): avc: denied {
sys_ptrace} for pid=4214 comm="pidof" capability=19 scontext=system_u:system_r:dpkg_script_t:s0 tcontext=system_u:system_r:dpkg_script_t:s0 tclass=capability
Seems odd, since the ptrace process permission is not allowed. Does it work without this in enforcing?
Quoted 20 lines
plain text document attachment (118_dpkg_script_pidof) Written by: Martin Orr
Allow dpkg scripts to run pidof
Mar 17 15:14:31 caligula kernel: audit(1205766871.788:13): avc: denied { sys_ptrace } for pid=4214 comm="pidof" capability=19 scontext=system_u:system_r:dpkg_script_t:s0 tcontext=system_u:system_r:dpkg_script_t:s0 tclass=capabilityIndex: policy/modules/admin/dpkg.te
===================================================================modules/admin/dpkg.te renamed from modules/admin/dpkg.te.orig +1
-1@@ -216,7 +216,7 @@ # # TODO: actually use dpkg_script_t -allow dpkg_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot sys_nice mknod kill }; +allow dpkg_script_t self:capability { chown dac_override dac_read_search fowner fsetid setgid setuid ipc_lock sys_chroot sys_nice mknod kill sys_ptrace }; allow dpkg_script_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap }; allow dpkg_script_t self:fd use; allow dpkg_script_t self:fifo_file rw_fifo_file_perms;
Signature · 9 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150 -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Christopher J. PeBenito
Quoted 6 lines · Martin Orr
Some dpkg maintainer scripts run pidof, which needs the
sys_ptracecapability.Mar 17 15:14:31 caligula kernel: audit(1205766871.788:13): avc: denied {
sys_ptrace} for pid=4214 comm="pidof" capability=19 scontext=system_u:system_r:dpkg_script_t:s0 tcontext=system_u:system_r:dpkg_script_t:s0 tclass=capabilitySeems odd, since the ptrace process permission is not allowed. Does it work without this in enforcing?
It comes from trying to stat /proc/*/exe - proc_pid_readlink always checks ptrace access. It would indeed be strange if pidof really wanted to ptrace anything.
Best wishes,
Signature · 6 lines
Martin Orr -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.