CVE-2014-3487.patch 1016 B

1234567891011121314151617181920212223242526272829
  1. Subject: The cdf_read_property_info function does not properly validate a stream offset
  2. ID: CVE-2014-3487
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Mon Jun 9 13:04:37 2014 +0000
  5. Origin:
  6. commit 93e063ee374b6a75729df9e7201fb511e47e259d
  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. Add missing check offset test (Francisco Alonso, Jan Kaluza at RedHat)
  13. --- a/src/cdf.c
  14. +++ b/src/cdf.c
  15. @@ -802,7 +802,11 @@
  16. if (cdf_check_stream_offset(sst, h, e, 0, __LINE__) == -1)
  17. goto out;
  18. for (i = 0; i < sh.sh_properties; i++) {
  19. - size_t ofs = CDF_GETUINT32(p, (i << 1) + 1);
  20. + size_t tail = (i << 1) + 1;
  21. + if (cdf_check_stream_offset(sst, h, p, tail * sizeof(uint32_t),
  22. + __LINE__) == -1)
  23. + goto out;
  24. + size_t ofs = CDF_GETUINT32(p, tail);
  25. q = (const uint8_t *)(const void *)
  26. ((const char *)(const void *)p + ofs
  27. - 2 * sizeof(uint32_t));