⬢ DragonFlyBSD Kernel Audit
DF-2794 / verdict.json
← back to finding ↓ download raw
{
 "finding_id": "DF-2794",
 "status": "reproduced",
 "reproduced": 1,
 "impact": "none",
 "confidence": "certain",
 "verdict": "Mechanically reproduced as root on the stock guest: fork a child; lwp_rtprio(RTP_SET, pid=child, tid=-1, {RTP_PRIO_REALTIME,31}) returns 0 (success), and the CALLER parents own rtprio then reads back type=0 prio=31 while the call was directed at the child pid - sys_lwp_rtprio resolves lp = curthread->td_lwp whenever tid==-1 regardless of the target pid (kern_resource.c:588-593 region), with the EPERM credentials check still evaluated against the TARGET process ucred (no privilege boundary is crossed; unprivileged RTP_SET on another pid is refused before any mis-targeting). On the fix kernel the same call leaves the parent at type=1 prio=0 (normal) and returns success - the operation went to the target processs first LWP.",
 "exploit_chain": "",
 "evidence": "run.log baseline: parent type 1->0 prio 0->31 after a child-directed RTP_SET; fix kernel: parent unchanged (type=1 prio=0)",
 "kernel_refs": [
  "sys/kern/kern_resource.c:588",
  "sys/kern/kern_resource.c:601",
  "sys/kern/kern_resource.c:611"
 ],
 "poc_changes": "libc provides lwp_rtprio(3); RTP_real is RTP_PRIO_REALTIME on DragonFly; SYS number 498",
 "attempts": 2,
 "guest_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64",
 "runtime_sec": 90,
 "guest_dirty": 0,
 "build_cmd": "cc -Wall -O2 -o rtprio_tid rtprio_tid.c",
 "run_cmd": "./rtprio_tid (as root)",
 "code_hash": "215785cda0c95d7b0e79b6c0b0b3024f8fe394632fe7481448479b1261ff0ec1",
 "notes": "Deny-only for unprivileged cross-process SET; root mis-targets silently",
 "recommended_fix": "When pid differs from curproc resolve the target first LWP (RB_ROOT + ESRCH on empty)",
 "fix_status": "fixed",
 "fix_baseline_reproduced": 1,
 "fix_patched_reproduced": 0,
 "fix_kernel_uname": "DragonFly dfbsd 6.5-DEVELOPMENT #1: Mon Oct 26 01:57:23 UTC 2026 root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64 (h41 fix kernel, all 41 hardening fixes applied)",
 "fix_verdict": "A/B: baseline parent becomes REALTIME/31 from a child-directed call; fix kernel parent stays NORMAL - the tid==-1 case now resolves from the target process (RB_ROOT with NULL check) when pid differs."
}