Skip to content

Miscellaneous#28

Merged
kosmas-valianos merged 3 commits intomainfrom
latestSupport
Mar 16, 2026
Merged

Miscellaneous#28
kosmas-valianos merged 3 commits intomainfrom
latestSupport

Conversation

@kosmas-valianos
Copy link
Copy Markdown
Owner

@kosmas-valianos kosmas-valianos commented Mar 11, 2026

* Add support for the SSL client certificate TLV
* Add support for the SSL-related TLVs for key exchange group and signature
* Add missing unit tests for some types
Bugs:
- cert_in_connection << 2 changed to cert_in_session << 2 in pp_info_add_ssl()
- Added NULL check after malloc() in pp_info_add_ssl(), returns 0 on failure
- Added NULL check after malloc() in pp_info_add_aws_vpce_id(), returns 0 on failure
- Added NULL check after malloc() in pp_info_add_azure_linkid(), returns 0 on failure
- Added minus sign to 4 error return statements in v1 address parsing (ERR_PP1_IPV4_SRC_IP, ERR_PP1_IPV6_SRC_IP, ERR_PP1_IPV4_DST_IP, ERR_PP1_IPV6_DST_IP)
- Split the if (!tlv || !tlv_array_append_tlv()) condition in tlv_array_append_tlv_new() and tlv_array_append_tlv_new_usascii() so that tlv is freed when append fails
- Moved tlv_array->size += 5 after the realloc success check, using (tlv_array->size + 5) in the realloc call itself

Robustness:
- parse_port() now accepts port 0 using endptr from strtoul to distinguish "0" from invalid input
- Added length checks (> 5) before memcpy into 6-byte port string buffers to prevent buffer overflow on malformed v1 input
- AF_UNIX parsing now advances buffer and sets tlv_vectors_len so TLVs after UNIX addresses are parsed

Style:
- PP1_MAX_LENGHT renamed to PP1_MAX_LENGTH
- Removed double semicolons at two locations
- Inpects changed to Inspects in proxy_protocol.h
- ALl changed to All in test.c
@kosmas-valianos kosmas-valianos merged commit c9e55a3 into main Mar 16, 2026
2 checks passed
@kosmas-valianos kosmas-valianos deleted the latestSupport branch March 16, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for the SSL client certificate TLV Add support for the SSL-related TLVs for key exchange group and signature

1 participant