eriptic / uoscore-uedhoc

C implementations for constrained (and non-constrained) devices of the IETF protocols OSCORE and EDHOC
Other
15 stars 15 forks source link

NULL Pointer dereference causing segmentation fault #44

Closed sabor12345 closed 8 months ago

sabor12345 commented 1 year ago

Hi!

Version: v2.1.4 in samples/linux_edhoc and default configurations without any modifications only commenting out the AddressSanitizer in the makefile in responder and initiator.

# use AddressSanitizer to find memory bugs
# comment this out for better speed
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
#CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
#LDFLAGS += -fsanitize=address -static-libasan

When i define EDHOC_MESSAGE_4_SUPPORTED in both the responder.c and initiator.c and run them then the initiator gets segmentation fault because of line 186 but the responder finishes successfully.

#define EDHOC_MESSAGE_4_SUPPORTED

image

Sincerely Sabor

StefanHri commented 1 year ago

Hi Sabor,

thanks for reporting this issue! Can you take look at the branch edhoc_ram_opti which is the current most advanced branch that contains many additional improvements. I cannot reproduce this issues on this branch. Please use this branch for your project.

Stefan