Skip to content
  • Timo Teräs's avatar
    archive: fix incorrect bounds checking for memory allocation · 6b9a07d1
    Timo Teräs authored
    The value from tar header is unsigned int; keep it casted to
    unsigned int and size_t instead of (signed) int, otherwise
    the comparisons fail to do their job properly. Additionally check
    entry.size against SSIZE_MAX so the rounding up later on is
    guaranteed to not overflow.
    
    Fixes CVE-2017-9669 and CVE-2017-9671.
    Reported-by: Ariel Zelivansky from Twistlock
    6b9a07d1