1 - As for the software and hardware boundaries, Alexandre olivia also
 
   2   has 2 interesting articles on the consequences for freedom of various
 
   5   https://www.fsfla.org/ikiwiki/blogs/lxo/draft/blob-fallacy
 
   6   https://www.fsfla.org/ikiwiki/blogs/lxo/draft/unshittify.en.html
 
   8   It might be interesting to take that into account somehow for a wider
 
   9   discussion and also look at the risk of nonfree software in different
 
  14 PT Security also had also very long articles on the topic in their
 
  15 blog. They also contains more background on the 'disable' bits like Alt
 
  16 disable, like why they seems to have been added and so on.
 
  21 > and prevent playback of audiovisual material by applying Digital
 
  22 > Restriction Management (DRM) [Ruan, 2014][6].
 
  26 I didn't manage to find that claim. The reality being described is a
 
  27 bit different: it can display things on the screen that cannot be
 
  28 copied by the operating system probably either by displaying things to
 
  29 the GPU directly (Intel EPT with the keypad example page 49), or in the
 
  30 next page by injecting encrypted frames along with the decryption key
 
  33 So here it doesn't really prevent the playback, it rather enables
 
  34 playback at huge freedom costs (basically loosing the control of your
 
  37 So maybe the sentence could be reworked a bit by telling that it's
 
  38 involved in DRM and telling a bit how.
 
  40 Otherwise readers might think that I want to play some forbidden video
 
  41 like a video from a resistance group in a repressive country, and then
 
  42 somehow the Management Engine would prevent me from doing that.
 
  44 Maybe it could but I'm not aware of it having done that so far.
 
  46 My feeling while reading the book chapter on DRM is that there is some
 
  47 advocacy/justification for DRM, so it might be a good idea to try to
 
  48 rework the sentence in a non-neutral way that is against the DRM.
 
  50 I also have a feeling that DRM is the main cause why we have things
 
  51 like the Management Engine / TrustZone, etc on all consumer devices and
 
  52 that we cannot replace the nonfree boot software with free software. 
 
  54 It might be less relevant for x86 as the history of the Management
 
  55 Engine is not directly linked to DRM, but on smartphones I think that
 
  56 the link between DRM and operating systems running in TrustZone (and by
 
  57 extension signed bootloaders that loads these operating systems) is
 
  58 stronger. But I was only given indirect information on that and the
 
  59 source didn't want to go on record.
 
  63 About secure boot, I think we can in theory enroll our own certificate
 
  64 but at the end of the day all that is extremely complex to handle and
 
  65 practical freedoms are been made extremely difficult to use.
 
  67 Your article has something like that:
 
  68 > When Secure Boot is activated, it is impossible to install an
 
  69 > alternative bootloader (see chapter 4).
 
  71 Here people will think that with UEFI Secure Boot you cannot install
 
  72 GRUB and that Microsoft said so. And the Chapter 4 doesn't talk about
 
  73 that interpretation all, and only talks about free boot fimrware
 
  74 (distributions), not boot restrictions.
 
  76 Here this seems to be because:
 
  77 (1) There seems to be 2 meanings of secure boot. One is the UEFI Secure
 
  78     Boot standard, and another could be the a chain of trust that
 
  79     starts in hardware. Here you mean the second one.
 
  81 (2) Bootloader is typically associated with GRUB running after the
 
  84 Here's an example of modification:
 
  85 > When a hardware chain of trust that enforces signatures is enabled,
 
  86 > works (its security is not broken), and that users don't have the
 
  87 > signing key nor can bail out of that, it is impossible to replace the
 
  88 > boot firmware. Chapter 4 will show free software boot firmwares.
 
  90 Also there a correct technical term for GNU Boot would probably be a
 
  91 'free software boot firmware distribution', but 'boot firmware' can
 
  92 be confused with 'WiFi firmware' or 'CPU Microcode', so I tend to use
 
  93 boot software instead. But 'distribution' is important (more below).
 
  95 In practice the term bootloader seems to be used in x86 for GRUB that
 
  96 runs after the BIOS or UEFI, but also for 'u-boot' that does the same
 
  97 than GRUB + BIOS/UEFI, so it's a bit messy.
 
  99 As for the broader context GNU Boot and Libreboot are distributions,
 
 100 like Trisquel, Guix or Parabola. The only difference is that we package
 
 101 (and sometimes deblob like in the case of GNU Boot) software like GRUB,
 
 104 As for what does what I think it might be interesting to avoid
 
 105 confusions: Coreboot's code only initialize the hardware, and is
 
 106 incapable of booting an operating system. So during the build it also
 
 107 download, compile and include a third party software that know how to
 
 108 load an operating system. You have several options like:
 
 109 - SeaBIOS: A free BIOS implementation.
 
 110 - Tinaocore: A free UEFI implementation.
 
 111 - GRUB: A bootloader that can boot many operating systems.
 
 112 - etc (there are more).
 
 114 And distributions like GNU Boot or Libreboot package all that, and ship
 
 115 binary images that users can test and install (Coreboot doesn't ship
 
 116 any binary image). We also go further than Coreboot as we try to
 
 117 release an image that is directly usable by users without having to add
 
 118 more configuration and so on.
 
 120 As for UEFI secure boot, the social aspects of that is also extremely
 
 121 interesting here. For instance despite the "security" constraint for
 
 122 free software, the fact that some known nonfree boot software was signed
 
 123 and didn't implement signature verification or another scheme seem to
 
 124 have been completely tolerated:
 
 125 https://mjg59.dreamwidth.org/60248.html
 
 127 Another interesting thing I came across is that to make BIOS/UEFI
 
 128 updates work when the user had the TPM enabled, the vendor simply added
 
 129 a backdoor for the update. There was a security talk about it. In
 
 130 contrast here too we struggle to use the TPM properly within free
 
 131 software, especially because of these updates...
 
 135 About using the Management Engine for security if it was to run free
 
 136 software, some of the 'applications' like EPID are not very useful. For
 
 137 instance GNU Taler can have a better mechanism without having a central
 
 138 trust on a company like Intel.
 
 140 Though for remote administration it looks extremely useful but the user
 
 141 would need to be aware that it's enabled or disabled somehow, otherwise
 
 142 it could even be abused with free software.
 
 144 Another way would be to write our own applications somehow, and we'd
 
 145 probably end up with very different feature set.
 
 147 For instance it could be used to improve boot security, and there is
 
 148 already a wide area of research in this direction in FLOSS projects
 
 149 (example: HEADS, Pure Boot, shim, etc). So moving part of it in the
 
 150 Management engine somehow could make sense. In addition the TPM is now
 
 151 an application, so a lot could be done by combining all that.
 
 153 Though the question here would also be to understand how well the
 
 154 Management Engine itself would be protected from the rest of the
 
 155 system else there would not be much point into using it for such
 
 156 schemes (and there are also other schemes that are less dependent on
 
 157 preventing privilege escalation).
 
 159 3.2.1 Marketting in technology
 
 160 ------------------------------
 
 161 While I completely missed the marketing aspect before reading your
 
 162 article (thanks a lot for that), I think it's not the complete picture.
 
 164 I think that the nonfree software model badly needs a lot of these
 
 165 security features, and that even free software can also benefits from a
 
 166 small subset of these features (though without depending on them too
 
 167 much, an example would be the NX bit or similar code flow integrity
 
 170 If we just look at the basics, we have some huge differences between a
 
 171 free software OS and a nonfree one. If we assume the distribution model
 
 172 for free software and not appimage or software shipped directly by the
 
 173 developers, the distributions trust the applications they ship not to
 
 174 be malicious whereas nonfree software usually doesn't.
 
 176 This doesn't mean that checks are not done before shipping (the XZ
 
 177 backdoor was caught before being really useful for its creator for
 
 178 instance). But once shipped it's trusted, and this changes things a
 
 179 lot (more on that below).
 
 181 In contrast for nonfree software addition there is usually both a
 
 182 commercial imperative and the ability to hide things (like security
 
 183 flaws, backdoors, etc). This could be done for legitimate purposes for
 
 184 instance to do a BIOS update with while keeping the TPM working, or not
 
 185 to fix some security issues (because they cost money) and only fixing
 
 186 the most important ones, or even have semi-legitimate uses that
 
 187 can also be considered malicious, like drivers for forensics hardware
 
 188 and so on but that are meant to be limited to some states / organization
 
 189 only (though in practice this is not always the case).
 
 191 And commercial imperative + the ability to hide things also mean that
 
 192 companies writing driver for nonfree operating systems also have the
 
 193 same incentives, and even when caught, they could pressure the nonfree
 
 194 OS not to blacklist their driver, or at least be that important for the
 
 195 survival of that operating system that they cannot be blacklisted,
 
 196 without having to do any pressure themselves.
 
 198 The combination of all that (users installing whatever + unfixed bugs,
 
 199 and backdoors) makes it way more likely to have full compromise of a
 
 200 device with a nonfree OS than with a GNU/Linux distribution where users
 
 201 only install software they trust (usually from their distribution and
 
 202 that's all). So when you add the ability to run untrusted code to all
 
 203 the mess in the nonfree software case, the untrusted code can exploit
 
 204 old buggy drivers that are signed and so on, and get full device
 
 207 In addition in nonfree operating system like Microsoft Windows there is
 
 208 also a big issue with things like drivers that was already present in
 
 209 DOS at least: people writing software For Windows or making hardware for
 
 210 Windows often need to modify the system in some ways. But the operating
 
 211 system is nonfree. And Microsoft probably doesn't look at driver
 
 212 source code (unless it's free software and needs to be signed somehow).
 
 213 So you can even have some attack surface there as the drivers can also
 
 216 If we look at how UEFI secure boot is managed (like explained in the
 
 217 article from Mathew Garret (mjg59)), we can see a bit of all that.
 
 218 Anti-virus are also known to whitelist some software (like the Sony
 
 219 rootkit back in the days).
 
 221 So all that looks like a nightmare to secure, so if you assume that
 
 222 Microsoft doesn't want to switch to free software, having more
 
 223 and more security features in the hope of reducing the damage enough to
 
 224 make it acceptable by users would be a good plan for them.
 
 226 In the case of Apple they probably managed to limit way more the attack
 
 227 surface: they make the hardware and the OS for instance, so they can
 
 228 have less driver issues if they want, and they can probably restrict
 
 229 more what applications can do, but that's at the expense of users
 
 230 practical freedom (users are stuck with their hardware and so on), and
 
 231 it doesn't remove all these problems at all (I guess they have similar
 
 232 issues with the drivers they don't have leverage on, anti-viruses that
 
 233 probably need privileges and that are badly written, and so on). And
 
 234 here too there is untrusted code everywhere. The most extreme
 
 235 version of this approach here is probably the ipad and iphone where
 
 236 users don't have any freedom left (they can't run the application they
 
 237 want). And yet malicious untrusted applications can still exploit their
 
 238 data as long as they don't attack the operating system.
 
 240 And so if you're Microsoft, the attack surface is bigger, so a
 
 241 potential solution looks exactly like the model of the Management
 
 242 engine: you implement security features in some place that is somewhat
 
 243 isolated from the rest of the system, with lower attack surface and
 
 244 that has higher privilege to be able to do something meaningful for
 
 245 security. The HVCI feature mentionned in the article about BlackLotus
 
 246 you mention seem to be something like that too.
 
 248 And it's not limited to the computer, since everything uses that model
 
 249 you end up with packet sniffing / IDS outside of the computer, etc. And
 
 250 that again can easily be evaded. So you've got layers on top of layers
 
 251 and it gets more and more complex to secure. So now there are
 
 252 new security solutions that try to tackle the complexity, to even
 
 253 infiltrate group of people that attack computers, to try to gather
 
 254 'intelligence', and also use statistics and information gathering, etc,
 
 255 to predict what the attack will be to better counter them and so on.
 
 257 In contrast in GNU/Linux the issue tend to be less severe since people
 
 258 typically contribute upstream directly, though we also have some out of
 
 259 tree free drivers of very bad quality that are often shipped in
 
 260 distributions (usually not in FSF approved one since they typically use
 
 261 nonfree firmwares), but then users would either need to run untrusted
 
 262 code that then reuse these to do privilege escalation or to be close to
 
 263 the attacker (like in the case of a bad WiFi driver or even firmware).
 
 265 So that limits the risk a lot. Though things are far from perfect.
 
 266 Computers are too complex to be properly secured against some very
 
 267 simple use case like opening a document that you don't trust. For
 
 268 instance someone that does political dissent usually needs to
 
 269 open documents from unknown people. And sometimes these document have 
 
 270 0 days in them, and it's possible because document formats are hard to
 
 271 parse (harder than network protocols for instance). But for most people
 
 274 And selling 0 days probably earns more money than basic computer crime
 
 275 / delict anyway, so that kind of shields the general population against
 
 276 wider attacks under GNU/Linux.
 
 280 It's also worth nothing that nowadays a company can manage their own
 
 281 CVEs, and some free software projects started to do that. I'm unsure
 
 282 of the impact as I've no idea how in practice this affects things. For
 
 283 instance it may be possible to still fill the CVE not directly to the
 
 284 company. Reference: https://lwn.net/Articles/961978/
 
 286 3.2.3 potential security hole that remains pernamently active
 
 287 --------------------------------------------------------------
 
 288 Here a reply to Intel would be to look at what happens in practice with
 
 289 things like the HAP bit that is used by me_cleaner.
 
 291 The research of PT Security and of people that looked at its use point
 
 292 that it was made for security critical systems: by setting that bit,
 
 293 the operating system (minix) boots and at some point stops loading
 
 296 This means that at least part of the united states governement agrees
 
 297 with the free software community by classifying the Management
 
 298 Engine as a security risk. If I recall well Dell also sold computers
 
 299 with that bit enabled, for similar markets.
 
 301 The part about disabling AMT we can somewhat verify the me_cleaner part
 
 302 as some ME operating system versions have been analyzed partially by PT
 
 305 But a lot remains not-analysed: they only analyzed very specific
 
 306 versions of the Management Engine AND only very specific parts inside
 
 307 these specific versions.
 
 309 So we know what the HAP bit does or is supposed to do but not much
 
 310 more. We don't know what all the code that runs before the evaluation
 
 311 of the bit does exactly. It probably initializes some hardware for sure
 
 312 but we lack source code and a community behind, and also the practical
 
 313 freedoms like the ability to modify the code, to do proper research.
 
 317 It might be interesting to point out real world use case(s) as a
 
 318 backdoor like PLATINIUM to show that it can really be used like that:
 
 319 https://en.wikipedia.org/wiki/Management_Engine#PLATINUM
 
 321 4.1 Is AMD s Smarter Choice?
 
 322 ----------------------------
 
 323 I think it could be improved a bit by telling that AMD *competes
 
 324 (mostly) in the same market* or talk about market somehow.
 
 326 Because otherwise there are *a lot* of alternative, like ARM or RISCV
 
 327 computers, but it's not the same market.
 
 329 For instance it's extremely complicated to find ARM computers that are
 
 330 in the same range than Intel/AMD with price range, power consumption,
 
 331 computing power, extensibility (many PCIe ports, SATA), etc.
 
 333 4.3 Free computing systems
 
 334 --------------------------
 
 335 The I945 Thinkpads don't have a Management Engine and AMT was not
 
 336 enabled by the manufacturer (it's supposed to be in the Intel Network
 
 337 card for I945). So GNU Boot doesn't change much here beside replacing
 
 338 the BIOS by free software, which also removes a rootkit along the way
 
 339 (named Computrace). And that rootkit had also known security
 
 340 vulnerabilities. But as I understand it is supposed to only affect
 
 341 Windows, but again we don't have the Lenovo BIOS source code.
 
 343 For GM45 it's a bit different, the boot flash has a partition table
 
 344 (called Intel flash descriptor, or IFD) and we simply configure that
 
 345 not to have an ME partition.
 
 348 > $ ifdtool -d grub_x200_8mb_libgfxinit_txtmode_usqwerty.rom 
 
 350 > Found Region Section
 
 352 >   Flash Region 0 (Flash Descriptor): 00000000 - 00000fff 
 
 354 >   Flash Region 1 (BIOS): 00003000 - 007fffff 
 
 356 >   Flash Region 2 (Intel ME): 00fff000 - 00000fff (unused)
 
 358 >   Flash Region 3 (GbE): 00001000 - 00002fff 
 
 360 >   Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused)
 
 362 So you have a lower bound and an upper bound to the partition and in
 
 363 the case of the ME there are special values to tell to disable the
 
 364 partition if I recall well. These are the '00fff000' and '007fffff'
 
 365 there. Here there is also a Platform Data partition that is disabled.
 
 367 In contrast if we take the partition table itself, it starts at
 
 368 0x00000000 and ends at 0x00000fff and 0xfff is 4KiB, and it's size is
 
 369 4KiB once extracted. The Gigabit Ethernet is 12K (0x00002fff -
 
 370 0x00001000) == 12KiB.
 
 372 So when we replace the content of that flash chip, it also erases the
 
 373 Management Engine OS along the way. The Management Engine most likely
 
 374 has a ROM though. And the GM45 one wasn't dumped as far as I know.
 
 376 The problem that we have is that on more recent computers the code that
 
 377 the Management Engine runs initialize some hardware, and more and more
 
 378 code is needed. So removing it either results in an unstable or
 
 379 non-booting computer.
 
 381 I suspect that disabling the Management Engine was unofficially
 
 382 supported by Intel somehow for the GM45, and I was told it stopped
 
 383 being supported at some point because of cost reasons: it costed less
 
 384 to have software to workaround hardware flaws at boot than make the
 
 385 hardware work properly from the start.
 
 387 4.3 Free Computing Systems
 
 388 ---------------------------
 
 390 I think that for ARM there might be more powerful servers that could
 
 391 also work with fully free software but I didn't investigate them. Back
 
 392 in the days Paul Kocialkowski looked at some of them. But as said before
 
 393 these are not the same market than x86, so it's not a drop in
 
 396 Computers made with KGPE-D16 mainboards can also be the fastest x86
 
 397 computer that boots with fully free software (though users need to not
 
 398 use external ATI/AMD/Nvidia GPUs else that will run nonfree software).
 
 400 There are also RISC-V computers. 
 
 402 The use case is also important to consider because you don't need
 
 403 external GPUs in servers whereas for workstations you typically need
 
 404 one or more screens so you need at least a good display controller and
 
 407 PS: Can I also send the link to neox who also co-maintain GNU Boot with
 
 408     me? It might interest him to read or review it as well.