β¬’ DragonFlyBSD Kernel Audit
← triage Β· dashboard
DF-4517

DRM_CLOEXEC silently dropped when creating prime fds: dma_buf_fd() #if 0's the close-on-exec handling, so the validated flags lie to userspace and dma-buf fds leak across execve

Summary

The ioctl validates and forwards DRM_CLOEXEC, but the shim's dma_buf_fd has the O_CLOEXEC handling compiled out and calls fdalloc with flags=0. Exported PRIME fds stay open across execve - a sandbox/service-downgrade/setuid child silently keeps a handle to another entity's GPU buffer; combined with DF-4429 this widens cross-user GPU buffer access. Set-UF_EXCLOSE fix.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-4517 Β· 1 files
FileTypeDescriptionSize
verdict.json file 942 B view raw

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean

not_testable: no DRM device / vkernel disproportion

fix in finding markdown
per-fix-DF-4517

Confirmed kernel references

Detail

Exploit chain

[]

Evidence (decisive lines)

dma_buf_fd has O_CLOEXEC compiled out ('XXX') and calls fdalloc with flags=0 while the ioctls validate and forward DRM_CLOEXEC. Set-UF_EXCLOSE fix in finding markdown.

Verdict

not_run: no DRM device on guest