netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* CCM/GCM implementation defect
@ 2015-04-23  3:26 Herbert Xu
  2015-04-23  3:36 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Herbert Xu @ 2015-04-23  3:26 UTC (permalink / raw)
  To: Steffen Klassert, netdev, David S. Miller, Paul Wouters,
	Linux Crypto Mailing List

Hi:

It looks like our IPsec implementations of CCM and GCM are buggy
in that they don't include the IV in the authentication calculation.

This definitely breaks interoperability with anyone who implements
them correctly.  The fact that there have been no reports on this
probably means that nobody has run into this in the field yet.

On the security side, this is probably not a big deal for CCM
because it always verifies the authentication tag after decryption.
But for GCM this may be a DoS issue as an attacker could modify
the IV without triggering the authentication check and thus cause
an unnecessary decryption.  For both CCM and GCM this will result
in random data injected as a packet into the network stack which
hopefully will be dropped.

In order to fix this without breaking backwards compatibility,
my plan is to introduce new templates such as rfc4106v2 which
implement the RFC correctly.  The existing templates will be
retained so that current users aren't broken by the fix.

Once the kernel side is complete we could then get the user-space
implementors to update their tools to request for the new v2
templates.

Comments?

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-04-24  5:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23  3:26 CCM/GCM implementation defect Herbert Xu
2015-04-23  3:36 ` David Miller
2015-04-23  9:03 ` Horia Geantă
2015-04-23  9:05   ` Herbert Xu
2015-04-23  9:58     ` Martin Willi
2015-04-23 10:01       ` Herbert Xu
2015-04-23 11:45 ` Steffen Klassert
2015-04-23 13:24   ` Martin Willi
2015-04-23 23:12     ` Herbert Xu
2015-04-24  5:30     ` Herbert Xu
2015-04-24  5:35       ` Herbert Xu
2015-04-23 15:21   ` Paul Wouters
2015-04-23 23:17   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).