Commit 7b899aa
Array::CopyFrom and InPlaceVector::TryCopyFrom: do not allow in to alias this.
Also, fix one "theoretical" use-after-free in tls13_enc that happens in
the tls13_rotate_traffic_key -> tls13_set_traffic_key call chain by
resetting the secret to the same secret we already have. This reads the
secret after having called std::destroy_n() on it.
This is not detected by asan and msan, as the std::destroy_n() call
compiles to nothing when the declared type is a built-in integer type
like here (uint8_t). At the same time this means that it also is
harmless - at least for now, as long as all types this happens with are
POD and as long as std::destroy_n() will keep doing nothing on them.
Issue found by asking #Gemini to analyze the code.
Change-Id: I65ef3b45a6fd3b394f85c79a658dfc2e6a6a6964
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/90987
Commit-Queue: Xiangfei Ding <xfding@google.com>
Reviewed-by: Xiangfei Ding <xfding@google.com>1 parent 8496dec commit 7b899aa
3 files changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
189 | 196 | | |
190 | 197 | | |
191 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
| 271 | + | |
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
| |||
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
| 591 | + | |
| 592 | + | |
588 | 593 | | |
| 594 | + | |
589 | 595 | | |
590 | 596 | | |
591 | 597 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
404 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
0 commit comments