The new pdrfork syscall leaves no audit trail, as far as I can tell. Other related functions, like pdfork and pdwait, do. Steps to Reproduce ================== 1) Build and install the attached patch 2) cd /usr/tests/sys/audit 3) sudo kyua debug process-control:pdrfork_succes Looking for 'pdrfork.*0.*return,success' in 'header,77,11,exit(2),0,Mon Jan 26 17:50:14 2026, + 406 msec,exit,Error 0,0,subject,-1,root,wheel,root,wheel,59764,0,0,0.0.0.0,return,success,0,trailer,77,' Looking for 'pdrfork.*0.*return,success' in 'header,68,11,thr_exit(2),0,Mon Jan 26 17:50:14 2026, + 651 msec,subject,-1,somers,somers,somers,somers,52024,0,0,0.0.0.0,return,success,0,trailer,68,' Looking for 'pdrfork.*0.*return,success' in 'header,68,11,thr_exit(2),0,Mon Jan 26 17:50:14 2026, + 879 msec,subject,-1,somers,somers,somers,somers,52024,0,0,0.0.0.0,return,success,0,trailer,68,' auditd(8) is running. process-control:pdrfork_success -> failed: pdrfork.*0.*return,success not found in auditpipe within the time limit
Created attachment 267516 [details] Add ATF tests for auditability of procdesc-related syscalls
CC kib, who created pdrfork.
Did you checked what actual events are read from the audit pipe? I have no idea how to monitor it. I want to know if the issue occurs in kernel, as in not creating the records at all, vs. something in userland not understanding the reported records, might be because something is not correct in the content.
I think the problem might be a missing definition in contrib/openbsm/etc/audit_event . If that's true, then auditing pdwait() only works by coincidence, since a pdwait() entry was created way back in 2012, in git rev c5119f5dec6ac1aac7c290cbe194ca9d2cadad99 . I'm testing this theory now.
(In reply to Alan Somers from comment #4) But tests open the audit_pipe directly, there is no openbsm involvement? I might mis-read the code, though.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=6253212608b4f513b1e298f11a630d9d0596560d commit 6253212608b4f513b1e298f11a630d9d0596560d Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2026-01-26 19:10:50 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2026-01-26 21:03:47 +0000 Add pdrfork to OpenBSM It's necessary for auditd to be able to log its events. Note that the recently added pdwait() syscall is only auditable because an audit event of that name was preemptively added back in 2012. PR: 292739 MFC after: 1 week Fixes: 5c2ee618d5e "sys: add pdrfork(2)" Sponsored by: ConnectWise Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54897 contrib/openbsm/etc/audit_event | 1 + contrib/openbsm/sys/bsm/audit_kevents.h | 1 + 2 files changed, 2 insertions(+)
A commit in branch stable/15 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4aead2abdae203ce2da455ca831a44f8b323ca60 commit 4aead2abdae203ce2da455ca831a44f8b323ca60 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2026-01-26 19:10:50 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2026-02-01 21:38:50 +0000 Add pdrfork to OpenBSM PR: 292739 (cherry picked from commit 6253212608b4f513b1e298f11a630d9d0596560d) contrib/openbsm/etc/audit_event | 1 + contrib/openbsm/sys/bsm/audit_kevents.h | 1 + 2 files changed, 2 insertions(+)
Merged to stable/15 in 4aead2abdae203ce2da455ca831a44f8b323ca60