Commit d3ce5b8
committed
DTLS 1.3 and TLS 1.3 focused fixes
dtls13.c:
- Fix wrong return value in Dtls13SendFragmentedInternal error path (return outputSz instead of recordLength)
- Fix incomplete bounds check in Dtls13SendFragmented to account for DTLS_HANDSHAKE_HEADER_SZ
- Fix wrong WOLFSSL_ENTER trace string in Dtls13EpochCopyKeys
tls13.c:
- Remove wrong (byte) cast on cookie->len passed to TlsCheckCookie
- Add missing bounds check on PSK identityLen in SetupPskKey before copying to client_identity
- Fix data race on static header array in ExpectedResumptionSecret
- Add defensive underflow check in EncryptTls13 for consistency with DecryptTls13
- Fix wrong return variable in DTLS 1.3 Finished send error path (return dtlsRet instead of ret)
- Add missing SM3 case and default in Tls13_Exporter hash switch to prevent NULL dereference
- Initialize *outSz to 0 in wolfSSL_write_early_data to match wolfSSL_read_early_data
- Add bounds check for bindersLen against helloSz in CheckPreSharedKeys
- Fix resource leak and hash state corruption in ExpectedResumptionSecret error paths
- Fix memory leak of rsaSigBuf in dual-alg RSA+RSA CertificateVerify
- Guard against word32 underflow in inputLength - HANDSHAKE_HEADER_SZ in DoTls13HandShakeMsg
- Fix swapped side parameter in DeriveFinishedSecret for server-side Finished processing
- Fix no_mac fall-through in ssl_handshake_md to return NULL instead of wrong digest
- Fix strict aliasing violation in FindPsk PSK key size check
- Remove duplicate !ssl->options.dtls check in TLS 1.3 middlebox compat condition
tests:
- Add regression tests for wolfSSL_write_early_data outSz initialization and DTLS 1.3 Finished send error propagation1 parent 6fc93ac commit d3ce5b8
4 files changed
Lines changed: 93 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
| 1043 | + | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | | - | |
| 1105 | + | |
1106 | 1106 | | |
1107 | 1107 | | |
1108 | 1108 | | |
| |||
2212 | 2212 | | |
2213 | 2213 | | |
2214 | 2214 | | |
2215 | | - | |
| 2215 | + | |
2216 | 2216 | | |
2217 | 2217 | | |
2218 | 2218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
951 | 958 | | |
952 | 959 | | |
953 | 960 | | |
| |||
1003 | 1010 | | |
1004 | 1011 | | |
1005 | 1012 | | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1006 | 1024 | | |
1007 | 1025 | | |
1008 | 1026 | | |
| |||
2572 | 2590 | | |
2573 | 2591 | | |
2574 | 2592 | | |
2575 | | - | |
| 2593 | + | |
2576 | 2594 | | |
2577 | 2595 | | |
2578 | 2596 | | |
| |||
2581 | 2599 | | |
2582 | 2600 | | |
2583 | 2601 | | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
2584 | 2605 | | |
2585 | 2606 | | |
2586 | 2607 | | |
| |||
4054 | 4075 | | |
4055 | 4076 | | |
4056 | 4077 | | |
| 4078 | + | |
4057 | 4079 | | |
4058 | 4080 | | |
4059 | 4081 | | |
| |||
4161 | 4183 | | |
4162 | 4184 | | |
4163 | 4185 | | |
| 4186 | + | |
| 4187 | + | |
4164 | 4188 | | |
4165 | 4189 | | |
4166 | 4190 | | |
| |||
5982 | 6006 | | |
5983 | 6007 | | |
5984 | 6008 | | |
5985 | | - | |
| 6009 | + | |
5986 | 6010 | | |
5987 | 6011 | | |
5988 | 6012 | | |
| |||
6322 | 6346 | | |
6323 | 6347 | | |
6324 | 6348 | | |
| 6349 | + | |
| 6350 | + | |
6325 | 6351 | | |
6326 | 6352 | | |
6327 | 6353 | | |
| |||
6564 | 6590 | | |
6565 | 6591 | | |
6566 | 6592 | | |
6567 | | - | |
| 6593 | + | |
6568 | 6594 | | |
6569 | 6595 | | |
6570 | 6596 | | |
| |||
9741 | 9767 | | |
9742 | 9768 | | |
9743 | 9769 | | |
| 9770 | + | |
9744 | 9771 | | |
9745 | 9772 | | |
9746 | 9773 | | |
| |||
11488 | 11515 | | |
11489 | 11516 | | |
11490 | 11517 | | |
11491 | | - | |
| 11518 | + | |
11492 | 11519 | | |
11493 | 11520 | | |
11494 | 11521 | | |
11495 | 11522 | | |
11496 | 11523 | | |
11497 | | - | |
| 11524 | + | |
11498 | 11525 | | |
11499 | 11526 | | |
11500 | 11527 | | |
| |||
11520 | 11547 | | |
11521 | 11548 | | |
11522 | 11549 | | |
11523 | | - | |
| 11550 | + | |
11524 | 11551 | | |
11525 | 11552 | | |
11526 | 11553 | | |
| |||
12166 | 12193 | | |
12167 | 12194 | | |
12168 | 12195 | | |
12169 | | - | |
| 12196 | + | |
12170 | 12197 | | |
12171 | 12198 | | |
12172 | 12199 | | |
| |||
12206 | 12233 | | |
12207 | 12234 | | |
12208 | 12235 | | |
12209 | | - | |
| 12236 | + | |
12210 | 12237 | | |
12211 | 12238 | | |
12212 | 12239 | | |
12213 | 12240 | | |
12214 | 12241 | | |
12215 | 12242 | | |
12216 | | - | |
| 12243 | + | |
12217 | 12244 | | |
12218 | 12245 | | |
12219 | 12246 | | |
12220 | | - | |
| 12247 | + | |
12221 | 12248 | | |
12222 | | - | |
| 12249 | + | |
12223 | 12250 | | |
12224 | 12251 | | |
12225 | | - | |
| 12252 | + | |
12226 | 12253 | | |
12227 | 12254 | | |
| 12255 | + | |
12228 | 12256 | | |
12229 | 12257 | | |
12230 | 12258 | | |
| |||
13460 | 13488 | | |
13461 | 13489 | | |
13462 | 13490 | | |
13463 | | - | |
| 13491 | + | |
| 13492 | + | |
13464 | 13493 | | |
13465 | 13494 | | |
13466 | 13495 | | |
| |||
15308 | 15337 | | |
15309 | 15338 | | |
15310 | 15339 | | |
| 15340 | + | |
| 15341 | + | |
15311 | 15342 | | |
15312 | 15343 | | |
15313 | 15344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33050 | 33050 | | |
33051 | 33051 | | |
33052 | 33052 | | |
| 33053 | + | |
| 33054 | + | |
| 33055 | + | |
| 33056 | + | |
| 33057 | + | |
| 33058 | + | |
| 33059 | + | |
| 33060 | + | |
| 33061 | + | |
| 33062 | + | |
| 33063 | + | |
| 33064 | + | |
| 33065 | + | |
| 33066 | + | |
| 33067 | + | |
| 33068 | + | |
| 33069 | + | |
| 33070 | + | |
| 33071 | + | |
| 33072 | + | |
| 33073 | + | |
| 33074 | + | |
| 33075 | + | |
| 33076 | + | |
| 33077 | + | |
| 33078 | + | |
| 33079 | + | |
| 33080 | + | |
| 33081 | + | |
| 33082 | + | |
| 33083 | + | |
| 33084 | + | |
| 33085 | + | |
| 33086 | + | |
| 33087 | + | |
| 33088 | + | |
| 33089 | + | |
| 33090 | + | |
| 33091 | + | |
| 33092 | + | |
33053 | 33093 | | |
33054 | 33094 | | |
33055 | 33095 | | |
| |||
35393 | 35433 | | |
35394 | 35434 | | |
35395 | 35435 | | |
| 35436 | + | |
35396 | 35437 | | |
35397 | 35438 | | |
35398 | 35439 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
811 | 816 | | |
812 | 817 | | |
813 | 818 | | |
| |||
0 commit comments