commit | 52d5e1b6d3f0669868f0ba95792b527907a67fdd | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@google.com> | Tue Oct 22 14:34:34 2024 -0400 |
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Oct 24 20:08:58 2024 +0000 |
tree | d126f85de8d62589d346ae399ed6aaa28646d248 | |
parent | e4978786daee58f51dcb98bc9665883d6f8567c0 [diff] |
Never reconstruct 1.3 record numbers above 2^48-1 In DTLS 1.2, it was syntactically impossible to make a record number over 2^48-1 or an epoch number over 2^16-1. This was nice because it meant record numbers could be packed into an 8-byte structure. DTLS 1.3 attempted to lift these constraints, but ineffectively. The epoch count cannot go past 2^16-1 due to how the message number works. The outgoing record count has no reason to exceed 2^48-1 because we would have to send 5 petabytes to count that high even with empty records, and indeed we check this right now. The incoming record count is complicated. Record number reconstruction *could* count that high if we receive 2^33 records (the max we can jump is 2^15 at a time). This is within the realm of possibility for an attacker, but too high to practically count via unit tests, and useless for a well-behaved sender because the sender has no reason to skip sequence numbers. The result is that we need to use more memory and worry about a case that we cannot practically test, which is only useful for attackers. This is not useful. Instead, change the record number reconstruction logic to never give back record numbers past 2^48. If the peer manages to send 5 petabytes and count that high without rekeying, we'll jam the record number and start dropping those packets. An error would be preferable, but that would be a codepath we cannot effectively test, so I opted to just bodge the reconstruction logic. With this done, we can pack the record numbers again. The next CL will introduce a DTLSRecordNumber type to abstract the various bit manipulations we've been doing. Bug: 42290594 Change-Id: I8bb0584a792578cf1d2a9df0b0c035d794c85beb Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/72270 Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Nick Harper <nharper@chromium.org> Commit-Queue: Nick Harper <nharper@chromium.org>
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
Project links:
To file a security issue, use the Chromium process and mention in the report this is for BoringSSL. You can ignore the parts of the process that are specific to Chromium/Chrome.
There are other files in this directory which might be helpful: