⬢ DragonFlyBSD Kernel Audit
DF-5578 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-5578",
  "title": "ufm(4) ufm_do_req() reads uninitialized stack buf[0] into *retbuf before the error check -- latent DF-1062-class disclosure, contained on the current stack",
  "severity": "Info",
  "verdict": "reproduced",
  "impact": "none",
  "reproduce": {
    "build": "sh build.sh   (in-tree kmod build: /usr/src/sys/bus/u4b/misc/df5578; guarded copy of production ufm.c + cross-TU EP0 shim)",
    "run": "sh run.sh     (kldload ufmunleak.ko x3; kldunload; dmesg | grep UFM5578)",
    "expected": [
      "UFM5578: gate fflags=FREAD        : rc=13 (EACCES) out=0x12345678",
      "UFM5578: FULL FM_GET_STAT short   : rc=5 (EIO) out=0x000000cc -- LEAK BLOCKED (discarded)",
      "UFM5578: FULL FM_GET_STAT silent  : rc=5 (EIO) out=0x000000cc -- LEAK BLOCKED (discarded)",
      "UFM5578: FULL FM_GET_STAT full    : rc=0 out=0x0000005c -- device byte delivered",
      "UFM5578: FULL FM_GET_STAT shortok : rc=0 out=0x.. -- STALE STACK BYTE REACHES IOCTL CALLER",
      "UFM5578: calibrate: poison depth 1 MATCHES buf[0] slot",
      "UFM5578: RESULT: counterfactual short-ok: 18/18 pattern-match; fixed twin clean 18/18",
      "UFM5578: SET_FREQ 100700000 Hz -> SET_FREQ bReq=1 wVal=0x0022 wIdx=0x22d0 ; CMD0 bReq=0 wVal=0x0096 wIdx=0x00b7 (all bm=0xc0 wLen=1)"
    ]
  },
  "kernel_refs": [
    "sys/bus/u4b/misc/ufm.c:176-200",
    "sys/bus/u4b/misc/ufm.c:193-194",
    "sys/bus/u4b/misc/ufm.c:288-292",
    "sys/bus/u4b/usbdi.h:511-512",
    "sys/bus/u4b/usb_transfer.c:2979-2985",
    "sys/bus/u4b/usb_request.c:782-787"
  ],
  "artifacts": [
    "README.md",
    "VERDICT.md",
    "ufm5578_harness.c",
    "ufm5578_shim.c",
    "Makefile",
    "prod_guard.diff",
    "build.sh",
    "run.sh",
    "build.log",
    "build.werror_evidence.log",
    "run.log",
    "env.txt",
    "fix.diff",
    "fix_build.log",
    "fix_run.log",
    "ufmunleak.ko",
    "manifest.json",
    "verdict.json"
  ]
}