home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / linux / linux-m1.asc < prev    next >
Encoding:
Text File  |  1997-03-11  |  2.0 KB  |  40 lines

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