Package: init-system-helpers
Version: 1.56+nmu1
Severity: normal

The service commands seems to be able to run arbitrary commands given a 
relative path:

$ sudo service ../../bin/ls                                                     
                                                                  [ 6:25PM]
bin   dev  home        initrd.img.old  lib32  libx32      media  opt   root  
sbin  sys  usr  vmlinuz
boot  etc  initrd.img  lib             lib64  lost+found  mnt    proc  run   
srv   tmp  var  vmlinuz.old

$ sudo service ../../bin/echo hmmm                                              
                                                                  [ 6:27PM]
hmmm


Absolute paths don't work though:

$ sudo service /bin/ls                                                          
                                                               [ 6:26PM]
/bin/ls: unrecognized service



Is this intentional? Is it useful? Is it a security risk? It makes it hard to 
delegate service access
to sudo (although that may be a flawed idea in other ways).


Hamish


-- System Information:
Debian Release: 10.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-10-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages init-system-helpers depends on:
ii  perl-base  5.28.1-6+deb10u1

init-system-helpers recommends no packages.

init-system-helpers suggests no packages.

Versions of packages init-system-helpers is related to:
pn  insserv  <none>

-- no debconf information

Reply via email to