Commit 9f384a32 by devttys0

Improved CPIO signature

parent a7e4b1ca
...@@ -139,33 +139,41 @@ ...@@ -139,33 +139,41 @@
# character-header formats and thus are strings, not numbers. # character-header formats and thus are strings, not numbers.
#0 string 070707 ASCII cpio archive (pre-SVR4 or odc) #0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
# WARNING: The jump-to-offset value in the ASCII spio signatures below is a terrible hack. # WARNING: The jump-to-offset value in the ASCII cpio signatures below is a terrible hack.
# This keyword is not intended to be passed a string (%s), and doing so can open # This keyword is not intended to be passed a string (%s), and doing so can open
# up the possibility of keyword injection by a malicious file. This works here though, because: # up the possibility of keyword injection by a malicious file. This works here though, because:
# #
# 1) It would result in an invalid CPIO file (invalid size) # 1) It would result in an invalid CPIO file (invalid size)
# 2) All valid keywords require more than 8 bytes, so a valid one can't be # 2) All valid keywords require more than 8 bytes, so a valid one can't be
# injected in the %.11s field. # injected in the %.8s field.
0 string 070701 ASCII cpio archive (SVR4 with no CRC), 0 string 070701 ASCII cpio archive (SVR4 with no CRC),
>110 byte 0 invalid >110 byte 0 invalid
#>110 byte !0x2F #>110 byte !0x2F
#>>110 string !TRAILER!!! invalid #>>110 string !TRAILER!!! invalid
>94 byte <0x30 invalid
>94 byte >0x66 invalid
>54 byte <0x30 invalid
>54 byte >0x66 invalid
>110 string x file name: "%s", >110 string x file name: "%s",
>94 string x file name length: "0x%.8s", >94 string x file name length: "0x%.8s",
>54 string x file size: "0x%.8s" >54 string x file size: "0x%.8s"
>54 string x {jump-to-offset:0x%.8s+110+ >54 string x {jump-to-offset:0x%.8s+110+
>94 string x \b0x%.8s} >94 string x \b0x%.8s}
0 string 070702 ASCII cpio archive (SVR4 with CRC) 0 string 070702 ASCII cpio archive (SVR4 with CRC)
>110 byte 0 invalid >110 byte 0 invalid
#>110 byte !0x2F #>110 byte !0x2F
#>>110 string !TRAILER!!! invalid #>>110 string !TRAILER!!! invalid
>94 byte <0x30 invalid
>94 byte >0x66 invalid
>54 byte <0x30 invalid
>54 byte >0x66 invalid
>110 string x file name: "%s", >110 string x file name: "%s",
>94 string x file name length: "0x%.8s", >94 string x file name length: "0x%.8s",
>54 string x file size: "0x%.8s" >54 string x file size: "0x%.8s"
>54 string x {jump-to-offset:0x%.8s+110+ >54 string x {jump-to-offset:0x%.8s+110+
>94 string x \b0x%.8s} >94 string x \b0x%.8s}
# HP Printer Job Language # HP Printer Job Language
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment