Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-55531

Reset plainBuffer before testing AES CBC decrypt with wrong key

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0-rc0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Security 2021-04-05
    • Linked BF Score:
      50

      Description

      Right now, the AES-CBC unit test in `symmetric_crypto_test.cpp` does two things. First, it encrypts a plaintext string using the AES-CBC algorithm and a randomly generated key and checks that it can successfully decrypt that with the same key. Then, it generates a new key and attempts to decrypt the same ciphertext with that incorrect key. It expects that the decryption should either return an error or generate in an incorrect ciphertext. However, both of these checks use the same buffer to load in the decrypted data, which isn't reset in between. This buffer should be reset in order to ensure that the correctly-decrypted data isn't wrongly detected while decrypting with the wrong key. 

        Attachments

          Activity

            People

            Assignee:
            varun.ravichandran Varun Ravichandran
            Reporter:
            varun.ravichandran Varun Ravichandran
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: