Don't plug in untrusted USB devices.
Remember kids, it's a software driver configuration. Show me that BadUSB that works on the dumb DOS operating system. No? Yeah, didn't think so. Only "clever" OS'es are pwned by this, and if you dumb them down then nothing gets to run automatically.
You can also hotglue unused ports and physically prevent unplugging the intended devices. But that's not realistic for most systems.
If someone thinks they just got a free copy of Office, and is willing to plug the USB drive in, then they're also willing to run the 'Setup.exe' on it, too.
Or, just bad phrasing on the article?
Something about full memory access before block level … or is that PCIe?
Firewire used to have DMA access via how the port was physically wired, but afaik it was fixed before being phased out. Thunderbolt also gets access to the PCIe bus (and also by extension, DMA). I'm not sure what the security situation is there.
As others have mentioned, USB devices can also do physical damage to your computer if they want to, by charging a capacitor over a few seconds then discharging it all at once.
Its generally a bad idea to plug mystery USB devices into your computer.
There is support for having the user authorize the device before logically connecting it to the rest of the system; see e.g. https://wiki.archlinux.org/title/Thunderbolt#User_device_aut...
It would not surprise me if this does nothing, because firmware implements it poorly, and/or because users click OK on everything.
The situation with firmware is not that bad, though. There are exactly two of them, Intel and Apple. Apple devices have the Apple implementation and the rest of the world Intels.
On capable hardware, IOMMU is also used (for all security levels).
Well, that's a badly configured PC then. Stop having AutoPlay enabled and this won't happen. Then next step is to format that USB drive and voila!, free thumb drive.