After tarclose(), libtar.c releases the memory pointed to by pointer t. After tarclose() is called in the list() function, it continues to use pointer t: freelonglinklongname(t->thbuf) . As a result, the released memory is used (use-after-free).
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnulongname, causing an out-of-bounds read.
Last updated 31 March 2025
Last updated 31 March 2025