New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic improvements #36
Merged
Merged
+234
−144
Conversation
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
Modifications in cstruct API between v1.8 and v2.1 broke jefferson due to the removal of __fmt__ field in CStruct meta classes. We fixed it by rebuilding classes dynamically using the expected endianness.
…es in the future. Moving to more recent versions should be done manually once it's been tested that jefferson still works with the newly released version of cstruct.
cstruct v2.1 support
Add support for JFFS2 old magic signature (0x1984).
…each possible endianness. We make the assumption that a JFFS2 has always a fixed endianness and that nodes won't switch between endianness in the middle of a filesystem.
Autodetect endianness
…s of every inodes and discarding inodes with a path pointing outside of the extraction directory. Fix path traversal through symlinks by canonicalizing link target path using the extraction directory as root. If the link still points outside the extraction root, it gets discarded. This way symlinks reflects the reality of a filesystem on device by pointing to files within the extracted filesystem instead of files from the host executing jefferson.
Fix path traversals
…ct risk to normal end users. Those checks can be implemented by other tools where required.
Moved to mmap in order to reduce the overall memory usage and increase processing speed for large filesystems.
Memory-mapped file support
Better handling of decompression error + simpler endianness logging.
This was referenced Feb 28, 2022
Closed
Closed
|
@sviehb we have an upcoming publication about similar vulnerabilities affecting different extractors in ubi-reader, jefferson, yaffshiv, and binwalk. We requested CVEs for each of these vulnerability so that users are aware they should upgrade to the latest version (through dependabot for example). The one that was fixed in jefferson is CVE-2023-0592, you're credited as remediation reviewer :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
We worked on our own fork on a few issues and battle tested our version of jefferson against a long list of JFFS2 firmwares. This PR is the product of our improvements.
It includes:
0x1984)