STUN: fix boundary checks on attribute list parsing (#2387)

Restore all unit tests.
Add some configuration knobs.
Fix the endianess.
This commit is contained in:
Ivan Nardi
2024-04-12 22:55:51 +02:00
committed by GitHub
parent bb4fccd2cf
commit 0535e54484
30 changed files with 254 additions and 132 deletions
+2
View File
@@ -250,6 +250,8 @@ struct ndpi_detection_module_config_struct {
int stun_opportunistic_tls_enabled;
int stun_max_packets_extra_dissection;
int stun_mapped_address_enabled;
int stun_response_origin_enabled;
int stun_other_address_enabled;
int dns_subclassification_enabled;
int dns_parse_response_enabled;
+2 -2
View File
@@ -1520,8 +1520,8 @@ struct ndpi_flow_struct {
_Static_assert(sizeof(((struct ndpi_flow_struct *)0)->protos) <= 256,
"Size of the struct member protocols increased to more than 256 bytes, "
"please check if this change is necessary.");
_Static_assert(sizeof(struct ndpi_flow_struct) <= 1032,
"Size of the flow struct increased to more than 1032 bytes, "
_Static_assert(sizeof(struct ndpi_flow_struct) <= 1112,
"Size of the flow struct increased to more than 1112 bytes, "
"please check if this change is necessary.");
#endif
#endif