mirror of
https://git.busybox.net/busybox
synced 2026-02-15 22:16:09 +00:00
Defends against files like these (python reproducer):
import tarfile
ti = tarfile.TarInfo("leak_hosts")
ti.type = tarfile.LNKTYPE
ti.linkname = "/etc/hosts" # or "../etc/hosts" or ".."
ti.size = 0
with tarfile.open("/tmp/hardlink.tar", "w") as t:
t.addfile(ti)
function old new delta
skip_unsafe_prefix - 127 +127
get_header_tar 1752 1754 +2
.rodata 106861 106856 -5
unzip_main 2715 2706 -9
strip_unsafe_prefix 102 18 -84
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 129/-98) Total: 31 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||
|---|---|---|
| .. | ||
| .gitignore | ||
| applet_metadata.h | ||
| applets.h.sh | ||
| applets.src.h | ||
| ar_.h | ||
| bb_archive.h | ||
| bb_e2fs_defs.h | ||
| busybox.h | ||
| dump.h | ||
| fix_u32.h | ||
| grp_.h | ||
| inet_common.h | ||
| libbb.h | ||
| liblzo_interface.h | ||
| platform.h | ||
| pwd_.h | ||
| rtc_.h | ||
| shadow_.h | ||
| unicode.h | ||
| usage.src.h | ||
| volume_id.h | ||
| xatonum.h | ||
| xregex.h | ||