CVE-2015-3310.patch 639 B

12345678910111213141516171819
  1. Fix buffer overflow in rc_mksid()
  2. rc_mksid converts the PID of pppd to hex to generate a pseudo-unique string.
  3. If the process id is bigger than 65535 (FFFF), its hex representation will be
  4. longer than 4 characters, resulting in a buffer overflow.
  5. The bug can be exploited to cause a remote DoS.
  6. --- ppp-2.4.7/pppd/plugins/radius/util.c
  7. +++ ppp-2.4.7/pppd/plugins/radius/util.c
  8. @@ -77,7 +77,7 @@ rc_mksid (void)
  9. static unsigned short int cnt = 0;
  10. sprintf (buf, "%08lX%04X%02hX",
  11. (unsigned long int) time (NULL),
  12. - (unsigned int) getpid (),
  13. + (unsigned int) getpid () & 0xFFFF,
  14. cnt & 0xFF);
  15. cnt++;
  16. return buf;