Commit 8220c0a
committed
tls: fix TLSX_CA_Names_GetSize word16 overflow (F-2927)
The CA Names extension size accumulator was a word16. With enough
CA entries (or large DER-encoded names) the running total can wrap
silently, leaving TLSX_CA_Names_Write to overflow an undersized
extension buffer. Match TLSX_SNI_GetSize: use a word32 accumulator
and return 0 when the total exceeds WOLFSSL_MAX_16BIT.1 parent 64aa393 commit 8220c0a
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7573 | 7573 | | |
7574 | 7574 | | |
7575 | 7575 | | |
7576 | | - | |
| 7576 | + | |
7577 | 7577 | | |
7578 | 7578 | | |
7579 | 7579 | | |
| |||
7583 | 7583 | | |
7584 | 7584 | | |
7585 | 7585 | | |
7586 | | - | |
| 7586 | + | |
7587 | 7587 | | |
| 7588 | + | |
| 7589 | + | |
| 7590 | + | |
7588 | 7591 | | |
7589 | 7592 | | |
7590 | | - | |
| 7593 | + | |
7591 | 7594 | | |
7592 | 7595 | | |
7593 | 7596 | | |
| |||
14925 | 14928 | | |
14926 | 14929 | | |
14927 | 14930 | | |
14928 | | - | |
14929 | | - | |
| 14931 | + | |
| 14932 | + | |
| 14933 | + | |
| 14934 | + | |
| 14935 | + | |
| 14936 | + | |
| 14937 | + | |
| 14938 | + | |
14930 | 14939 | | |
| 14940 | + | |
14931 | 14941 | | |
14932 | 14942 | | |
14933 | 14943 | | |
| |||
0 commit comments