]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r281311: ar: Disallow directory traversal
authoremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 15:48:23 +0000 (15:48 +0000)
committeremaste <emaste@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 24 Apr 2015 15:48:23 +0000 (15:48 +0000)
commit2e35c11bd92ebd64f185e59f8bde6feb8854fa78
treec57e565288bb5ed99ed2897129368b04bf85904c
parentcf11b9ad6c498f9796c2ac59a6b13a241a7ed9b3
MFC r281311: ar: Disallow directory traversal

  Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT
  as in bsdtar to prevent extraction of archive entries whose pathnames
  contain .. or whose target directory would be altered by a symlink.
  Also disallow absolute pathnames.

  We don't currently provide an option to disable this behaviour (as
  bsdtar's -P does). It is unlikely to be a problem in practice for ar(1),
  but the -P option is not currently used and available if we want to
  consider it for this purpose.

Obtained from: ELF tool chain ar, Ticket #474
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@281936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/ar/read.c