FireWire controllers of the type used in PCs (OHCI) have the ability to allow other FireWire devices to do remote DMA.
This feature must be enabled by the driver before it works.
The SBP-2 protocol is the only FireWire protocol that uses remote DMA; therefore, the Linux kernel enables remote DMA only for SBP-2 devices (i.e., hard disks and other storage devices), or any device that claims to be a SBP-2 device.
You can disable that driver by disabling it; write the line
.conf file in
/etc/modprobe.d, or disable
CONFIG_FIREWIRE_SBP2 when compiling the kernel.
At the moment, the
firewire-sbp2 driver relies on remote DMA for data transfers, so you have to choose between FireWire storage devices and protection from remote DMA attacks.
(It would be possible to implement those transfers in software, but this has not yet been implemented.)
The ability to read/write any memory is also useful for debugging from another system, so there is the option
CONFIG_FIREWIRE_OHCI_REMOTE_DMA that enables remote DMA for any FireWire device.
However, this option is not enabled by default.