CVE-2014-3710.patch 588 B

123456789101112131415161718192021222324
  1. Subject: Fix note bounds reading, Francisco Alonso / Red Hat
  2. ID: CVE-2014-3710
  3. Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Fri Oct 17 15:49:00 2014 +0000
  5. Origin:
  6. commit 39c7ac1106be844a5296d3eb5971946cc09ffda0
  7. Last-Update: 2014-11-09
  8. --- a/src/readelf.c
  9. +++ b/src/readelf.c
  10. @@ -477,6 +477,13 @@
  11. uint32_t namesz, descsz;
  12. unsigned char *nbuf = CAST(unsigned char *, vbuf);
  13. + if (xnh_sizeof + offset > size) {
  14. + /*
  15. + * We're out of note headers.
  16. + */
  17. + return xnh_sizeof + offset;
  18. + }
  19. +
  20. (void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
  21. offset += xnh_sizeof;