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

uvc_buf_queue_req_bufs signed count handling is undefined behavior: count >= 0x80000000 makes int num negative, skipping the clamp and the allocation loop and reading an uninitialized mem (currently compiled to ENOMEM by the shipping gcc - fragile across toolchains)

Summary

num is int assigned from uint32 count: negative num skips the signed clamp and the alloc loop leaving uninitialized mem, and buf_count=num sign-extends defeating every index check for arbitrary uint32 indices. Objdump + runtime prove the shipping gcc 8.3 folds the uninit read into deterministic ENOMEM (bq->mem stays NULL) - UB real, no exploit today. mem=NULL + unsigned-clamp fix (in the validated DF-5434 diff).

Discussion (0)

No comments yet.

PoC verification

Evidence pack

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

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean
per-fix-DF-5435

Confirmed kernel references

Detail

Evidence (decisive lines)

objdump + runtime negative-evidence in findings/poc/DF-5434/

Verified recommended fix

mem=NULL + unsigned clamp (validated)

Verdict

untested (Info UB; shipping gcc folds to ENOMEM)