home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / protocol / kerberos / 979 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.4 KB  |  76 lines

  1. Newsgroups: comp.protocols.kerberos
  2. Path: sparky!uunet!stanford.edu!ATHENA.MIT.EDU!tytso
  3. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  4. Subject: If you are running a Kerberos V4 server, PLEASE APPLY THIS PATCH
  5. Message-ID: <9212302111.AA00397@tsx-11.MIT.EDU>
  6. Sender: news@shelby.stanford.edu (USENET News System)
  7. Organization: Internet-USENET Gateway at Stanford University
  8. Date: Wed, 30 Dec 1992 21:11:32 GMT
  9. Lines: 65
  10.  
  11. We have recently discovered a problem in the V4 Kerberos server; it was
  12. not properly checking the string lengths of the principal names in
  13. incoming requests.  On certain architectures, this will cause the
  14. in-core master key schedule to be overwritten, causing the KDC to fail
  15. by sending out garbage instead of tickets in response to requests, thus
  16. resulting in a fairly nasty denial-of-service attack.
  17.  
  18. I strongly urge you to apply the following patch to your V4 kerberos
  19. servers.
  20.  
  21.                         - Ted
  22.  
  23. System: Kerberos V4, any patch level
  24. Priority: MEDIUM-HIGH
  25.  
  26. *** /tmp/,RCSt1a05375    Thu Dec 17 19:25:15 1992
  27. --- kerberos.c    Thu Dec 17 18:57:33 1992
  28. ***************
  29. *** 317,322 ****
  30. --- 317,323 ----
  31.       }
  32.   }
  33.   
  34. + #define LENGTH_CHECK(str, size) if (strlen((str)) >= (size)) (str)[(size)-1]=0
  35.   
  36.   kerberos(client, pkt)
  37.       struct sockaddr_in *client;
  38. ***************
  39. *** 392,399 ****
  40. --- 393,403 ----
  41.   
  42.           /* set up and correct for byte order and alignment */
  43.           req_name_ptr = (char *) pkt_a_name(pkt);
  44. +         LENGTH_CHECK(req_name_ptr, ANAME_SZ);
  45.           req_inst_ptr = (char *) pkt_a_inst(pkt);
  46. +         LENGTH_CHECK(req_inst_ptr, INST_SZ);
  47.           req_realm_ptr = (char *) pkt_a_realm(pkt);
  48. +         LENGTH_CHECK(req_realm_ptr, REALM_SZ);
  49.           bcopy(pkt_time_ws(pkt), &req_time_ws, sizeof(req_time_ws));
  50.           /* time has to be diddled */
  51.           if (swap_bytes) {
  52. ***************
  53. *** 404,410 ****
  54. --- 408,416 ----
  55.           req_life = (u_long) (*ptr++);
  56.   
  57.           service = ptr;
  58. +         LENGTH_CHECK(service, SNAME_SZ);
  59.           instance = ptr + strlen(service) + 1;
  60. +         LENGTH_CHECK(instance, INST_SZ);
  61.   
  62.           rpkt = &rpkt_st;
  63.           klog(L_INI_REQ,
  64. ***************
  65. *** 528,534 ****
  66. --- 534,542 ----
  67.           req_life = (u_long) (*ptr++);
  68.   
  69.           service = ptr;
  70. +         LENGTH_CHECK(service, SNAME_SZ);
  71.           instance = ptr + strlen(service) + 1;
  72. +         LENGTH_CHECK(instance, INST_SZ);
  73.   
  74.           klog(L_APPL_REQ, "APPL Request %s.%s@%s on %s for %s.%s",
  75.            ad->pname, ad->pinst, ad->prealm, inet_ntoa(client_host),
  76.