Package: silversearcher-ag
Version: 2.0.0-1
Severity: important
Tags: security upstream

Dear Maintainer,

here is an example of ag crashing when reading a file:

  # dd of=zob count=0 seek=16G; (sleep 0.1; truncate -s1 zob)&; ag -a lol zob
  [2]    26016 bus error (core dumped)  ag -a lol zob

This is because ag uses mmap() to read files, which can cause a SIGBUS
when the file is truncated. This is problematic because another user can
cause the process to crash. There is a scenario where a local user can
hide information from root. Maybe it is worth documenting that fact, or
not making --mmap the default.

   A related discussion happened here on the ripgrep GitHub tracker:

      https://github.com/BurntSushi/ripgrep/issues/581

Regards,
-- 
Sam.

-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages silversearcher-ag depends on:
ii  libc6     2.24-12
ii  liblzma5  5.2.2-1.3
ii  libpcre3  2:8.39-3
ii  zlib1g    1:1.2.8.dfsg-5

silversearcher-ag recommends no packages.

silversearcher-ag suggests no packages.

-- no debconf information

Reply via email to