home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / general / cert0002.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  5.5 KB  |  196 lines

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4.  
  5. CA-89:01
  6.                                  CERT Advisory
  7.                                  January 1989
  8.                                  Passwd hole
  9. - -----------------------------------------------------------------------------
  10.  
  11. The CERT center received the following information from Keith Bostic
  12. from the Computer Systems Research Group at UC-Berkeley on Dec. 21, 1988.
  13. This patch has also been posted to comp.bugs.4bsd.ucb-fixes.
  14.  
  15. Please note that this patch will only work with BSD 4.3.  If you have
  16. 4.2 please let me know and I will forward the correct patch.
  17.  
  18. - -----------------------------------------------------------------------------
  19.  
  20. Computer Emergency Response Team (CERT)
  21. Software Engineering Institute
  22. Carnegie Mellon University
  23. Pittsburgh, PA 15213-3890
  24.  
  25. Internet: cert@cert.org
  26. Telephone: 412-268-7090 24-hour hotline: CERT personnel answer
  27.            7:30a.m.-6:00p.m. EST, on call for
  28.            emergencies other hours.
  29.  
  30. Past advisories and other information are available for anonymous ftp
  31. from cert.org (192.88.209.5).
  32.  
  33.  
  34.  
  35.  
  36. Subject: security problem in passwd
  37. Index: bin/passwd.c 4.3BSD
  38.  
  39. Description:
  40.     There's a security problem associated with the passwd(1)
  41.     program in all known Berkeley systems.  This problem is
  42.     also in most Berkeley derived systems, see your vendor
  43.     for more information.
  44.  
  45. Fix:
  46.     Apply the following patch to the file src/bin/passwd.c and
  47.     recompile/reinstall it.
  48.  
  49. *** passwd.c.orig    Wed Dec 21 08:57:41 1988
  50. - --- passwd.c    Wed Dec 21 09:00:25 1988
  51. ***************
  52. *** 332,337 ****
  53. - --- 332,339 ----
  54.       return (crypt(pwbuf, saltc));
  55.   }
  56.   
  57. + #define    STRSIZE    100
  58.   char *
  59.   getloginshell(pwd, u, arg)
  60.       struct passwd *pwd;
  61. ***************
  62. *** 338,344 ****
  63.       int u;
  64.       char *arg;
  65.   {
  66. !     static char newshell[BUFSIZ];
  67.       char *cp, *valid, *getusershell();
  68.   
  69.       if (pwd->pw_shell == 0 || *pwd->pw_shell == '\0')
  70. - --- 340,346 ----
  71.       int u;
  72.       char *arg;
  73.   {
  74. !     static char newshell[STRSIZE];
  75.       char *cp, *valid, *getusershell();
  76.   
  77.       if (pwd->pw_shell == 0 || *pwd->pw_shell == '\0')
  78. ***************
  79. *** 415,423 ****
  80.   getfingerinfo(pwd)
  81.       struct passwd *pwd;
  82.   {
  83. !     char in_str[BUFSIZ];
  84.       struct default_values *defaults, *get_defaults();
  85. !     static char answer[4*BUFSIZ];
  86.   
  87.       answer[0] = '\0';
  88.       defaults = get_defaults(pwd->pw_gecos);
  89. - --- 417,425 ----
  90.   getfingerinfo(pwd)
  91.       struct passwd *pwd;
  92.   {
  93. !     char in_str[STRSIZE];
  94.       struct default_values *defaults, *get_defaults();
  95. !     static char answer[4*STRSIZE];
  96.   
  97.       answer[0] = '\0';
  98.       defaults = get_defaults(pwd->pw_gecos);
  99. ***************
  100. *** 429,435 ****
  101.        */
  102.       do {
  103.           printf("\nName [%s]: ", defaults->name);
  104. !         (void) fgets(in_str, BUFSIZ, stdin);
  105.           if (special_case(in_str, defaults->name)) 
  106.               break;
  107.       } while (illegal_input(in_str));
  108. - --- 431,437 ----
  109.        */
  110.       do {
  111.           printf("\nName [%s]: ", defaults->name);
  112. !         (void) fgets(in_str, STRSIZE, stdin);
  113.           if (special_case(in_str, defaults->name)) 
  114.               break;
  115.       } while (illegal_input(in_str));
  116. ***************
  117. *** 440,446 ****
  118.       do {
  119.           printf("Room number (Exs: 597E or 197C) [%s]: ",
  120.               defaults->office_num);
  121. !         (void) fgets(in_str, BUFSIZ, stdin);
  122.           if (special_case(in_str, defaults->office_num))
  123.               break;
  124.       } while (illegal_input(in_str) || illegal_building(in_str));
  125. - --- 442,448 ----
  126.       do {
  127.           printf("Room number (Exs: 597E or 197C) [%s]: ",
  128.               defaults->office_num);
  129. !         (void) fgets(in_str, STRSIZE, stdin);
  130.           if (special_case(in_str, defaults->office_num))
  131.               break;
  132.       } while (illegal_input(in_str) || illegal_building(in_str));
  133. ***************
  134. *** 452,458 ****
  135.       do {
  136.           printf("Office Phone (Ex: 6426000) [%s]: ",
  137.               defaults->office_phone);
  138. !         (void) fgets(in_str, BUFSIZ, stdin);
  139.           if (special_case(in_str, defaults->office_phone))
  140.               break;
  141.           remove_hyphens(in_str);
  142. - --- 454,460 ----
  143.       do {
  144.           printf("Office Phone (Ex: 6426000) [%s]: ",
  145.               defaults->office_phone);
  146. !         (void) fgets(in_str, STRSIZE, stdin);
  147.           if (special_case(in_str, defaults->office_phone))
  148.               break;
  149.           remove_hyphens(in_str);
  150. ***************
  151. *** 464,470 ****
  152.        */
  153.       do {
  154.           printf("Home Phone (Ex: 9875432) [%s]: ", defaults->home_phone);
  155. !         (void) fgets(in_str, BUFSIZ, stdin);
  156.           if (special_case(in_str, defaults->home_phone))
  157.               break;
  158.           remove_hyphens(in_str);
  159. - --- 466,472 ----
  160.        */
  161.       do {
  162.           printf("Home Phone (Ex: 9875432) [%s]: ", defaults->home_phone);
  163. !         (void) fgets(in_str, STRSIZE, stdin);
  164.           if (special_case(in_str, defaults->home_phone))
  165.               break;
  166.           remove_hyphens(in_str);
  167. ***************
  168. *** 501,507 ****
  169.       if (input_str[length-1] != '\n') {
  170.           /* the newline and the '\0' eat up two characters */
  171.           printf("Maximum number of characters allowed is %d\n",
  172. !             BUFSIZ-2);
  173.           /* flush the rest of the input line */
  174.           while (getchar() != '\n')
  175.               /* void */;
  176. - --- 503,509 ----
  177.       if (input_str[length-1] != '\n') {
  178.           /* the newline and the '\0' eat up two characters */
  179.           printf("Maximum number of characters allowed is %d\n",
  180. !             STRSIZE-2);
  181.           /* flush the rest of the input line */
  182.           while (getchar() != '\n')
  183.               /* void */;
  184.  
  185. -----BEGIN PGP SIGNATURE-----
  186. Version: 2.6.2
  187.  
  188. iQCVAwUBMaMwYnVP+x0t4w7BAQGIIQP+LHLWu+bwSc4HCJeEj0l48f0Y++YenSBn
  189. wV/dU4Ky1g0BcgccKhDsQJBLW0jOQXqGIaSOAWTgcIaFcuFyFv/6OrgkeWupv+Q4
  190. G+F0gbNXJrscCQYa7GRuS4YA8snpQmwrICrGGC6KKgIb6+2haAj+vHL1UQI+ujAL
  191. OXJFbkBkVk4=
  192. =Uifa
  193. -----END PGP SIGNATURE-----
  194.  
  195.