Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dlt-control-common] Memory Leak - It was verified by ASAN (Address Sanitizer). #440

Closed
zj3t opened this issue Feb 5, 2023 · 7 comments
Closed

Comments

@zj3t
Copy link

zj3t commented Feb 5, 2023

Hi great COVESA team, it's me again...haha..
Every weekend, I spend time studying the source code of DLT-DAEMON, and every time I do, I am struck by how impressive it is as software.

Summary

While reviewing the source code of DLT-passive-node-ctrl, I noticed many instances of memory deallocation missing the call to the free() function.
To further investigate, I used ASAN to analyze DLT-passive-node-ctrl and discovered the existence of memory leaks.

Memory Leak

image
Memory leak occurs even if no input value is entered.

image
[dlt-control-common.c]

It appears that the heap memory allocated by calloc() is not being freed.

image
Likewise, dlt-logstorage-ctrl is also the cause.

It seems to be done by calling the dlt_file_free() function.
As before (428b835)

END

I came to know your foundation while researching someip,
Studying dlt-daemon, I admire your skills.

It may be a minor vulnerability (bug), but I am reporting it because there is a possibility that a more competent hacker than me will exploit it later.

Thanks.
Ah! And if possible, I'd like to request a CVE.
If you guys let me, I'll make a request to MITRE.

Please let me know if you allow(Request CVE) it in response.

@zj3t zj3t changed the title [dlt-passive-node-ctrl] Memory Leak - It was verified by ASAN (Address Sanitizer). [dlt-control-common] Memory Leak - It was verified by ASAN (Address Sanitizer). Feb 5, 2023
@michael-methner
Copy link
Collaborator

Hello @zj3t ,
thanks for the report. Your work is highly appreciated.
For sure you can request a CVE, but I do not know if this could be really used as an attack vector. Does this matter to the CVE?

btw: do you want to prepare a fix as well? I would be happy to merge it.

@zj3t
Copy link
Author

zj3t commented Feb 6, 2023

Hi @michael-methner

Thanks for the reply.

Memory leaks occur when a program dynamically allocates memory, but loses track of that memory and is unable to free it, causing the memory to remain occupied even when it is no longer needed. This can result in the program using up more and more memory over time, eventually leading to the program crashing or freezing.

In this case(issue), memory leak occurs regardless of user input, so there is a possibility of becoming a problem in the future.

@zj3t
Copy link
Author

zj3t commented Feb 6, 2023

@michael-methner

Oh!! I'm not a developer so I'm not ready to fix it.

It seems that you who understand the program well should do the modification.
Thank you for just asking me.

Later, before you merge, I'll check the patch.

Thanks :)

@lvklevankhanh
Copy link
Contributor

Hi @zj3t , @michael-methner ,

The fixed version is already at #441.
Please take a look and let me know if any comment.

Thanks,

@zj3t
Copy link
Author

zj3t commented Feb 9, 2023

Thanks @lvklevankhanh @michael-methner :)
I respect you all.
I can understand why there are many talented players in the COVESA team.

Thank you again.

@zj3t zj3t closed this as completed Feb 9, 2023
@zj3t zj3t reopened this Feb 9, 2023
@zj3t
Copy link
Author

zj3t commented Feb 9, 2023

Miss Click....
I would be grateful if you could close the issue.

@lvklevankhanh
Copy link
Contributor

Hi @zj3t ,
Thank you for your contribution.
Regards,

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Apr 14, 2023
An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Apr 14, 2023
An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-openembedded that referenced this issue Apr 24, 2023
Source: meta-openembedded
MR: 124675
Type: Security Fix
Disposition: Merged from meta-openembedded-nut
ChangeID: 63c520c
Description:

An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
Signed-off-by: Jeremy A. Puhlman <[email protected]>
halstead pushed a commit to openembedded/meta-openembedded that referenced this issue Apr 28, 2023
An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Armin Kuster <[email protected]>
halstead pushed a commit to openembedded/meta-openembedded that referenced this issue May 7, 2023
An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit ad73ee2)
Signed-off-by: Armin Kuster <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this issue May 22, 2024
An issue was discovered in the Connected Vehicle Systems Alliance (COVESA; formerly GENIVI)
dlt-daemon through 2.18.8. Dynamic memory is not released after
it is allocated in dlt-control-common.c.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-26257
COVESA/dlt-daemon#440

Signed-off-by: Yogita Urade <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants