⬢ DragonFlyBSD Kernel Audit
DF-4919 / manifest.json
← back to finding ↓ download raw
{
  "verdict": "reproduced",
  "impact": "panic",
  "finding_id": "DF-4919",
  "summary": "_cancel_work()/flush_work() (linux_workqueue.c:331,349,364) read on_queue/running without the lock guarding their mutation (worker transition :74->:87, insert publication :134-146): premature 'idle' return while work->func() is about to execute, violating the free-after-cancel contract (:390-394) -> UAF/arbitrary-call ceiling; kernel-level panic proof (func ran after cancel_work_sync returned), fix (pending-claim + flags spinlock) validated: no confirmed hit in millions of cancel ops",
  "reproduce": {
    "build": "kldload drm; cd /tmp/df4919 && make",
    "run": "kldload /tmp/df4919/df4919.ko; sysctl hw.df4919_test=1 (posthumous-execution CONFIRMED line); sysctl hw.df4919_test=2 (panic: DF-4919 work executed AFTER cancel_work_sync() returned)",
    "expected": "baseline: '*** POSTHUMOUS EXECUTION AFTER SYNC-CANCEL/FLUSH RETURN - CONFIRMED ***' and/or panic with trace wk_func() <- wq_worker_thread(); patched drm.ko: no confirmed hit in multi-million-cancel runs, guest healthy"
  },
  "kernel_refs": [
    "sys/dev/drm/linux_workqueue.c:74",
    "sys/dev/drm/linux_workqueue.c:87",
    "sys/dev/drm/linux_workqueue.c:134",
    "sys/dev/drm/linux_workqueue.c:331",
    "sys/dev/drm/linux_workqueue.c:349",
    "sys/dev/drm/linux_workqueue.c:364",
    "sys/dev/drm/linux_workqueue.c:390",
    "sys/dev/drm/drm_framebuffer.c:475",
    "sys/dev/drm/i915/i915_irq.c:2958"
  ],
  "artifacts": [
    "README.md",
    "VERDICT.md",
    "df4919.c",
    "Makefile",
    "build.sh",
    "run.sh",
    "build.log",
    "run.log",
    "run.2.log",
    "run_fixed.log",
    "panic.txt",
    "env.txt",
    "fix.diff",
    "manifest.json",
    "verdict.json"
  ]
}