home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / kb / Debian / read-only-usr < prev    next >
Internet Message Format  |  2010-12-20  |  1KB

  1. Date: Tue, 21 Dec 2010 23:19:37 +0100
  2. From: Martin Zobel-Helas <zobel@ftbfs.de>
  3. To: Vladislav Kurz <vladislav.kurz@webstep.net>
  4. Cc: debian-security@lists.debian.org
  5. Subject: Re: Long Exim break-in analysis
  6. X-Mailing-List: <debian-security@lists.debian.org> archive/latest/24247
  7.  
  8. Hi,
  9.  
  10. On Tue Dec 21, 2010 at 23:07:37 +0100, Vladislav Kurz wrote:                    
  11.  
  12. > Lessons learned:
  13. > 1. subscribe to DSA and run apt-get
  14. > 2. /var/spool, /var/tmp, /tmp and other places where unprivileged
  15. > users can write, should be mounted nosuid and even better noexec. It
  16. > seems that this could prevent the attack, or at least make it much
  17. > more difficult.
  18. >
  19. > As for point 2. it's a pity that dpkg is using /tmp and /var/lib/dpkg/
  20. > to run scripts during installation and removal of packages. It would
  21. > be nice if whole /var could be mounted noexec.
  22.  
  23. # cat apt.conf.d/01remount
  24. DPkg::Pre-Invoke {"if mount | awk '{print $3}' | grep -q '^/tmp$'; then /bin/mount -o remount,exec /tmp; fi";};
  25. DPkg::Post-Invoke {"if mount | awk '{print $3}' | grep -q '^/tmp$'; then /bin/mount -o remount,noexec /tmp; fi";};
  26.  
  27. --
  28.  Martin Zobel-Helas <zobel@debian.org>  | Debian System Administrator
  29.  Debian & GNU/Linux Developer           |           Debian Listmaster
  30.  Public key http://zobel.ftbfs.de/5d64f870.asc   -   KeyID: 5D64 F870
  31.  GPG Fingerprint:  5DB3 1301 375A A50F 07E7  302F 493E FB8E 5D64 F870
  32.  
  33.