Uploaded image for project: 'Identity Provider'
  1. Identity Provider
  2. IDP-659

Concurrency Bug in TicketIdentifierGenerationStrategy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.1.0
    • Fix Version/s: 3.1.1
    • Component/s: CAS
    • Labels:
      None

      Description

      Under high concurrent load, an ArrayIndexOutOfBoundsException is thrown from TicketIdentifierGenerationStrategy#generateIdentifier():

      Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
      at org.bouncycastle.crypto.digests.GeneralDigest.update(Unknown Source)
      at org.bouncycastle.crypto.digests.GeneralDigest.update(Unknown Source)
      at org.bouncycastle.crypto.prng.drbg.HashSP800DRBG.doHash(Unknown Source)
      at org.bouncycastle.crypto.prng.drbg.HashSP800DRBG.hashgen(Unknown Source)
      at org.bouncycastle.crypto.prng.drbg.HashSP800DRBG.generate(Unknown Source)
      at org.cryptacular.generator.RandomIdGenerator.generate(RandomIdGenerator.java:69)
      at net.shibboleth.idp.cas.ticket.TicketIdentifierGenerationStrategy.generateIdentifier(TicketIdentifierGenerationStrategy.java:99)
      at net.shibboleth.idp.cas.flow.ValidateProxyCallbackAction.doExecute(ValidateProxyCallbackAction.java:112)
      at net.shibboleth.idp.profile.AbstractProfileAction.execute(AbstractProfileAction.java:125

      This is a thread safety issue: the cryptacular RandomIdGenerator component is not thread safe yet it is accessed concurrently through generateIdentifier calls.

        Attachments

          Activity

            People

            Assignee:
            serac@vt.edu Marvin S Addison
            Reporter:
            serac@vt.edu Marvin S Addison
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: