-
Notifications
You must be signed in to change notification settings - Fork 91
Improve cramfs CRC check #397
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
Conversation
|
can we somehow identify those firmware and just disable in those cases? |
We actually need to keep the crc check, it was an endianness issue: |
8049137 to
724f7f5
Compare
martonilles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to add cases for this in the integration tests?
- swapped crc
- omitted crc
724f7f5 to
e49c817
Compare
|
I added test cases, putting this here for future reference: Don't know why people call it "disk destroyer" :( |
da5b9bc to
51fad30
Compare
We observed a sample from Cisco where the CRC value was stored in a different endianness. This is non standard but we decided to support it anyway. We also added a check for old cramfs format. If it's an old format, the CRC check always returns true because it's not supported. More information about CRC validation and old format: https://github.com/secularbird/cramfs/blob/master/cramfsck.c
51fad30 to
32320fd
Compare
Created test cases for both situations. |
We observed a sample from Cisco where the CRC value was stored in a different endianness. This is non standard but we decided to support it anyway.
We also added a check for old cramfs format. If it's an old format, the CRC check always returns true because it's not supported.
More information about CRC validation and old format: https://github.com/secularbird/cramfs/blob/master/cramfsck.c
Closes #394