From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "magic" |
|---|
| subject | "Format:Cpio newc (initramfs)" |
|---|
| claim | "A cpio stream is told apart by its first bytes: ASCII 070707 odc (POSIX.1), 070727 afio large ASCII, 070701 newc (SVR4 without CRC), 070702 newc with CRC (all 6-byte magics), or a 16-bit value 070707 (octal, 0x71C7) in big-endian or little-endian order for the old binary format (bytes C7 71 little-endian). The two binary forms are only 2 bytes and match many other files: libarchive gives them a much lower bid than the ASCII ones, so require the header checks too." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Cpio newc (initramfs)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | bytes | "30 37 30 37 30 31" |
|---|
| offset | "0" |
|---|
| meaning | "newc cpio; 070702 CRC variant, 070707 odc, 070727 afio; binary format is 16-bit 070707 (0x71C7) in either byte order" |
|---|
| alternatives | | "30 37 30 37 30 32" |
| "30 37 30 37 30 37" |
| "30 37 30 37 32 37" |
| "C7 71" |
| "71 C7" |
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "the bid function tests memcmp 070707, 070727, 070701, 070702 then archive_be16dec/le16dec == 070707" |
|---|
| repo | "https://github.com/libarchive/libarchive" |
|---|
| commit | "7f149b1076f27449a6cfcb92e5046aea8590f833" |
|---|
| path | "libarchive/archive_read_support_format_cpio.c" |
|---|
| lines | "268-312" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "cpio format magics" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T02:05:20.475Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:51:44.888Z" |
|---|
| result | "confirmed" |
|---|
| method | "Fetched archive_read_support_format_cpio.c at 7f149b10: bid function memcmp 6 bytes against 070707, 070727, 070701, 070702 (bid 48 each), then archive_be16dec==070707 and archive_le16dec==070707 (bid 16). 070707 octal = 0x71C7, so C7 71 is the little-endian form." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T08:21:22.044Z" |
|---|
| summary | "Read archive_read_support_format_cpio.c 268-312: ASCII 070707/070727/070701/070702 (6 bytes, bid 48) and the binary 16-bit 070707 via archive_be16dec/le16dec (bid 16). The 2-byte binary forms C7 71…" |
|---|
| changed | |
|---|
|
|
|---|