home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v5 / text0030.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  1.4 KB

  1. From: harvard!mit-eddie!frog!rfm (Bob Mabee)
  2. Date: Sun, 2 Feb 86 20:56:51 est
  3. Organization: Charles River Data Systems, Framingham MA
  4.  
  5. Several posters have mentioned that a setuid program or shell script can be
  6. compromised by suitably altering the environment list.  This is a nasty
  7. problem because tools (the shell, library functions) are likely to develop
  8. new dependencies on the environment as new functionality is added, and we
  9. are not likely to think of all the possible attacks.
  10.  
  11. I suggest that the kernel should close this hole once and for all, by clearing
  12. the environment at the point in exec() where it implements the SETUID mode.
  13.  
  14. Some programs operate incorrectly when invoked from single-user mode, or the
  15. startup scripts, or cron, because the environment is deficient.  For example,
  16. the time zone is likely to revert to EST.  This change forces at least the
  17. SETUID programs to be tested (implies debugged) under such conditions.
  18. Obviously, the time zone should default to something inappropriate for the
  19. development site, so you notice during testing.
  20.  
  21. Instead of clearing the environment, exec() could substitute a canonical
  22. administrative environment, from a kernel holding area or from a file.
  23. Note that exec() is in a good position to fetch arbitrary files - it uses
  24. high-level kernel facilities just like a user program.
  25.  
  26.                 Bob Mabee @ Charles River Data Systems
  27.                 decvax!frog!rfm
  28.  
  29. Volume-Number: Volume 5, Number 31
  30.  
  31.