bin/102661: libarchive follows symlinks when setting flags

Kenneth Vestergaard Schmidt kvs at
Tue Aug 29 20:00:38 UTC 2006

>Number:         102661
>Category:       bin
>Synopsis:       libarchive follows symlinks when setting flags
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 29 20:00:36 GMT 2006
>Originator:     Kenneth Vestergaard Schmidt
>Release:        FreeBSD 7.0-CURRENT i386
System: FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Aug 26 03:20:52 CEST 2006 root at i386

	A warning would be produced when extracting symlinks, where
	st->st_flags is non-zero. This became a problem when creating
	ports-packages in a unionfs-mounted directory, since the 'opaque'
	flag is set on especially symlinks in /usr/local/lib/
	Set a flag on a symlink, create a tarball containing that symlink, and

	Theoretically, this might be used to set/clear flags on the symlink-
	target, which could pose a problem.

	We've added a one-line patch to use lstat instead of stat in set_fflags(),
	but it might also be better to be able to skip flags in tar, or possibly
	ignore the opaque-flag.


More information about the freebsd-bugs mailing list