CVE-2014-0237.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Subject: The cdf_unpack_summary_info function allows remote attackers to cause a denial of service
  2. ID: CVE-2014-0237
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Tue May 6 18:20:39 2014 +0000
  5. Origin:
  6. commit b8acc83781d5a24cc5101e525d15efe0482c280d
  7. Debian-Author: Holger Levsen <holger@debian.org>
  8. Comment:
  9. made apply cleanly based on [origin]
  10. Reviewed-By: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  11. Last-Update: 2014-09-07
  12. Remove loop that kept reading the same offset (Jan Kaluza)
  13. --- a/src/cdf.c
  14. +++ b/src/cdf.c
  15. @@ -932,7 +932,7 @@
  16. cdf_unpack_summary_info(const cdf_stream_t *sst, const cdf_header_t *h,
  17. cdf_summary_info_header_t *ssi, cdf_property_info_t **info, size_t *count)
  18. {
  19. - size_t i, maxcount;
  20. + size_t maxcount;
  21. const cdf_summary_info_header_t *si =
  22. CAST(const cdf_summary_info_header_t *, sst->sst_tab);
  23. const cdf_section_declaration_t *sd =
  24. @@ -947,21 +947,13 @@
  25. ssi->si_os = CDF_TOLE2(si->si_os);
  26. ssi->si_class = si->si_class;
  27. cdf_swap_class(&ssi->si_class);
  28. - ssi->si_count = CDF_TOLE2(si->si_count);
  29. + ssi->si_count = CDF_TOLE4(si->si_count);
  30. *count = 0;
  31. maxcount = 0;
  32. *info = NULL;
  33. - for (i = 0; i < CDF_TOLE4(si->si_count); i++) {
  34. - if (i >= CDF_LOOP_LIMIT) {
  35. - DPRINTF(("Unpack summary info loop limit"));
  36. - errno = EFTYPE;
  37. - return -1;
  38. - }
  39. - if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset),
  40. - info, count, &maxcount) == -1) {
  41. - return -1;
  42. - }
  43. - }
  44. + if (cdf_read_property_info(sst, h, CDF_TOLE4(sd->sd_offset), info,
  45. + count, &maxcount) == -1)
  46. + return -1;
  47. return 0;
  48. }