diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2020-03-20 18:02:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 18:02:27 +0100 |
commit | a845e997209b987ef85a2562697d4d0522cb0c66 (patch) | |
tree | 04a9b505c8af0b5f4d8c32a774edfaf9936fbd1c /src/lib/protocols/ssh.c | |
parent | 8cda02bb14bad44ae71317b322d895305245e713 (diff) | |
parent | 3e259aac986bc86aa89adc2994811bb6f26a0649 (diff) |
Merge pull request #859 from catenacyber/fuzzudpfix
Checks enough data for UDP header
Diffstat (limited to 'src/lib/protocols/ssh.c')
-rw-r--r-- | src/lib/protocols/ssh.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/protocols/ssh.c b/src/lib/protocols/ssh.c index f3b50b609..959b9c090 100644 --- a/src/lib/protocols/ssh.c +++ b/src/lib/protocols/ssh.c @@ -96,6 +96,8 @@ static void ndpi_int_ssh_add_connection(struct ndpi_detection_module_struct static u_int16_t concat_hash_string(struct ndpi_packet_struct *packet, char *buf, u_int8_t client_hash) { u_int16_t offset = 22, buf_out_len = 0; + if(offset+sizeof(u_int32_t) >= packet->payload_packet_len) + goto invalid_payload; u_int32_t len = ntohl(*(u_int32_t*)&packet->payload[offset]); offset += 4; |