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

Integer truncation in fw_xfer_alloc_buf (int -> u_int16_t pay_len) -> length/buffer mismatch for len > 0xFFFF (latent)

Summary

fw_xfer_alloc_buf at firewire.c:956-957 xfer->send.pay_len=send_len where pay_len is u_int16_t (firewirereg.h:255) but send_len is int. kmalloc at :959/:966 uses original int -> buffer/length mismatch for len>0xFFFF. No in-tree caller in firewire.c triggers (max 8/4 bytes). fwdev.c FW_ASYREQ uses unsigned short req.len (max 65535) so also capped. Latent footgun for future callers; magnifier for fwdev.c bcopy typo. Fix: range check or widen pay_len.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1022 Β· 1 files
FileTypeDescriptionSize
manifest.json file 397 B view raw

Fix verification

not_testable
baseline reproduced→ patch + rebuild →patched clean

recommended fix identified; fix.diff not authored/validated in this batch

recommended fix identified; fix.diff not authored/validated in this batch
combined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Info severity)

Evidence (decisive lines)

Source-confirmed at sys/bus/firewire/firewire.c:949: int->u_int16_t truncation in fw_xfer_alloc_buf (length/buffer mismatch, latent)

Verified recommended fix

Source-confirmed at sys/bus/firewire/firewire.c:949: int->u_int16_t truncation in fw_xfer_alloc_buf (length/buffer mismatch, latent)

Verdict

Source-confirmed at sys/bus/firewire/firewire.c:949: int->u_int16_t truncation in fw_xfer_alloc_buf (length/buffer mismatch, latent)