Skip to content
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

Weird cramfs header in a flashdump #6

Open
DrmnSamoLiu opened this issue Jul 11, 2022 · 1 comment
Open

Weird cramfs header in a flashdump #6

DrmnSamoLiu opened this issue Jul 11, 2022 · 1 comment

Comments

@DrmnSamoLiu
Copy link

DrmnSamoLiu commented Jul 11, 2022

Hi, my apologies for opening a issue here for a question not really related to this project. But this repo is the only way I can find to contact people who knows cramfs....

So I was looking at a NAND flash dump I obtained from a device, and noticed there are cramfs in it. However, the header looks really weird and I hope to gain some insight from professionals here.

header

Above is the header I'm talking about.
From what I read here: https://www.kernel.org/doc/html/latest/filesystems/cramfs.html
The first 4 bytes after 0x28cd3d45 magic is the size of this fs, which is 0x10000 in this case (which is already weird).
Other headers also show strange values, especially all those fsid header. It results in this "file" command output:


file

All seems quite wrong to me, and it does not pass cramfsck for sure.



Do you have any idea how and why this happen?
My thoughts for now is that this is a NAND dump and NAND chips have bad block management going on, so this could be a potential cause.
Also NAND dumps are not always 100% correct, but I'm sure at least the header I posted above is not in a bad block, and I've dumped the NAND multiple times and the cramfs headers are the same.

@npitre
Copy link
Owner

npitre commented Jul 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants