mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.1 KiB

  1. diff -Naur netkit-telnet-0.17.orig/telnet/telnet.cc netkit-telnet-0.17/telnet/telnet.cc
  2. --- netkit-telnet-0.17.orig/telnet/telnet.cc 2000-07-23 04:24:53.000000000 +0100
  3. +++ netkit-telnet-0.17/telnet/telnet.cc 2005-10-11 11:58:02.000000000 +0100
  4. @@ -1050,6 +1050,7 @@
  5. unsigned char slc_reply[128];
  6. +unsigned char const * const slc_reply_eom = &slc_reply[sizeof(slc_reply)];
  7. unsigned char *slc_replyp;
  8. void slc_start_reply(void) {
  9. @@ -1061,6 +1062,18 @@
  10. }
  11. void slc_add_reply(int func, int flags, int value) {
  12. + /* Fix security vulnerability
  13. + * http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-0469
  14. + *
  15. + * A sequence of up to 6 bytes my be written for this member of the
  16. + * SLC suboption list by this function. The end of negotiation
  17. + * command, which is written by slc_end_reply(), will require 2
  18. + * additional bytes. Do not proceed unless there is sufficient
  19. + * space for these items.
  20. + */
  21. + if (&slc_replyp[6+2] > slc_reply_eom)
  22. + return;
  23. +
  24. if ((*slc_replyp++ = func) == IAC)
  25. *slc_replyp++ = IAC;
  26. if ((*slc_replyp++ = flags) == IAC)