onekey-sec/unblob

Lack of support for tar with UNIX-compatible format

qkaiser opened this issue · 0 comments

tar archives can be created using either the USTAR format or UNIX-compatible format. Right now unblob only supports the ones using USTAR by matching on the ustar magic.

We need to extend the tar handler in order to match on UNIX-compatible header. This is a bit more complex since there is no magic value within these headers.

Specifically, a UNIX-compatible header looks like this:

typedef struct unix_header {
char name[100];
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char link[1];
char linkname[100];
} unix_header_t;