back to article Security hole in AMD CPUs' hidden secure processor code revealed ahead of patches

Cfir Cohen, a security researcher from Google's cloud security team, on Wednesday disclosed a vulnerability in the fTMP of AMD's Platform Security Processor (PSP), which resides on its 64-bit x86 processors and provides administrative functions similar to the Management Engine in Intel chipsets. This sounds bad. It's not as …

  1. conscience

    By the time you've gained access to the motherboard and rewritten the flash, arguably it's game over anyway for any security mechanism as your computer is physically in the cracker's hands. Besides, bypassing TPM/secure boot is surely a feature, not a bug? :)

    And what would Intel give right now for their CPU problems to be so easily fixed?

    I suppose the bright side is that perhaps CPU makers will sit up and take notice of this, finally reducing some of the needless complexity and with any luck kill their internal 'security' processors completely.

    1. whitepines Bronze badge
      FAIL

      The whole excuse for the vendor keeping control of "your" computer via the ME/PSP was so that physical access wasn't game over. At minimum this is a complete failure of the original purpose, and worst case is that it actually reduced security versus not having it there at all.

      Plus, in this case, physical access isn't even required. Just some means to "update" the BIOS (PSP + UEFI + Agesa) back to the vulnerable version, which remains signed by AMD and valid to the hardware's signature checks as far as I know...

      1. Adrian 4 Silver badge

        "At minimum this is a complete failure of the original purpose, and worst case is that it actually reduced security versus not having it there at all."

        Of course. All security 'features' run the risk of making things less secure. They increase the attack surface and provide a superpowerful operator who, if cracked, has all the powers they were supposed to be protecting.

        For evidence, see rootkits, piracy protection, corrupted policemen, 'who watches the watchers' etc.

        How do we stop this ? In human terms we don't know. We still get politicians exerting inappropriate power etc. We mostly try to get around it with peer pressure : we hope that by putting a group of people in charge a few will stay honest. It doesn't always work but maybe it's better than the 'winner takes all approach' that seems to be common in computing.

        1. Anonymous Coward
          Anonymous Coward

          "All security 'features' run the risk of making things less secure."

          Yes, there's a risk, but in many sectors where security was done right - i.e. aviation - the added complexity and security features actually reduced the risks. Face it, to ensure security you need to run trusted code. The mechanism to ensure that are buggy today, sure - but removing them is not the solution.

          1. Eddy Ito Silver badge

            Re: "All security 'features' run the risk of making things less secure."

            Yes but

            the PSP doesn't implement common exploit mitigation techniques such as stack cookies, No-eXecute (NX) flags, or address space layout randomization (ASLR), making exploitation trivial.

            If the PSP (Platform Security Processor) doesn't implement common security techniques then it really does sweet fuck all for security, might as well be a FAP (Fuck All Processor).

      2. BaronMatrix

        No one will EVER find a way to bypass physical access, but server rooms are some of the most secure places in any company... Most people don't even know where they are...

        And a remote BIOS injection would require a hook into the OS or the ability to control a reboot... servers are not a source of malware...

        1. Anonymous Coward
          Anonymous Coward

          "but server rooms are some of the most secure places in any company."

          Still, in mine people like janitors, electricians, air conditioning, UPS and hardware technicians can enter, and most of them are from outsourced companies. And unluckily the building manager, who has access, not always notify us when some of them are allowed to enter. A security guard may not notice if one of them does something "strange".

          "BIOS injection would require a hook into the OS or the ability to control a reboot".

          Do you know that most server today have remote consoles which allows firmwares to be patched and machine rebooted?

        2. phuzz Silver badge
          Facepalm

          "No one will EVER find a way to bypass physical access"

          Sure they will, maybe they'll just break a window and climb through rather than going through a door. Maybe they'll take a crowbar to the locks and go through the door anyway.

          People have been "bypassing physical access" (or "stealing shit" as I prefer to call it) for a lot longer than computers have been around.

          Sure, you can make it so difficult that an attacker goes elsewhere, but no security is 100%.

      3. Anonymous Coward
        Anonymous Coward

        You don't seem to understand

        There is no means to compromise the boot security without having validated access first.

        1. whitepines Bronze badge

          Re: You don't seem to understand

          That's incorrect. Physical or UEFI console access is all that's needed, that's why vendor signing is such a bad idea. That vendor signature remains valid to the hardware basically forever, and makes downgrade attacks quite feasible.

    2. Warm Braw Silver badge

      needless complexity

      It may be needless complexity for the computer on your desktop, but it's a different matter when your computing is either under outsourced management or is in a cloud data centre.

      You not only need the remote management capabilities if you happen to have a few hundred thousand machines to administer, but your customers are likely to want some means of ensuring they don't have to trust you with their data. In the latter case, it's likely that more complexity is needed than is presently offered - as this week's news has demonstrated.

      1. s2bu

        Re: needless complexity

        I would daresay most of those large companies are going to be doing their remote management using IPMI to the BMC in the server, and not using the security processor at all.

      2. Destroy All Monsters Silver badge
        Windows

        Re: needless complexity

        It may be needless complexity for the computer on your desktop, but it's a different matter when your computing is either under outsourced management or is in a cloud data centre.

        Quite correct, but all this hush-hush work should come 100% open and configurable.

        "This PSP here runs this OS (provides source code and manuals with appropriate Open License) and anything can be tuned including the key material"

        Boardroom roaches would become additional victims of the opioid crisis but that's a small price to pay.

        1. Warm Braw Silver badge

          Re: needless complexity

          all this hush-hush work should come 100% open

          Where do you draw the line? I don't seen any reason in principle to trust the "real" CPU or its microcode any more than the "management" CPU and its software. I can see a valid argument in favour of 100% open hardware (though not one that would presently make much commercial sense), but assuming that one proprietary CPU is somehow more trustworthy than another, does not seem logical, especially if they're both on the same die or closely coupled.

          large companies are going to be doing their remote management using IPMI to the BMC

          The Intel ME and AMD PSP are (among other things) alternatives to the BMC. Do you know what that proprietary BMC is doing? Given that using the BMC you can at least in principle rewrite the operating system before it boots, I'm not sure how much of a security difference there is in principle between not knowing what the ME/PSP is doing while an unmodified OS is running and not knowing what a modified OS might be doing.

          People see less risk in that which is familiar and mistrust the unfamiliar, but that is a risk in itself: we become blind to the risks that are, with hindsight, staring us in the face and of which several examples have received a great deal of exposure this week. There may be reason to be paranoid, but at least be uniformly paranoid!

    3. Anonymous Coward
      Anonymous Coward

      "By the time you've gained access to the motherboard"

      There are many scenarios in which can happen, and if it takes just a little update to bypass the security layers, it is a problem. Do you fully trust any technician doing hardware maintenance?

    4. Cuddles Silver badge

      "I suppose the bright side is that perhaps CPU makers will sit up and take notice of this, finally reducing some of the needless complexity"

      I'm pretty sure their solution will be to add even more complexity on top, to try to cover up all the existing complexity.

  2. -tim
    FAIL

    BIOS updates? What BIOS updates?

    I have a stack of machines that will never ever see a BIOS update again. Anything over about 2 years old won't ever see one either.

    Anytime someone says something will be fixed in the BIOS, it means it will never be fixed on at least 99% of the machines that have the problem.

    What happened to BIOS initializing enough hardware to load the boot block and then handing everything else off to the OS which should reset everything and start from a blank slate. The OS is much easier to patch and it should be able to do anything the BIOS could.

    1. Richard 12 Silver badge

      Re: BIOS updates? What BIOS updates?

      Trusted Computing* and UEFI happened.

      * Hollywood and Microsoft don't trust you with your computer.

    2. Dan 55 Silver badge

      Re: BIOS updates? What BIOS updates?

      The BIOS isn't a BIOS any more, it's a UEFI. We have Intel to thank for that, again.

      There is a chance of a small simple BIOS being tested and proven to be secure, and locking it down. There's no chance with a UEFI and a ME/PSP.

    3. Anonymous Coward
      Anonymous Coward

      Re: BIOS updates? What BIOS updates?

      #fragmentation

      Oh wait, sorry this isn't Android

    4. bombastic bob Silver badge
      Devil

      Re: BIOS updates? What BIOS updates?

      "What happened to BIOS initializing enough hardware to load the boot block and then handing everything else off to the OS"

      Micro-shaft and DMCA and gummints - OH MY!

      I'm happy to see things like "secure boot" and "management engines" and whatnot blowing up in the faces of the designers. Maybe it will *FORCE* them to adopt "the simple solution" instead...

      1. kain preacher Silver badge

        Re: BIOS updates? What BIOS updates?

        Um intel created the efi for the itanium cpu and then thought it would be a good idea for all of their CPU. It was a almost 3 years before AMD used efi

        1. CheesyTheClown Silver badge

          Re: BIOS updates? What BIOS updates?

          And the reason for UEFI was good. BIOS required 16-bit. BIOS was not a beautiful or secure thing. In fact, BIOS was a disaster.

          Consider that x86 BIOS implemented a software interrupt interface which required chaining to support adding additional device support. Booting from anything other than ATA was limited to emulating a hard drive protocol dating back to the late 70s.

          The total space available to implement boot support for a new block device was a few kilobytes and was a nightmare for updating.

          UEFI is a glorious update but certainly could have been better. It is however hundreds of times better than BIOS ever could be. The question is whether hardening it is an option. There is no reason why hardening UEFI isn’t possible. In fact, the main problem with UEFI is that system administrators are deprived of a suitable set of books, videos, etc to make them competent on the platform.

          Keep in mind that UEFI is based on platforms which date back to the 70s as well. We lived in the dark ages in the PC world for way too long. If you ever used a Sparc or a MIPS, you would know that the UEFI design is brilliant.

  3. John Smith 19 Gold badge
    FAIL

    "missing bounds checks, and a specially crafted certificate can lead to a stack overflow.""

    Because in 2018 that's never happened before.

    And "manual static analysis"

    That'd be "desk checking" the code?

    This is what happens when you have "security" code written by people without the correct mindset IE completely f**king paranoid.

    Because no, when someone hands your function a data structure that's meant to have been written by other software there is no actual guarantee that it has.

    That's the embedded security equivalent of taking those emails from that nice Nigerian Prince you've been getting at face value.

    1. Claptrap314 Bronze badge

      Re: "missing bounds checks, and a specially crafted certificate can lead to a stack overflow.""

      I graduated in 1996 in, erm, mathematics, not cs. I had to learn to be a programmer on the job. (I had been hacking away for 15 years prior, but hopefully you all know the difference.) In 1998, I saw some bios code. I was utterly appalled. It was the nastiest code I had ever seen. Fortunately (for me), I was only tasked with interpreting, not fixing the mess. Somehow, I doubt that these sidecar computers are much better...

  4. Anonymous Coward
    Anonymous Coward

    Does that count?

    "an attacker would first have to gain access to the motherboard and then modify SPI-Flash before the issue could be exploited"

    Is that not like saying my motherboard has a vulnerability if I change my motherboard to have a vulnerability?

    At least it's a simple BIOS update this time and not an unchangeable hardware flaw like that Intel one, will be keeping my eye out for the update.

    Thanks register for the detailed article!

  5. Will Godfrey Silver badge
    Unhappy

    More 'nice' surprises

    It looks like 2018 is going to be an interesting year.

    Just waiting for the next creature to crawl out of the (decaying) woodwork.

  6. Teiwaz Silver badge

    This crap, and everyone is still gettin excited over AI

    God has enough to answer for our substandard design.

    Do we really want to saddle a possible new race with a chip on it's shoulder over the meatbag monkey cowboys who built them.

    Meanwhile, Intel shuffles about, hands in pockets grumping about 'everbody else is doing it' like a unrepentant schoolboy, and AMD whistles nonchalently ignoring everything while the world burns...

  7. Joerg

    So for Intel is always bad but the sweet AMD is fine? PLEASE!

    How comes no one is telling that the AMD PSP is against privacy and having and embedded OS is spying on people?

    That is the same nonsense that AMD shills wrote on the 'net against Intel about the Management Engine...

    And then Google finds out security flaws and bugs on AMD but that is fine because AMD is so sweet and kind and the savior of humanity.. uh? While Intel and Nvidia would be the big bad...

    1. stephanh Silver badge

      Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

      http://tvtropes.org/pmwiki/pmwiki.php/Main/ALighterShadeOfBlack

      "Perhaps they're simply a smaller threat to the world."

    2. Teiwaz Silver badge

      Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

      How comes no one is telling that the AMD PSP is against privacy and having and embedded OS is spying on people?

      Get Intel to back down over the stupid idea, and AMD will follow....

      Nobody goes after the underdog...

      Of course were they to see sense and offer a non-secret computer version of their chips unbidden, hint hint, they might shake up the status quo and end up on top rather than chasing Intels coat tails...

      1. Joerg

        Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

        ?? IBM PowerPC had embedded OS in the chipset long before Intel and AMD... same goes for other CPU architectures in the Enterprise and Supercomputers market.

        1. Dan 55 Silver badge

          Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

          Really? I thought PowerPC, ARM, and MIPS were the often cited alternatives to Intel ME and AMD PSP.

          1. whitepines Bronze badge

            Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

            For starters, there's no "God-mode" access on OpenPOWER. Everything's segregated into little pieces that do basically one task each, and you don't have to just trust IBM blindly, the code's all open and can be modified at will by the machine owner:

            Look, ma, no blobs!

            https://github.com/open-power

            https://github.com/openbmc

            When you've got it the way you like it, set the write protection and go. Overriding it would require quite a bit of time alone with a powered down machine.

      2. soulrideruk Bronze badge

        Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

        "Of course were they to see sense and offer a non-secret computer version of their chips unbidden, hint hint, they might shake up the status quo and end up on top rather than chasing Intels coat tails..."

        Errrrr. They do already...

        AMD made the smart financial decision to use the PSP as a binning factor. Any faulty PSP chips go into Ryzen or ThreadRipper, which have the chip disabled, and working chips go into RyzenPro and EPYC.

        So buy a Ryzen or ThreadRipper chip and you can avoid the embedded engine.

        1. whitepines Bronze badge

          Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

          No idea where you got that faulty information, but EVERY Family 17h AMD chip has the PSP. That includes Ryzen and ThreadRipper.

          1. soulrideruk Bronze badge

            Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

            The EPYC launch, I watched the whole video and they explained in that the PSP was a differentiator between the corporate security side and the normal user chips. I may just waste some hours finding the video of the launch to show you AMD giving me my 'faulty' information..

    3. Wade Burchette

      Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

      Are you having nice weather in Santa Clara today?

    4. Destroy All Monsters Silver badge
      Windows

      Re: So for Intel is always bad but the sweet AMD is fine? PLEASE!

      How comes no one is telling that the AMD PSP is against privacy and having and embedded OS is spying on people?

      Because ... it's NOT spying on people?

      Unless it's suitably "leveraged" as Newspeak adjectivization likes to call it.

  8. mark l 2 Silver badge

    If it requires someone have physical access to the computer to do this, then what is stopping them just removing your HDDs and taking as long as they want to steal your data?

    1. Remy Redert

      They could take your encrypted hard drives, but without compromising the TPM, they'll never be able to recover the encryption key and thus the data is useless.

      Your hard drive is encrypted right? If it's not encrypted, then there's nothing stopping someone from taking the drive and stealing your data off it that way.

      1. Anonymous Coward
        Anonymous Coward

        Encrypted HDD's (SSD's as well)

        And if it is the Plod wanting to see what's on your Encrypted drive unless you cough up the keys, you could rot in jail for the rest of your life.

        What a wonderful society we live in... (not)

    2. Anonymous Coward
      Anonymous Coward

      "what is stopping them just removing your HDDs"

      Maybe because you'll notice it immediately, while being able to install what you like let them steal data continuously undetected? Think about a technician performing maintenance of your server, maybe you'll notice him if he tries to get out with your 48 HDDs, but what about "and I also updated the BIOS..."

  9. Rol Silver badge

    And this isn't the only fault with AMD CPU's..

    Out of interest I tried to install Windows 8 on my AMD computer and without hesitation it allowed it to happen.

    Piqued by this obvious flaw I also tried to install Windows Vista, and you know what, it too managed to get its grubby fingers all over my pristine hardware.

    It seems AMD will allow any and all of Microsoft's products on its computers, without the slightest of checks.

    Come on AMD it's about time you fixed this, and stopped such evil malware from gaining full privileges on feckless people's computers.

    And while I'm at it, Firefox. Yes you! What on Earth is wrong with you? Only the other day I accidentally clicked on a link to Facebook and guess what happened? Yes, without any warning I found myself on Facebook's login page, and only a couple of steps away from oblivion.

    Sort yourselves out Firefox before it's too late.

    1. Rol Silver badge

      Re: And this isn't the only fault with AMD CPU's..

      Dear Reg

      Can I have a slice of the extra revenue generated by my gauding the humourless PR bots of Microsoft and Facebook into down voting my comment?

    2. Anonymous Coward
      Anonymous Coward

      Re: Firefox and Facebook

      IMHO, and TBH, the sooner the latter one ceases to exist the better.

      Perhaps the people at Mozilla know something we don't?

      As Faecebook is blocked at my router so I'll never know what their login screen looks like.

      1. Voyna i Mor Silver badge

        Re: Firefox and Facebook

        Doesn't the Facebook app on Android cause a slowdown rather bigger than fixing the latest malware does on Intel systems? I wouldn't know, never having installed it on anything I have access to, but AIUI it puts hooks into just about everything.

        Our problem at the moment seems to be that to run code we have to trust some of it, and it's increasingly difficult to know what we can trust.

  10. Anonymous Coward
    Anonymous Coward

    Back in the day.....

    .....I never had all this trouble with my CP/M computer. No hidden "management engines" in 8080 or Z80 CPUs.....anyone with access to the motherboard would find <gasp!> NOTHING THERE....because there was no hard drive. (Hint: the floppies were stored somewhere else.) There was no LAN, and the internet didn't exist, so "remote access" was also completely absent.

    *

    All that said, Wordstar and Supercalc and dBASE-II and BDS C were all very productive...a huge improvement on the manual methods used previously.....this was a huge stride in increased productivity.

    *

    Have we really made similar huge strides since then? It's pretty clear that the downsides today are MUCH more threatening. What am I missing?

    1. Destroy All Monsters Silver badge
      Facepalm

      Re: Back in the day.....

      What am I missing?

      You may be missing that we don't put computers to such extremely productive uses like solipsistically managing our kitchen recipes in databases no larger than 64KB running at a speed that gives you time to watch "War Games" at the movies and be back before "Processing Completed" appears on the 80x24 character screen.

    2. Lars Silver badge
      Pint

      Re: Back in the day.....

      "What am I missing?"

      Only your youth.

      1. Anonymous Coward
        Anonymous Coward

        Re: Back in the day.....

        Not all new ideas are good ideas. In fact, most new ideas are crap, evidence how many startups fail relative to the number that succeed. When people have a choice, bad ideas quickly perish from the inattention they deserve, but when you have a captive audience, this is lost.

        Yes OP used an unrelatable example for anyone under a certain age, but you've brushed off (what I infer to be) the essential point, that change for the sake of change is dangerous.

        What we have with all these embedded remote access admin processors is a crap idea that is shoved down our collective throats, because there's no alternative. It need not be this way - if someone sold a cpu that had benchmarks like kabylake or ryzen, but just booted!from!the!disk!, (omg, like the OP's 8080), the market would speak. "You mean I can have my computer with or without a hidden backdoor that lets power players own my box?" Who in their right mind would say "yes please, give me more of that invisible back door stuff, please" ?

        1. DropBear Silver badge

          Re: Back in the day.....

          Who in their right mind would say "yes please, give me more of that invisible back door stuff, please" ?

          Basically? Everyone going into a shop, asking "which aisle do you keep the computers at?" - or, simply, everyone. People with a clue about the mere existence of a given issue seem to tend to grossly overestimate their numbers - we're not even a rounding error: our few-ness is indistinguishable from zero. Case in point - after half a decade of banging the drum, you'd think there are at least SOME people concerned about privacy issues. You'd be wrong. Out of the many hundreds of millions of us living in Europe, right now Schrems has serious trouble finding a paltry single thousand willing to pitch in at least fifty bucks a year so he can do something about it. Understand this: we may make much racket about things we care about in echo chambers like this one, but out there in the real world our influence by numbers alone is that of a single kid taking a piss in the Atlantic ocean...

    3. Anonymous South African Coward Silver badge

      Re: Back in the day.....

      Good old DOS and WordPerfect 5.1 and SuperCalc5...

      Only boot sector viruses to worry about.

      Macro viruses was virtually nonexistent as was Nigerian scam spam (and any other type of spam).

      Goatse was unheard of, as well as tubgirl and the other assortment of shock sites.

      No fake news.

      Best of all, no facebook or twitter.

      Programs was small, not bloated.

      1. Anonymous South African Coward Silver badge

        Re: Back in the day.....

        Forgot about other viruses, but a good up to date AV kept those pesky buggers away.

  11. E 2

    Where did you buy your mobo?

    From a country other than USA, buy a mobo from, eg, NewEgg. Pick one that is shipped from USA. Note how long it spends in Customs... where NSA operatives (or indeed spies from your own country) install the requisite bits for this exploit.

  12. Paul J Turner

    No sympathy

    Well well, it seems all the major CPU manufacturers have included 'Management Engines' in their CPUs for 'Administrative Funcions' (as in "the NSA, GCHQ et al want admin' rights on everybody's computer").

    Then it turns out that these back-doors introduce insecurities (as always).

    The kow-towing pricks deserve every drop of shit that rains on them from a great height.

  13. W Donelson

    There will be no security until CEO's feel pain personally. Period.

  14. Anonymous Coward
    Anonymous Coward

    DRM...

    Don't the various popular DRM systems around these days store their cryptographic keys in the TPM module when it's available? And also not allow the user access to them.

    This security hole might open up some interesting possibilities.

  15. W. Anderson

    What about Sparc and Power chips?

    None of the many articles published on the Intel Meltdown and Spectre chip bugs, and now this story on AMD CPU bug have indicating any research or questioning similar type bugs in Oracle SPARC chips as well as the IBM designed Power8 and Power9 CPUs.

    This is amateur and incomplete reporting at it;s most egregious, and the complete story on all possible major CPU designs, irrespective of "popularity" or how famous the USA company standing is needs to be examined.

    1. Anonymous Coward
      Anonymous Coward

      Re: What about Sparc and Power chips?

      Do you a) report on chip sets than affect 99.999% of the worlds population? Or b) affects systems the general public have never heard of.

      If you want to go off and spend hundreds of hours finding a similar flaw and the reporting on it, I'm sure you are free to do so.

    2. Claptrap314 Bronze badge

      Re: What about Sparc and Power chips?

      You might want to try going over the article that have reported this bug. SPARC & Power have been mentioned. My decade-old knowledge from IBM is that they very much do have out of order execution and speculative fetches. And likely control register bits to limit or kill speculative fetches. (But you won't like what happens if you touch those bits.)

  16. LeahroyNake Bronze badge

    I'm guessing ...

    Someone with intel stock 'accidentally' released this ?

    Either that or very fortunate timing for damage control.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019