⬢ DragonFlyBSD Kernel Audit
DF-3557 / manifest.json
← back to finding ↓ download raw
{
  "finding_id": "DF-3557",
  "verdict": "reproduced",
  "impact": "panic",
  "confidence": "certain",
  "reproduce": {
    "build": "in guest (root): cd /usr/src/sys/netgraph7/netgraph && make; cd ../socket && make; cd ../UI && make; cc -O2 -o /root/poc57/ui_cycle /root/poc57/ui_cycle.c",
    "run": "kldload the three .ko modules, then /root/poc57/ui_cycle",
    "expected": "stock: sendto() at the FLOW injection never returns; serial console shows 'panic: assertion \"ref < &td->td_toks_end\" failed in lwkt_gettoken at lwkt_token.c:661' with recursive ng_apply_item() frames; guest dies in DDB. patched (fix.diff): sendto returns errno 62 (ELOOP), guest survives repeated runs."
  },
  "kernel_refs": [
    "sys/netgraph7/UI/ng_UI.c:145",
    "sys/netgraph7/UI/ng_UI.c:148",
    "sys/netgraph7/UI/ng_UI.c:153",
    "sys/netgraph7/UI/ng_UI.c:117",
    "sys/netgraph7/netgraph/ng_base.c:1961",
    "sys/netgraph7/netgraph/ng_base.c:3100",
    "sys/netgraph7/netgraph/ng_base.c:1804",
    "sys/netgraph7/netgraph/ng_base.c:3051",
    "sys/netgraph7/socket/ng_socket.c:301",
    "sys/netgraph7/socket/ng_socket.c:466",
    "sys/netgraph7/ng_message.h:164"
  ],
  "fix": {
    "file": "fix.diff",
    "summary": "bound nested synchronous FLOW relaying in ng_UI_rcvmsg() with an atomic nesting counter (max 8) returning ELOOP"
  }
}