Slashdot Mirror


Security Flaw Discovered in GPG

WeLikeRoy writes "A serious problem in the use of GPG to verify digital signatures has been discovered, which also affects the use of gpg in email. It is possible for an attacker to take any signed message and inject extra arbitrary data without affecting the signed status of the message. Depending on how gpg is invoked, it may be possible to output just faked data as several variants of this attack have been discovered. All versions of gnupg prior to 1.4.2.2 are affected, and it is thus recommended to update GnuPG as soon as possible to version 1.4.2.2."

36 of 151 comments (clear)

  1. Oh no! by MyLongNickName · · Score: 4, Funny

    A serious security issue in GPG! We are all doomed!

    what is GPG?

    Yeah, I will go RTFA. However, summaries that assume you are familiar with an acronym are rude, IMHO ;)

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    1. Re:Oh no! by Anonymous+Crowhead · · Score: 5, Interesting

      It's funny. Back in the day, when Slashdot was cool, almost everyone would know what GPG was. Most of the articles were like this one. Cool stuff about cool technology. Not politics (aside from GNU) and all the other crap like the "new mouse/keyboard techonolgy of the week" adverts that permeates Slashdot these days.

    2. Re:Oh no! by pete-classic · · Score: 3, Funny

      What the fuck is an IMHO, and what does it have to do with a RTFA?

      -Peter

    3. Re:Oh no! by xchino · · Score: 3, Funny

      Mod parent down. What a disgusting display of arrogance and elitism. You're the one who shouldn't be here, regardless of how low your UID is.

      "If you do not know what GPG is, you're not a nerd - and you're on the wrong site."

        I think about 98% of the science department at any college would tell you exactly what a fucking idiot you are for making such a broadly stupid statement. Are you seriously so deluded that you think the only type of nerd is a computer nerd? And that all computer nerds have heard of this one specific release of a technology rarely used even in business environments? The majority of nerds and geeks don't know what GPG is. People like you and me are the minority, fucking get over it, and get over yourself.

      "Seriously: Go away."

      Fuck you, you go away. I'd take a complete know-nothing over an arrogant asshole anyday. People like you detract from the value of this site. No one gives a shit you've been here since the 90's. Why don't you go have a plaque made to hang up on your bedrooom wall to show how cool you are? Do you put your slashdot UID on resumes as an acheivement?

      "Rude is to be at a site where you obviously do not belong - irritating the people who has frequented the site since the 90s."

        Rude is to act like you are the sole arbitrator of who should and should not be allowed to voice their opinion on an open forum, like you're the fucking gestapo or something. Given the recent history of postings The GP has, in the eyes of the users of this site, a better quality of contribution than You.

        Based on your attitude I can only assume you are a sad, pathetic man, with delusions of some sort of elevated importance via seniority. I, as well as the majority of slashdotter welcome ANYONE who is interested in science, technology, gaming, or any of the various subjects that slashdot covers, including politics, regardless of their ignorance of a certain subject or technology. You're nothing but an eSnob.

      --
      Everyone is entitled to their own opinion. It's just that yours is stupid.
  2. Whew! by suso · · Score: 4, Funny

    Its a good thing I don't use GPG to sign my emails. Oh wait.

    1. Re:Whew! by Anonymous Coward · · Score: 5, Funny

      I have been publishing my GPG key for over a year now and I have yet to have anyone send me an encrypted email. I feel really lonely and unpopular. I'd even read encrypted penis enlargement spam if someone would be thoughtful enough to send me some.

  3. Re:Bug Intentionally Placed? by Saeed+al-Sahaf · · Score: 4, Funny

    The NSA secretly seeding Open Source with ingeniously crafted back doors? Never! Not our NSA...

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  4. Not a fundamental flaw. by aprilsound · · Score: 5, Interesting
    From TFA:
    The attack is to change a standard message to inject faked data (F). A simple case is this: F + O + D + S gpg now happily skips F for verification and does a proper signature verification of D and if this succeeds, prints a positive result. However when asked to output the actual signed data it will output the concatenation of F + D and thus create the impression that both are covered by the signature.

    So this is a simple mistake made by GPG, in an effort to coexist well with email and the like.

    In other words, GPG looks at an email message and sees headers and the like. Of course, the headers were not signed (just the message), so GPG skips them and when it encounters the signed message, it begins to verify the signature.

    So, if you are an attacker, you insert something before or after the signed message, and when GPG goes to verify it, the signed message passes, but GPG nicely prints out the whole message for you, instead of just the signed part. Oops, not a big deal, encryption isn't broken, in fact this is just an application bug.

    1. Re:Not a fundamental flaw. by linhux · · Score: 3, Interesting

      Sorry, but this like a big deal to me. The whole point of digital signatures is that you can know exactly what has been signed by the signer -- and be sure that nothing has been added and removed on the way. Consider this e-mail:

      From: BOSS@CORPORATE.COM
      To: MIDDLEMANAGER@CORPORATE.COM
      Subject: Employee Burt Reynolds

      That's a fine lad! Let's give him a raise!

      -- Boss

      GPG SIGNATURE VERIFIED: BOSS@CORPORATE.COM


      Now, this message can be intercepted and a new part inserted before the actual message body, without the receiver being notified -- here I have marked the new part with bold text:

      From: BOSS@CORPORATE.COM
      To: MIDDLEMANAGER@CORPORATE.COM
      Subject: Employee Burt Reynolds

      Fire him immediately. He is a waste of space.

      Employee Foo Bar, on the other hand.
      That's a fine lad! Let's give him a raise!

      -- Boss

      GPG SIGNATURE VERIFIED: BOSS@CORPORATE.COM


      The message meaning has been completely altered, and GPG still verifies the signature. Feels like a big deal to me. But of course, I might have completely missed something.

    2. Re:Not a fundamental flaw. by xquark · · Score: 3, Insightful

      yeah you did, the signing would also include the part " -- Boss" within the signature,
      ergo the injection you proposed would not be valid and hence would be rejected
      by the signature verification process.

      try and add something before or after the actual e-mail message and see how much sense
      it would make to someone reading it...

      Arash

      --
      Arash Partow's Philosophy: Be a person who knows what they don't know, and not a person who doesn't know.
  5. Well , What is GPG? by baomike · · Score: 4, Funny

    Sound like a movie rating.

  6. Aha! by evil+agent · · Score: 5, Funny

    She thought she could get rid of me with that rejection via email. Now I've got reasonable doubt about her feelings. Until I get that court order, of course.

    --
    End transmission.
    1. Re:Aha! by Anonymous Coward · · Score: 4, Funny

      well, if you're lucky the court order will come by email too.

  7. Shouldn't be a surprise... by Spy+der+Mann · · Score: 3, Insightful

    remember how many versions of OpenSSH we have? And why do you think new versions were released? And why should GPG be any different?

  8. Re:Bug Intentionally Placed? by aprilsound · · Score: 4, Informative
    So instead of taking hours to obtain a GPG key, the NSA could spend seconds and impersonate an otherwise [strike]paranoid[/strike] privacy-oriented person in typically confidential memos.

    I realize this is a joke, but just so everyone knows, a little bit of scrutiny would expose a faked message.

    If you RTF Mailing List, you will see that the "attack" only allows someone to append or prepend data to the signed message, and then the augmented message is only displayed the way it is because of an application bug in GPG.

    No fundamental algorithm is broken, no one has discovered a way to cause collisions. In fact, if you tried to independently verify the signature of the message against the augmented message, it would fail.

    What happens is that GPG skips text that is not part of the signed message, such as email headers and the like, then verifies what is signed. Unfortunately, once it's verified, it will output the whole message, leading the user to believe that the whole message was signed.

    Again if you checked the signature against the whole message it wouldn't verify, GPG is just being a bit too helpful.

  9. Re:Debian unstable's got me covered. Um NO. by Anonymous Coward · · Score: 3, Informative

    The parent AC is worng.
    1.4.2-2 is not equal to 1.4.2.2, and it is older than 1.4.2.2
    the -2 is the 2nd Debian modification of 1.4.2

  10. Double Bag That Burger by Doc+Ruby · · Score: 4, Informative

    Another good recommendation is to diversify your crypto. Sign/encrypt your data with multiple different crypto algorithms in the same message. It's like network redundancy: the odds of both methods failing at once are equal to the product of the low, but significant, probability of either failing. A single failure doesn't ever compromise your data, and buys time to get a new second method that works.

    Of course, sent messages can't be recovered for reprotection with the new second method. And eventually the other original method will be compromised, so the attacker can use the appropriate methods for each. But at least you've improved your security. Probably more than the next guy. Next lesson: when the bear is chasing y'all, you don't have to be the fastest; just not the slowest.

    --

    --
    make install -not war

    1. Re:Double Bag That Burger by TPS+Report · · Score: 5, Funny

      Another good recommendation is to diversify your crypto. Sign/encrypt your data with multiple different crypto algorithms in the same message.

      That's an awesome idea. I'm going to start doing that right now! :P

      This is a multi-part message in MIME format.
      ------=_NextPart_000_0012_01C22048.805E68 00
      Content-Type: text/plain; charset="iso-8859-1"
      Content-Transfer-Encoding: 7bit Test ------=_
      NextPart_000_0012_01C22048.805E6800 Content-Type:

      application/x-pkcs7-signature; name="smime.p7s"

      Content-Transfer-Encoding: base64 Content-Disposition:
      attachment; filename="smime.p7s"</b>
      MIAGCSqGSIb3DQEHAqCAMIAC AQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAo
      IIKGDCC Ajww ggGlAhAyUDPPUNFW81yBrWVcT8glMA0GCSqGSIb3DQEBAgUAMF 8xC
      zAJBgNVBAYTAlVTMRcwFQYD VQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ
      2xhc3Mg MSBQdWJsaWMgUHJpbWFyeSBDZXJ0 aWZpY2F0aW9uIEF1dGhvcml0eTAeF
      w05NjAxMjkwMDAwMDBa Fw0yMDAxMDcyMzU5NTlaMF8xCzAJ BgNVBAYTAlVTMRcwF
      QYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3 MDUGA1UECxMuQ2xhc3MgMSBQdWJs aWMgU
      HJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCB nzANBgkqhkiG9w0BAQEFAA
      OBjQAw gYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIgu VzqKCbJF
      0NH8xlbgyw0FaEGIea BpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzR
      QR 4k5FVmkfeAKA2txHkSm7NsljXMXg 1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAAT
      ANBgkqhkiG9w0B AQIFAAOBgQBLRGZgaGTkmBvzsHLm lYl83XuzlcAdLtjYGdAtND
      3GUJoQhoyqPzuoBPw3UpXD2cnb zfKGBsSxG/CCiDBCjhdQHGR6uD6Z SXSX/KwCQ/
      uWDFYEJQx8fIedJKfY8DIptaTfXaJMxRYyqEL2 Raa2Nrngv2U2k8LS12vc3lnWojX
      RTCCAy4wggKXoAMCAQICE QDSdi6NFAw9fbKoJV2v7g11MA0GCSqGSIb3DQEBAgUAM
      F8xC zAJBgNV BAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1 UEC
      xMuQ2xhc3MgMSBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0e
      TAeFw05 ODA1MTIwMDAwMDBaFw0wODA1MTIy MzU5NTlaMIHMMRcwFQYDVQQKEw5WZ
      XJpU2lnbiwgSW5jLjEf MB0GA1UECxMWVmVyaVNpZ24gVHJ1 c3QgTmV0d29yazFGM
      EQGA1UECxM9d3d3LnZlcmlzaWduLmNv bS9yZXBvc2l0b3J5L1JQQSBJbmNv cnAuI
      EJ5IFJlZi4sTElBQi5MVEQoYyk5ODFIMEYGA1UEAxM/ VmVyaVNpZ24gQ2xhc3MgMS
      BDQSBJ bmRpdmlkdWFsIFN1YnNjcmliZXItUGVyc29uYSBOb3QgVmFsaW RhdGVkMI
      GfMA0GCSqGSIb3DQEB AQUAA4GNADCBiQKBgQC7WkSKBBa7Vf0DeootlE8VeDa4DU
      qy b5xUv7zodyqdufBou5XZMUFweoFL uUgTVi3HCOGEQqvAopKrRFyqQvCCDgLpL/
      vCO7u+yScKXbaw NkIztW5UiE+HSr8Z2vkV6A+Hthzj zMaajn9qJJLj/OBluqexfu
      /J2zdqyErICQbkmQIDAQABo3ww ejARBglghkgBhvhCAQEEBAMCAQYw RwYDVR0gBE
      AwPjA8BgtghkgBhvhFAQcBATAtMCsGCCsGAQUF BwIBFh93d3cudmVyaXNpZ24uY29
      t L3JlcG9zaXRvcnkvUlBBMA8GA1UdEwQIMAYBAf8CAQAwCwYDVR 0PBAQDAgEGMA0
      GCSqGSIb3DQEB AgUAA4GBAIi4Nzvd2pQ3AK2qn+GBAXEekmptL/bxndPKZDjcG5 g
      MB4ZbhRVqD7lJhaSV8Rd9Z7R/ LSzdmkKewz60jqrlCwbe8lYq+jPHvhnXU0zDvcj
      jF7WkSUJj 7MKmFw9dWBpJPJBcVaNlIAD9GCDl X4KmsaiSxVhqwY0DPOvDzQWikK5
      uMIIEojCCBAugAwIBAgIQ BUy90AsJrAtbnO8CULdhXDANBgkq hkiG9w0BAQIFADC
      BzDEXMBUGA1UEChMOVmVyaVNpZ24sIElu Yy4xHzAdBgNVBAsTFlZlcmlTaWdu IFR
      ydXN0IE5ldHdvcmsxRjBEBgNVBAsTPXd3dy52ZXJpc2ln bi5jb20vcmVwb3NpdG9y
      eS9SUEEg SW5jb3JwLiBCeSBSZWYuLExJQUIuTFREKGMpOTgxSDBGBgNVBA MTP1Zl
      cmlTaWduIENsYXNzIDEg Q0EgSW5kaXZpZHVhbCBTdWJzY3JpYmVyLVBlcnNvbmEg
      Tm90 IFZhbGlkYXRlZDAeFw0wMTA3MTYw MDAwMDBaFw0wMjA3MTYyMzU5NTlaMIIB
      FDEXMBUGA1UEChMO VmVyaVNpZ24sIEluYy4xHzAdBgNV BAsTFlZlcmlTaWduIFRy
      dXN0IE5ldHdvcmsxRjBEBgNVBAsT PXd3dy52ZXJpc2lnbi5jb20vcmVw b3NpdG9y
      eS9SUEEgSW5jb

      --
      I was told that I could listen to the radio at a reasonable volume from nine to eleven...
    2. Re:Double Bag That Burger by LS · · Score: 5, Funny


      How in the F*** did THAT make it through the lameness filters?!

      --
      There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
  11. Re:Don't forget Win95! by JustOK · · Score: 5, Funny

    Don't you think they're smart enough to think that you would think they weren't that stupid?

    --
    rewriting history since 2109
  12. GPG is: by Black+Copter+Control · · Score: 4, Informative
    what is GPG?

    GPG stands for Gnu Privacy Guard. It's the Free(tm) replacement for PGP (Pretty Good Privacy) which was originally developed by RSA. Between them, they are one of the standards for encryption and verification of sensitive data (including email).

    As opposed to X509/SSL which seems to be designed for centralized trusted certificate issuers, GPG/PGP depend on a (decentralized) web of trust -- You decide which signatures you wish to trust, and then those signatures can be used to signify who they trust... If you have enough trust in the signature web for a public key you have for someone, then it is presumed that the key is trustable.

    GPG seems to be supported by people who include some serious heavyweights in the encryption community.

    IANASE (I am not a security expert), so any corrections to this explanation would be much appreciated)

    --
    OS Software is like love: The best way to make it grow is to give it away.
    1. Re:GPG is: by Zeinfeld · · Score: 3, Informative
      GPG stands for Gnu Privacy Guard. It's the Free(tm) replacement for PGP (Pretty Good Privacy) which was originally developed by RSA.

      Given the lawsuits that RSA filed to stop PGP this statement could hardly be more wrong. Phil Zimmerman developed PGP as freeware, then released a commercial version of his code and reclaimed the name. GPG is a name chosen to describe the free version.

      This crack is not particularly new, the first version of PGP had the problem. The only part of the message that is secure is the part between the begin and end signature bars. PGP/MIME fixes this problem but MIME creates new ones.

      PGP Inc sells a fine PGP client that also does a pretty good S/MIME. I have no problem with the PGP protocol or a carefully designed, properly integrated plug in.

      What I do have a problem with is the idea that effective security can be delivered as an ad-hoc bolt on to be lashed into place with some perl scripts. If you want to do end-to-end security you have to come to terms with the fact that the real end point is the user.

      --
      Looking for an Information Security student project suggestion?
      Try http://dotcrimeManifesto.com/
    2. Re:GPG is: by Martin+Blank · · Score: 4, Informative
      It's the Free(tm) replacement for PGP (Pretty Good Privacy) which was originally developed by RSA.


      No, PGP wasn't developed by RSA; RSA had nothing at all to do with PGP's development. Use of the RSA asymmetric encryption algorithms has been in use since early versions, but PGP itself was developed by Phil Zimmerman, who got into a patent battle with RSA over his use of the algorithm without their permission (although patent co-holder MIT didn't have a problem with it, complicating the situation). A deal was eventually worked out, and the RSA algorithms have been in ever since.
      --
      You can never go home again... but I guess you can shop there.
    3. Re:GPG is: by Rikus · · Score: 3, Informative

      GPG is a name chosen to describe the free version.
      This sentence is neither informative nor funny.

      No, GnuPG is not the same as PGP. GnuPG was in fact developed to replace PGP, both because PGP is covered by a non-commercial use only license, and (probably) because it by default incorporates the patented IDEA algorithm. Yes, PGP Freeware and GPG are both free and interoperable, but they are not the same thing.

    4. Re:GPG is: by Chapter80 · · Score: 3, Informative
      Correct about Phil Zimmerman, and his battles with RSA. Phil also got in trouble with the NSA (National Security Agency branch of the US Government) for the release of PGP. It was a bold move by Phil for the freedom of the software around the world, and he's a freedom hero in my book.

      Back then (early '90s), simple encryption SOFTWARE was considered a munition, similar to if he snuck an atom bomb out of the country. The software was "released" onto the evil internet (perhaps not even by Phil), and as I recall, Phil was arrested or charged, or questioned.

      My history is based on memory from reading Boardwatch magazine (a GREAT internet publication in the hey-day). So I may not recall 100% correctly.

    5. Re:GPG is: by Martin+Blank · · Score: 3, Interesting

      Not as bad as an atom bomb, but classified along with, say, machineguns and antitank rockets. The software actually got out of the country legally by way of printing it in book format (which was not considered software at the time) and then scanning it in another country and using character recognition and a good deal of editing time to get it to compile properly.

      This was also a primary catalyst for the argument of how strong exportable encryption should be, and which brought the encryption debate out into the public eye. Had he not done this, we might be a few years behind our current status, just having finished accepted the appropriateness of exporting heavy encryption.

      --
      You can never go home again... but I guess you can shop there.
  13. Re:Don't forget Win95! by Sloppy · · Score: 4, Funny

    I'm not even smart enough to understand what you just said.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
  14. Someone should get fired by Yoik · · Score: 3, Funny

    That information should never have been released! The negative press will impact sales. It would have been better to pretend the bug never existed.

    Oh, it isn't corporate product, nevermind.

  15. check.. by dotpavan · · Score: 4, Funny

    did anybody cross-check the authenticity of that warning? I wont accept that until I verify its GPG key :)

  16. Short explanation if you're too lazy to RTFA by sidney · · Score: 4, Informative

    The bug allows someone to take a signed GPG message, stick in their own unsigned message in a certain way, and GPG will show you the combined message or even just the new message, but tell you that it is signed by the person who signed the original message.

    If you read the message using the new GPG 1.4.2.2 it will correctly not accept the hacked message. So if you have any question about signed mail you received, you can check it again after upgrading GPG.

    The bug only affects embedded signatures, such as in email messages using inline signatures or signed encrypted email. I think that excludes PGP/MIME signed unencrypted email, which is a common format for signed mail and would be a form of detached signature.

    The bug does not affect "detached signatures", which are the kind that are used to verify software downloads, which means it could not have been used to hack yum, apt-get, etc.

    All in all, not a big security flaw unless someone takes a signed email that you sent them, forges a GPG signed request to your domain registrar to transfer your million dollar domain name to them, and your registrar hasn't yet updated to GPG 1.4.2.2. Whoops -- if you upgrade GPG right now, it wouldn't help in that scenario.

  17. Damn Microsoft!! by Anonymous Coward · · Score: 4, Funny

    I'm tired of their insecure crap! Oh wait, its GNU open source? In that case, you lazy bastard end users should have fixed it yourself!

  18. Re:Bug Intentionally Placed? by From+A+Far+Away+Land · · Score: 5, Funny

    Do you suppose the NSA is also responsible for the backdoor exploit on the Goatse guy?

  19. Quick! by SuperKendall · · Score: 3, Funny

    Better assign a security Czar!

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  20. Re:Well... by slavemowgli · · Score: 4, Insightful

    It DOES mean that you cannot trust e-mail for commercially sensitive transactions, but nobody should be trusting e-mail for that anyway.

    I don't mean this to come across as flamebait, but that's one of the stupidest comments I've read on Slashdot today. You could just as well - and with the same justification - say that telephones shouldn't be used for conducting business (all business consists of commercially sensitive transactions, mind you), or that letters shouldn't be used, that the postal services can't be trusted, that pens and paper shouldn't be used for writing down contracts, and so on.

    All these things, just like email and just like GPG, are tools. Tools, like everything, are fundamentally insecure, at least theoretically; there is no absolute security. But you can minimise risks by using tools the right way, by making sure that malfunctions don't lead to a cascade of further malfunctions, and - maybe most importantly - by *realising* and *keeping in mind* that nothing is ever perfectly secure. If you do that, you can use email for sensitive things just like you can use the phone network or the postal services or direct face-to-face communication; you merely have to be aware of the risks and how to manage/minimise them.

    Panicking and crying "email is never secure!" isn't going to get you anywhere, really. You're just limiting yourself to other means of communication which are basically just as secure or insecure as email is, and given that statement, chances are you haven't really understood how security works, anyway, so you're probably less secure no matter what you do.

    --
    quidquid latine dictum sit altum videtur.
  21. Re:Bug Intentionally Placed? by Anonymous Coward · · Score: 5, Funny

    No that was a widely known and exploited crack.

  22. Re:Well... by lspd · · Score: 4, Informative

    I agree. But again, the way I read the alert, isn't this a "Man In the Middle" attack?

    It's a replay attack. I take a very terse/vague signed message that you've written and append important evil data to the front or back and resend it. The signature checks out and the meat of the message (the stuff I've added on to the front or end) appears to come from you.

    This sort of problem has come up before in other contexts. When you sign an email, for example, it's doesn't include the headers or date. If your signed message is general enough, I can copy it and send it to someone else (GPG signatures verify the sender, not the recipient.) One of the situations where this has come up is in the Debian voting process. If a DD mistakenly sends their ballot to the wrong person, then changes their vote, anyone who has a copy of the old ballot can send it again and change the vote back. Debian safeguards against this by allowing each DD to see how their vote was cast after the vote is complete.