bin/102661: libarchive follows symlinks when setting flags

Kenneth Vestergaard Schmidt kvs at pil.dk
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
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 29 20:00:36 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Kenneth Vestergaard Schmidt
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD donkey.binarysolutions.dk 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sat Aug 26 03:20:52 CEST 2006 root at donkey.binarysolutions.dk:/usr/obj/usr/src/sys/X30 i386


>Description:
	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/
>How-To-Repeat:
	Set a flag on a symlink, create a tarball containing that symlink, and
	extract.

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

>Fix:
	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.


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list