DragonFlyBSD Kernel Audit
← triage · dashboard
DF-2439

FREEBLKS bio falls through delay target switch and is dispatched to underlying pdev without offset translation

Summary

dm_target_delay_strategy only routes BUF_CMD_READ/WRITE/FLUSH into delay path; BUF_CMD_FREEBLKS (which dmstrategy passes through) falls into default branch (:221-224->232-236) which calls vn_strategy() directly on tdc->write.pdev->pdev_vnode WITHOUT applying di->offset*DEV_BSIZE (translation _submit performs at :266). FREEBLKS thus lands at wrong sectors on backing device: bio_offset is table-relative not absolute on-disk offset. Data-corruption: FREEBLKS/TRIM against dm-delay volume with non-zero table offset discards sectors at wrong offset can punch hole in adjacent partitions or filesystem metadata.

Discussion (0)

No comments yet.