-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/tools: import path traversal tests from squahfs-tools-ng
This adds a test for the path traversal vulnerability in rdsquashfs and adapted to work with sqsh-unpack. Thanks to @AgentD and the squahfs-tools-ng project to provide these tests.
- Loading branch information
Showing
4 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
These script and archives are taken from the [squashfs-tools-ng project](https://github.com/AgentD/squashfs-tools-ng/tree/72c8155d9fc0eaeac72c053f46ebb7b231d4596a/bin/rdsquashfs/test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
REFFILE="$SOURCE_ROOT/test/tools/ls/pathtraversal/pathtraversal.sqfs" | ||
GOTCHA="/tmp/gotcha.txt" | ||
|
||
if "$SQSH_UNPACK" "$REFFILE" / ""; then | ||
if [ -e "$GOTCHA" ]; then | ||
echo "Found $GOTCHA which should not be there" | ||
exit 1 | ||
fi | ||
fi |
Binary file not shown.