Commit 3304644
committed
Harden chain depth bounds and parser input validation
Enforce MAX_CHAIN_DEPTH limits in OCSP chain processing
(SendCertificateStatus, ProcessChainOCSPRequest), certificate loading
(ProcessUserChain), and TLS 1.3 certificate sending
(SendTls13Certificate). Add idx bounds checks to chain accessors
in ssl.c.
Harden SNI extension parser (TLSX_SNI_GetFromBuffer) with length
checks preventing buffer overreads on malformed ClientHello.
Fix off-by-one in TLSX_CSR_Free where <= should be < since
csr->requests is a count, not a max index.
Add remaining-buffer bounds checks to PKCS7 decoders:
DecodeEnvelopedData, DecodeAuthEnvelopedData (encryptedContentSz
and authTagSz), DecodeEncryptedData, SignedData null signature tag,
and PwriKek_KeyUnWrap cekLen validation.1 parent 5074cf3 commit 3304644
6 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26026 | 26026 | | |
26027 | 26027 | | |
26028 | 26028 | | |
26029 | | - | |
| 26029 | + | |
| 26030 | + | |
26030 | 26031 | | |
26031 | 26032 | | |
26032 | 26033 | | |
| |||
26065 | 26066 | | |
26066 | 26067 | | |
26067 | 26068 | | |
26068 | | - | |
| 26069 | + | |
26069 | 26070 | | |
26070 | 26071 | | |
26071 | 26072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13944 | 13944 | | |
13945 | 13945 | | |
13946 | 13946 | | |
13947 | | - | |
| 13947 | + | |
13948 | 13948 | | |
13949 | 13949 | | |
13950 | 13950 | | |
| |||
13955 | 13955 | | |
13956 | 13956 | | |
13957 | 13957 | | |
13958 | | - | |
| 13958 | + | |
13959 | 13959 | | |
13960 | 13960 | | |
13961 | 13961 | | |
| |||
13970 | 13970 | | |
13971 | 13971 | | |
13972 | 13972 | | |
13973 | | - | |
| 13973 | + | |
13974 | 13974 | | |
13975 | 13975 | | |
13976 | 13976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2820 | 2820 | | |
2821 | 2821 | | |
2822 | 2822 | | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
2823 | 2826 | | |
2824 | 2827 | | |
2825 | 2828 | | |
| |||
2830 | 2833 | | |
2831 | 2834 | | |
2832 | 2835 | | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
2833 | 2839 | | |
2834 | 2840 | | |
2835 | 2841 | | |
| |||
3387 | 3393 | | |
3388 | 3394 | | |
3389 | 3395 | | |
3390 | | - | |
| 3396 | + | |
3391 | 3397 | | |
3392 | 3398 | | |
3393 | 3399 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9334 | 9334 | | |
9335 | 9335 | | |
9336 | 9336 | | |
| 9337 | + | |
| 9338 | + | |
| 9339 | + | |
| 9340 | + | |
9337 | 9341 | | |
9338 | 9342 | | |
9339 | 9343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14879 | 14879 | | |
14880 | 14880 | | |
14881 | 14881 | | |
| 14882 | + | |
| 14883 | + | |
| 14884 | + | |
| 14885 | + | |
| 14886 | + | |
| 14887 | + | |
14882 | 14888 | | |
14883 | 14889 | | |
14884 | 14890 | | |
| |||
15141 | 15147 | | |
15142 | 15148 | | |
15143 | 15149 | | |
| 15150 | + | |
| 15151 | + | |
| 15152 | + | |
| 15153 | + | |
| 15154 | + | |
| 15155 | + | |
15144 | 15156 | | |
15145 | 15157 | | |
15146 | 15158 | | |
| |||
0 commit comments