⬢ DragonFlyBSD Kernel Audit
DF-5363 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-5363",
  "title": "CISTPL_CHECKSUM bounds check ignores tuple.mult: up to 4088 bytes of bus reads past the 4096-byte CIS mapping",
  "verdict": "reproduced",
  "reproduced": true,
  "impact": "dos",
  "method": "verbatim-rig: production parser sed-extracted byte-identical from guest /usr/src (sha256-gated), driven via pccard_read_cis() with crafted CIS on guard/canary buffers",
  "reproduce": {
    "build": "sh extract.sh . && cc -O2 -Wall -o rig rig_main.c",
    "run": "./rig checksum checksum_ok",
    "expected": "BASELINE: CHECKSUM tuple with offset=4, length=4091 passes the :247-249 check (4+4091=4095 < 4096) but the read loop magnifies i by tuple.mult=2 -> exactly 2045 out-of-mapping bus reads at offsets 4096..8184 (max 8184 = 2.00x the mapping), scan then terminates normally. checksum_ok (offset 0, length 100): 0 OOB. WITH fix.diff (f5363): the magnified bound rejects the crafted tuple ('too distant') -> 0 OOB; checksum_ok still accepted (110 in-window reads); all other scenarios unchanged."
  },
  "kernel_refs": [
    "sys/bus/pccard/pccard_cis.c:62",
    "sys/bus/pccard/pccard_cis.c:130",
    "sys/bus/pccard/pccard_cis.c:131",
    "sys/bus/pccard/pccard_cis.c:145",
    "sys/bus/pccard/pccard_cis.c:221",
    "sys/bus/pccard/pccard_cis.c:237",
    "sys/bus/pccard/pccard_cis.c:247",
    "sys/bus/pccard/pccard_cis.c:248",
    "sys/bus/pccard/pccard_cis.c:255",
    "sys/bus/pccard/pccard_cis.c:259"
  ],
  "artifacts": [
    "README.md",
    "VERDICT.md",
    "extract.sh",
    "rig_shims.h",
    "rig_main.c",
    "run_matrix.sh",
    "build.sh",
    "run.sh",
    "build.log",
    "run.log",
    "fixed_run.log",
    "baseline_run.log",
    "matrix.log",
    "fix.diff",
    "extract_manifest.txt",
    "postboot_extract_manifest.txt",
    "postboot_run.log",
    "env.txt",
    "kernel_apply.log",
    "kernel_build.tail.log",
    "verdict.json",
    "manifest.json"
  ]
}