G4lile0 / tinyGS

📡 Open Ground Station Network 🛰
GNU General Public License v3.0
924 stars 177 forks source link

Memory leak vulnerability in Radio/Radio.cpp #75

Closed vulnerabilitydetectionlearning closed 3 years ago

vulnerabilitydetectionlearning commented 3 years ago

Description

In _atof and _atoi functions str is allocated but is never explicitly deleted. This can cause memory leak. See this link for more detailed description of the potential vulnerability. https://cwe.mitre.org/data/definitions/401.html

https://github.com/G4lile0/tinyGS/blob/6f0dfdb889fb52fe3bcc0626a484d9912d60b91f/tinyGS/src/Radio/Radio.cpp#L947-L961

vulnerabilitydetectionlearning commented 3 years ago

This vulnerability was detected by our deep learning based vulnerability detection model. Along with the detection, our model also localizes the vulnerability by producing a version of the function with code that contributed to the vulnerability highlighted. We provide the localization output of the vulnerable function identified in this Issue. The intensity of the highlight correspond to how important the code snippet was for vulnerability detection in this function.

As part of our university research project we would like to evaluate the usefulness of the model’s localization outputs. You can help us out by clicking one of the options below: