Package: incron
Version: 0.5.12-1+deb10u1
Severity: grave
Justification: renders package unusable

Dear Maintainer,

Incrond crashes with SIGSEGV when monitoring IN_CREATE event in a directory and 
a new directory is created inside the monitored dir.

How to reproduce :
su -
apt-get install incrond
echo root >/etc/incron.allow
echo '/home IN_CREATE,recursive=false /root/scripts/first-try $@ $#' | 
incrontab -u root -
touch /home/foo-$RANDOM # this does not crash incrond
mkdir /home/foo-$RANDOM # this crashes incrond

Here is an strace output on the incrond daemon :

  poll([{fd=4, events=POLLIN}, {fd=6, events=POLLIN}, {fd=8, events=POLLIN}], 
3, -1) = ? ERESTART_RESTARTBLOCK (Interrupted by signal)
  --- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=18788, si_uid=0} ---
  restart_syscall(<... resuming interrupted poll ...>) = 1
  read(8, "\1\0\0\0\0\1\0@\0\0\0\0\20\0\0\0foo-5175\0\0\0\0\0\0\0\0", 32768) = 
32
  stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
  getpid()                                = 20473
  sendto(3, "<78>Nov  7 17:15:47 incrond[20473]: PATH (/home) FILE (foo-5175) 
EVENT (IN_CREATE,IN_ISDIR)", 91, MSG_NOSIGNAL, NULL, 0) = 91
  inotify_rm_watch(8, 1)                  = 0
  nanosleep({tv_sec=1, tv_nsec=0}, 0x7ffe411006b0) = 0
  openat(AT_FDCWD, "/var/spool/incron/root", O_RDONLY) = 7
  fstat(7, {st_mode=S_IFREG|0600, st_size=62, ...}) = 0
  read(7, "/home\tIN_CREATE,recursive=false\t/root/scripts/first-try $@ $#\n", 
4096) = 62
  read(7, "", 4096)                       = 0
  close(7)                                = 0
  stat("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
  inotify_add_watch(8, "/home", IN_CREATE) = 2
  mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7f38a9f00000
  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7f38aa9ec000} 
---
  +++ killed by SIGSEGV +++

I'm not completely sure this is the same as #947425 . Sorry if this is the case.

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

Kernel: Linux 4.19.0-12-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages incron depends on:
ii  adduser              3.118
ii  init-system-helpers  1.56+nmu1
ii  libc6                2.28-10
ii  libgcc1              1:8.3.0-6
ii  libstdc++6           8.3.0-6
ii  lsb-base             10.2019051400

incron recommends no packages.

incron suggests no packages.

-- Configuration Files:
/etc/incron.allow [Errno 13] Permission non accordée: '/etc/incron.allow'
/etc/incron.deny [Errno 13] Permission non accordée: '/etc/incron.deny'

-- no debconf information

Reply via email to