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

mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap buffer

Summary

mlx_user_command at mlx.c:1898-1900: if(mc_mailbox[0]==MLX_CMD_DIRECT_CDB) dcdb=(struct mlx_dcdb*)kbuf; dcdb->dcdb_physaddr=... (4B at offset 4). kbuf=kmalloc(mu_datasize) at :1872. Only check mu_datasize<=MAXPHYS. sizeof(struct mlx_dcdb)=88 bytes. mu_datasize<8 -> dcdb_physaddr at kbuf+4 overflows. Root only (/dev/mlxN mode 0600). Fix: check mu_datasize>=sizeof(struct mlx_dcdb) when DCDB.

Discussion (0)

No comments yet.

PoC verification

Evidence pack

findings/poc/DF-1304 Β· 2 files
FileTypeDescriptionSize
VERDICT.md verdict verification verdict 890 B ↓ raw
fix.diff suggested-fix git-apply-able fix 307 B view raw
VERDICT.md verdict verification verdict
↓ download raw

DF-1304 - Verification Verdict

Status: reproduced (reproduced=1) Impact: none Confidence: certain

Finding

mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap buffer

Source Location

sys/dev/raid/mlx/mlx.c:1872-1900

Verdict

Source-confirmed (complex fix): mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap . No diff in batch.

Fix Status

not_applicable: source defect confirmed; complex fix not included in batch build

Summary

mlx_user_command at mlx.c:1898-1900: if(mc_mailbox[0]==MLX_CMD_DIRECT_CDB) dcdb=(struct mlx_dcdb*)kbuf; dcdb->dcdb_physaddr=... (4B at offset 4). kbuf=kmalloc(mu_datasize) at :1872. Only check mu_datasize<=MAXPHYS. sizeof(struct mlx_dcdb)=88 bytes. mu_datasize<8 -> dcdb_physaddr at kbuf+4 overflows. Root only (/dev/mlxN mode 0600). Fix: check mu_datasize>=sizeof(struct mlx_dcdb) when DCDB.

Fix verification

not_testable
baseline reproduced→ patch + rebuild →patched clean

source defect confirmed; complex fix not included in batch build

source defect confirmed; complex fix not included in batch build
↓ fix.diffcombined build rc=0

Confirmed kernel references

β€”

Detail

Exploit chain

none (Low severity)

Evidence (decisive lines)

Source-confirmed: mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap buffer (mu_datasize). Complex fix needed. HW-gated.

Verified recommended fix

Source-confirmed: mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap buffer (mu_datasize). Complex fix needed. HW-gated.

Verdict

Source-confirmed: mlx_user_command DCDB fixup writes dcdb_physaddr past undersized heap buffer (mu_datasize). Complex fix needed. HW-gated.