contiki-ng / tinydtls

A version of tinyDTLS that is refactored to be more easy to use "standalone" (e.g. without bindings to a specific IP-stack).
Other
8 stars 26 forks source link

An assertion failure in check_certificate_request() #26

Open jerrytesting opened 2 years ago

jerrytesting commented 2 years ago

In the master branch 53a0d97, an assertion failure in check_certificate_request() causes the server to exit unexpectedly and denial of service.

Here is the backtrace of failure: 0 GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 1 0x00007ffff7df2859 in __GI_abort () at abort.c:79 2 0x00007ffff7df2729 in assert_fail_base (fmt=0x7ffff7f88588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x422e9b "is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher)", file=0x421b0d "dtls.c", line=2834, function=) at assert.c:92 3 0x00007ffff7e03f36 in __GI___assert_fail (assertion=0x422e9b "is_tls_ecdhe_ecdsa_with_aes_128_ccm_8(peer->handshake_params->cipher)", file=0x421b0d "dtls.c", line=2854, function=0x422ee1 "int check_certificate_request(dtls_context_t , dtls_peer_t , uint8 *, size_t)") at assert.c:101 4 0x000000000041184f in check_certificate_request (ctx=, peer=0x44af40, data=0x44b5a8 "\r", data_length=78) at dtls.c:2854 5 handle_handshake_msg (ctx=0x44a480, peer=, session=0x7fffffffe400, role=DTLS_SERVER, state=DTLS_STATE_WAIT_SERVERHELLODONE, data=0x44b5a8 "\r", data_length=78) at dtls.c:3266 6 0x0000000000406a84 in handle_handshake (ctx=0x44a480, peer=0x44af40, session=0x7fffffffe400, role=DTLS_SERVER, state=DTLS_STATE_CLOSING, data=0x42937d <dtls_handle_read.buf+13> "\f", data_length=) at dtls.c:3547 7 dtls_handle_message (ctx=0x44a480, session=, msg=, msglen=15637) at dtls.c:3884 8 0x0000000000402ce8 in dtls_handle_read (ctx=0x44a480) at dtls-server.c:187 9 main (argc=, argv=) at dtls-server.c:355