Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
binwalk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
binwalk
Commits
cddfede7
Unverified
Commit
cddfede7
authored
Feb 01, 2023
by
devttys0
Committed by
GitHub
Feb 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #617 from QKaiser/fix-pfs-path-traversal
fix path traversal in PFS extractor script
parents
a555eb1f
696fe34e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
unpfs.py
src/binwalk/plugins/unpfs.py
+1
-1
No files found.
src/binwalk/plugins/unpfs.py
View file @
cddfede7
...
...
@@ -104,7 +104,7 @@ class PFSExtractor(binwalk.core.plugin.Plugin):
data
=
binwalk
.
core
.
common
.
BlockFile
(
fname
,
'rb'
)
data
.
seek
(
fs
.
get_end_of_meta_data
())
for
entry
in
fs
.
entries
():
outfile_path
=
os
.
path
.
join
(
out_dir
,
entry
.
fname
)
outfile_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
out_dir
,
entry
.
fname
)
)
if
not
outfile_path
.
startswith
(
out_dir
):
binwalk
.
core
.
common
.
warning
(
"Unpfs extractor detected directory traversal attempt for file: '
%
s'. Refusing to extract."
%
outfile_path
)
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment