Open jmp0x7c00 opened 2 years ago
Thanks and that's a legit concern. I am thinking of ditching malloc and instead, we assign fixed-size arrays (i.e., a fixed maximum number of DOs) to these keys. I guess we should have this fixed number publicized as DataBroker parameter.
//sk_key_DO, DO_data_key , it is sensitive https://github.com/yang-sec/PrivacyGuard/blob/1ef665fca9dadf00bc0bb363842ab471a747ab0a/CEE/isv_enclave/isv_enclave.cpp#L404
updated:
Dear sir,
This code didn't check whether
malloc()
result is NULL and writed sensitive data to it, as we know, the attacker can mmap the address 0, if the attacker do that, the sensitve data will be writed outside enclave.in file
PrivacyGuard/DataBroker/Enclave/enclave.cpp
line ,vulnerability code is here:here sensitive data is writen: