home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / linux_mh.asc < prev    next >
Encoding:
Text File  |  2003-06-11  |  1.9 KB  |  40 lines

  1.  
  2.    There is a security hole in Red Hat 2.1, which installs /usr/bin/mh/inc
  3. and /usr/bin/mh/msgchk suid root.  These programs are configured suid root
  4. in order to bind to a privileged port for rpop authentication.  However,
  5. there is a non-security conflict between mh and the default Red Hat 2.1
  6. configuration in that the /etc/services lists pop-2 and pop-3 services, but
  7. the mh utilities do lookups for a pop service, which doesn't exist, resulting
  8. in an inability to use any of the pop functionality.  This may be a fortunate
  9. bug, since there may be more serious security holes within the pop functions
  10. of these two program.
  11.    The security hole present in these two programs is that when opening
  12. up the configuration files in the user's home directory, root privileges
  13. are maintained, and symbolic links are followed.  This allows an arbitrary
  14. file to to be opened.  Fortunately, the program does not simply dump the
  15. contents of this file anywhere, and only certain formatting is allowed in
  16. the file to be processed by the program in order to see any output.  In
  17. the cases where it will be processed, only the first line of the file will
  18. actually be output to the user.
  19.  
  20.                    Program: /usr/bin/mh/inc, /usr/bin/mh/msgchk
  21. Affected Operating Systems: RedHat 2.1 linux distribution
  22.               Requirements: account on system
  23.                      Patch: chmod -s /usr/bin/mh/inc /usr/bin/mh/msgchk
  24.        Security Compromise: read 1st line of some arbitrary files
  25.                     Author: Dave M. (davem@cmu.edu)
  26.                   Synopsis: inc & msgchk fail to check file permissions
  27.                             before opening user configuration files
  28.                             in the user's home directory, allowing a user
  29.                             on the system to read the first line of any
  30.                             file on the system with some limitations.
  31.  
  32. Exploit:
  33. $ ln -s FILE_TO_READ ~/.mh_profile
  34. $ /usr/bin/mh/msgchk
  35.  
  36.  
  37.  
  38.  
  39.  
  40.