diff options
author | Minifree Ltd <info@minifree.org> | 2016-04-30 09:16:01 (EDT) |
---|---|---|
committer | Minifree Ltd <info@minifree.org> | 2016-04-30 09:16:01 (EDT) |
commit | bccacc7a4d6f9e177b6eb33e785a06252d77a5f7 (patch) | |
tree | 64004d5ec8834145429dcf487ebe8475aa5fa03a /site/faq | |
parent | 574fd71d5efc98f66c76836a83ef8bd534934add (diff) | |
download | libreboot.org-bccacc7a4d6f9e177b6eb33e785a06252d77a5f7.zip libreboot.org-bccacc7a4d6f9e177b6eb33e785a06252d77a5f7.tar.gz libreboot.org-bccacc7a4d6f9e177b6eb33e785a06252d77a5f7.tar.bz2 |
FAQ: update the entry related to HDD firmware
IRC logs are unprofessional. Tweak the entry so that the information is
presented in a proper paragraph.
Diffstat (limited to 'site/faq')
-rw-r--r-- | site/faq/index.php | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/site/faq/index.php b/site/faq/index.php index 0c8fdb0..b525eb0 100644 --- a/site/faq/index.php +++ b/site/faq/index.php @@ -837,33 +837,35 @@ The following is based on discussion with Peter Stuge (CareBear\) in the coreboot IRC channel on Friday, 18 September 2015, when investigating whether the SATA drive itself can make use of DMA. The following is based on the datasheets linked above: </p> - <p> - <CareBear\> francis7 : so FIS type 39h is "DMA Activate FIS - Device to Host", which sounds interesting<br/> - <CareBear\> "transfer of data from the host to the device"<br/> - <CareBear\> "Upon receiving a DMA Activate, if the host adapter’s DMA controller has been programmed and armed, the host adapter shall initiate the transmission of a Data FIS and shall transmit in this FIS the data corresponding to the host memory regions indicated by the DMA controller’s context."<br/> - <CareBear\> FIS is a protocol unit, frame information structure<br/> - <CareBear\> so it seems that a drive can tell the host controller that it would like for DMA to happen, but actually unless the host software has already or will in the future set up this DMA transfer then nothing happens<br/> - <CareBear\> oh, but the drive can also send DMA Setup<br/> - <CareBear\>if a DMA Setup FIS is sent first, with the Auto-Activate bit set, then it is already set up, and the drive can initiate DMA<br/> - <CareBear\> "First party DMA is a superset capability not neccessarily supported by legacy mode devices or legacy mode device drivers but essential for accommodating future capabilities." translation: if the problem isn't already there it will be shortly<br/> - <CareBear\> "Upon receiving a DMA Setup, the receiver of the FIS shall validate the received DMA Setup request" - ie. the host is supposed to validate, but hey, maybe there's a bug there..<br/> - <CareBear\> "The specific implementation of the buffer identifier and buffer/address validation is not specified." - so noone will actually bother<br/> - <Basstard`> "the receiver of the FIS"<br/> - <CareBear\> in the case we're considering that's the host controller hardware in the chipset and/or the kernel driver<br/> - <CareBear\> most likely kernel driver<br/> - <CareBear\> francis7 : all SATA devices have flash-upgradeable firmware<br/> - That last part is important. The firmware can be upgraded from the OS.<br/> - <CareBear\> the harddrive is a nice computer-in-the-computer because it also has persistent storage<br/> - Regarding USB:<br/> - <CareBear\> then the attack surface becomes much smaller, but assuming a malicious harddrive then it can still try to get angry with the operating system<br/> - <CareBear\> a usb drive can e.g. send malformed USB descriptors (how the PS3 was broken)<br/> - (he's talking about so-called 'fuzzing' attacks) - </p> + <p> + According to those linked documents, FIS type 39h is <em>"DMA Activate FIS - Device to Host"</em>. It mentions + <em>"transfer of data from the host to the device, and goes on to say: + Upon receiving a DMA Activate, if the host adapter's DMA controller has been programmed and armed, the host adapter shall initiate the transmission of a Data FIS + and shall transmit in this FIS the data corresponding to the host memory regions indicated by the DMA controller's context."</em> + FIS is a protocol unit (Frame Information Structure). Based on this, it seems that a drive can tell the host controller that it would like + for DMA to happen, but unless the host software has already or will in the future set up this DMA transfer then nothing happens. + <strong>A drive can also send DMA Setup</strong>. + If a DMA Setup FIS is sent first, with the Auto-Activate bit set, then it is already set up, and the drive can initiate DMA. + The document goes on to say <em>"Upon receiving a DMA Setup, the receiver of the FIS shall validate the received DMA Setup request."</em> - + in other words, the host is supposed to validate; but maybe there's a bug there. + The document goes on to say <em>"The specific implementation of the buffer identifier and buffer/address validation is not specified"</em> - so noone will actually bother. + <em>"the receiver of the FIS"</em> - in the case we're considering, that's the host controller hardware in the chipset and/or the kernel driver (most + likely the kernel driver). All SATA devices have flash-upgradeable firmware, which can usually be updated by running software in the operating system (e.g. GNU/Linux); + <strong>malicious software running as root could update this firmware, or the firmware could already be malicious</strong>. + Your HDD or SSD is the perfect place for a malicious adversary to install malware, because it's a persistent storage device as well as a computer. + </p> <p> Based on this, it's safe to say that use of USB instead of SATA is advisable if security is a concern. USB 2.0 has plenty of bandwidth for many HDDs (a few high-end ones can use more bandwidth than USB 2.0 is capable of), but for SSDs it might be problematic (unless you're using USB 3.0, which is not yet usable in freedom. See <a href="#firmware-usbhost">#firmware-usbhost</a>). </p> + <p> + Use of USB is also not an absolute guarantee of safety, so do beware. The attack surface becomes much smaller, but a malicious drive could still + attempt a "fuzzing" attack (e.g. sending malformed USB descriptors, which is how the tyrant DRM on the Playstation 3 was broken, so + that users could run their own operating system and run unsigned code). + (you're probably safe, unless there's a security flaw in the USB library/driver that your OS uses. USB is generally considered one of the + safest protocols, precisely because USB devices have no DMA) + </p> <p> Other links: </p> |