⬢ DragonFlyBSD Kernel Audit
DF-5141 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-5141",
  "title": "mlx_pci_attach() double mlx_free() on mlx_attach() failure — kernel heap double-free/UAF",
  "verdict": "reproduced",
  "impact": "panic",
  "confidence": "certain",
  "kernel_refs": [
    "sys/dev/raid/mlx/mlx_pci.c:202",
    "sys/dev/raid/mlx/mlx_pci.c:204",
    "sys/dev/raid/mlx/mlx.c:149",
    "sys/dev/raid/mlx/mlx.c:308",
    "sys/dev/raid/mlx/mlx.c:333",
    "sys/dev/raid/mlx/mlx.c:348",
    "sys/dev/raid/mlx/mlx.c:356",
    "sys/dev/raid/mlx/mlx.c:373",
    "sys/dev/raid/mlx/mlx.c:383",
    "sys/dev/raid/mlx/mlx.c:397",
    "sys/dev/raid/mlx/mlx.c:410",
    "sys/dev/raid/mlx/mlx.c:443",
    "sys/dev/raid/mlx/mlx.c:453",
    "sys/dev/raid/mlx/mlx.c:466"
  ],
  "reproduce": {
    "build": "guest root: cd /tmp/df5141 && make SYSDIR=/usr/src/sys   (out-of-tree KLD; mlx headers copied next to df5141.c)",
    "run": "guest root: kldload /tmp/df5141/df5141.ko",
    "expected": "stock kernel: immediate 'panic: memory chunk ... is already free!' with stack chunk_mark_free <- _kfree <- bus_dma_tag_destroy <- mlx_free <- df5141_modevent; guest left in ddb. Patched kernel (fix.diff): df5141f.ko runs the fixed single-free sequence cleanly, module unloads, guest stays up."
  },
  "artifacts": [
    "README.md",
    "VERDICT.md",
    "df5141.c",
    "df5141_fixed.c",
    "Makefile",
    "build.sh",
    "run.sh",
    "build.log",
    "run.log",
    "panic.txt",
    "env.txt",
    "guest_raw_logs.txt",
    "fix.diff",
    "fix_build.log",
    "fix_poc_build.log",
    "fix_run.log",
    "manifest.json",
    "verdict.json"
  ]
}