Skip to content

feat(handler): add support for minix filesystems#1359

Open
jstucke wants to merge 1 commit intoonekey-sec:mainfrom
jstucke:minixfs
Open

feat(handler): add support for minix filesystems#1359
jstucke wants to merge 1 commit intoonekey-sec:mainfrom
jstucke:minixfs

Conversation

@jstucke
Copy link
Contributor

@jstucke jstucke commented Jan 29, 2026

  • little endian test files were created with mkfs.minix
    • since there does not seem to be a tool to create big endian MINIX filesystems, those test files were created by byte swapping the little endian test files
  • known firmware samples with MINIX FS:
    • Trendnet IP cameras, e.g. TV-IP110W and TV-IP422WN (both MINIX FS v1 LE with 30 byte filenames)
    • Netgear switches, e.g. FSM7326P and GSM7248 (both MINIX FS v2 BE with 30 byte filenames)
    • I have not encountered MINIX v3 filesystems in firmware images, but adding it anyway was little overhead

@qkaiser qkaiser self-requested a review January 29, 2026 09:48
@qkaiser qkaiser added enhancement New feature or request format:filesystem python Pull requests that update Python code labels Jan 29, 2026
@jstucke
Copy link
Contributor Author

jstucke commented Jan 29, 2026

hmm I noticed that I should probably add a few sanity checks to calculate_chunk to avoid false positives

Copy link
Contributor

@qkaiser qkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review pass over lunch, will get back with a more detailed review.

@qkaiser
Copy link
Contributor

qkaiser commented Jan 29, 2026

@jstucke your recent contributions are highly appreciated. Keep them coming ! :)

@jstucke
Copy link
Contributor Author

jstucke commented Jan 29, 2026

@jstucke your recent contributions are highly appreciated. Keep them coming ! :)

Haha thank you for taking the time for a thorough review. I added some validity checks and tests with invalid headers. I also found the original tool from the minix project and was also able to create samples with block size > 1024 and even log_zone_size != 0 (which is not possible with the mkfs.minix included in linux), but sadly I am unable to mount the filesystems and therefore could not add any files. The validity checks seem to work, though. There is are some images on the minix download page which uses v3 with blocksize 4096 and it seems to be unpacked without problems.

I will probably fix the remaining issues tomorrow.

@jstucke jstucke force-pushed the minixfs branch 2 times, most recently from f17d888 to 57475ad Compare January 30, 2026 09:58
@jstucke jstucke force-pushed the minixfs branch 4 times, most recently from 7dc5667 to 74bf52c Compare January 30, 2026 14:53
@qkaiser
Copy link
Contributor

qkaiser commented Feb 2, 2026

@jstucke I'll do some cleanups on this branch sometimes this week, but not sure when. Hang on :)

@qkaiser
Copy link
Contributor

qkaiser commented Feb 12, 2026

Cleaning up the code and doing cross-validation as we speak. Will push my changes when I'm done.

@qkaiser qkaiser force-pushed the minixfs branch 2 times, most recently from 2e56e3c to 0a25f3e Compare February 18, 2026 09:59
@qkaiser qkaiser self-assigned this Feb 18, 2026
* little endian test files were created with mkfs.minix
  * since there does not seem to be a tool to create big endian MINIX filesystems, those test files were created by byte swapping the little endian test files
* known firmware samples with MINIX FS:
  * Trendnet IP cameras, e.g. TV-IP110W and TV-IP422WN (both MINIX FS v1 LE with 30 byte filenames)
  * Netgear switches, e.g. FSM7326P and GSM7248 (both MINIX FS v2 BE with 30 byte filenames)
@qkaiser
Copy link
Contributor

qkaiser commented Feb 28, 2026

Cleaning up the code and doing cross-validation as we speak. Will push my changes when I'm done.

@jstucke Still ongoing, will keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request format:filesystem python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants