Skip to content
Snippets Groups Projects
  1. Sep 23, 2019
  2. Sep 22, 2019
    • Tink Team's avatar
      Fix out-of-bounds read in KMSEnvelopeAEAD. · d92ebd02
      Tink Team authored
      It looks for a 4-byte length-prefix without checking that there are atleast 4
      bytes.
      
      Also, while I'm here, drop the use of bytes.Buffer in favor of just directly
      slicing the incoming byte-slice. The bytes.Buffer isn't really helping here, it
      doesn't itself do any additional validation, it adds additional cases to
      validate (see the "n != ed" error-checking to handle impossible short-read
      situations), and its almost definitely slower (since it forces copies whereas
      slicing will just operate in-place). I also suspect this was forcing
      encryptedDEK to be heap-allocated, as the compiler wouldn't be able to see
      through the implementation of the tink.AEAD to figure out if the byte-slice
      escaped to the heap (I haven't verified this).
      
      PiperOrigin-RevId: 270511611
      d92ebd02
  3. Sep 20, 2019
  4. Sep 19, 2019
  5. Sep 18, 2019
  6. Sep 17, 2019
  7. Sep 14, 2019
  8. Sep 13, 2019
  9. Sep 12, 2019
Loading