]> git.ipfire.org Git - thirdparty/tar.git/commit
Use openat2 to jailify the extraction directory
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Nov 2025 21:44:10 +0000 (13:44 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Nov 2025 23:10:48 +0000 (15:10 -0800)
commit75b03fdff48916bd0654677ed21379bdb0db016d
treea1969b8b7ad71f10c4c6bb080f99e8670765c33e
parentaec5d774379fff1c60bf08209e59ed1f40fb1d43
Use openat2 to jailify the extraction directory

This addresses CVE-2025-45582.
* gnulib.modules: Add openat2.
* src/misc.c (open_subdir): New static function.
(fdbase_opendir): Use it.
* src/tar.c (open_searchdir_how): New var, replacing and
augmenting open_searchdir_flags.  All uses changed.
* tests/extrac31.at: New file.
* tests/Makefile (TESTSUITE_AT), tests/testuite.at: Add it.
NEWS
doc/tar.texi
gnulib.modules
src/common.h
src/create.c
src/misc.c
src/tar.c
tests/Makefile.am
tests/extrac31.at [new file with mode: 0644]
tests/testsuite.at