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

KKASSERT bounds checks on pl_links indexing are no-ops in production kernels

Summary

acpi_pci_link.c:235/311/767/780/896 KKASSERT(i < pl_num_links) compiles to no-op without INVARIANTS (systm.h:117-118). pl_num_links computed once at attach from AcpiWalkResources (465). acpi_pci_link_srs_from_crs re-fetches _CRS (727) and walks descriptors link++/i++ (776-777). If _CRS returns different count on later call -> OOB pl_links read at 773 + OOB bitfield write at 905. link_add_crs(235) link_add_prs(311) route_irqs(896) same. Requires malicious/buggy platform AML or root ACPI table override. Not unprivileged. Fix: replace KKASSERT with hard if-return checks.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1630 Β· 1 files
FileTypeDescriptionSize
manifest.json file 400 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/dev/acpica/acpi_pci_link.c:235: KKASSERT bounds checks on pl_links indexing are no-ops in production

Verified recommended fix

Source-confirmed at sys/dev/acpica/acpi_pci_link.c:235: KKASSERT bounds checks on pl_links indexing are no-ops in production

Verdict

Source-confirmed at sys/dev/acpica/acpi_pci_link.c:235: KKASSERT bounds checks on pl_links indexing are no-ops in production