Report
GNU tar rebase_child_list can overflow when rebasing long path prefixes
7f7f33a3-05e6-4c12-8b25-ad690be2eb93
In GNU tar's name hierarchy management, duplicate directory entries are merged by rebasing child paths onto a different parent. The code computes the new allocation as child->length - old_prefix_len + new_prefix_len, then copies the parent prefix with strcpy() and appends the suffix with strcat(). If the length bookkeeping is wrong or the prefix/suffix relationship does not match the allocation assumptions, this pattern can overflow the heap buffer while reconstructing pathnames for nested archive entries.