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

debugfs amdgpu_iomem: upstream page-ownership check is #if 0'd, turning the debug file into arbitrary physical-memory read/write for debugfs holders

Summary

amdgpu_iomem_read/write translate a user-supplied bus address through the identity IOMMU map to a physical page, check only pfn_valid, then kmap + copy_to/from_user. The upstream guard restricting access to pages actually mapped by this TTM device is '#if 0 /* XXX DRAGONFLY - dev_mapping NULL atm */'. With the check gone, anyone who can open the debugfs file reads and writes ARBITRARY physical memory by llseek+read/write. Root-gated today but converts a debugging convenience into a full physmem R/W primitive. Reinstate ownership bound; 0400 until then.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-4019 Β· 2 files
FileTypeDescriptionSize
README.md file 222 B ↓ raw
verdict.json file 1001 B view raw
README.md file
↓ download raw

DF-4019

Low/Info finding β€” PoC skipped per contract (hardware-gated / dead code). Source citations in the pass-2 result block.

Fix: reinstate an ownership bound before kmap; until then create the file 0400 read-only

Fix verification

not_testable
baseline no→ patch + rebuild →patched clean

reinstate an ownership bound before kmap; until then create the file 0400 read-only

source-only
per-fix-DF-4019

Confirmed kernel references

Detail

Exploit chain

[]

Evidence (decisive lines)

source-only; path:line citations in pass-2 result block

Verdict

source-verified; root-gated via debugfs on a working amdgpu box; defense-in-depth removal vs upstream