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

potentially multiple vulnerabilities (14) #733

Open
commandline-be opened this issue Sep 23, 2024 · 6 comments
Open

potentially multiple vulnerabilities (14) #733

commandline-be opened this issue Sep 23, 2024 · 6 comments

Comments

@commandline-be
Copy link

commandline-be commented Sep 23, 2024

use of Snyk revealed a number of vulnerabilities, can the software be updated with a patched version?
the vulnerabilities were not validated against real-world exploitability

Command Injection : 6
Path Traversal : 5
Missing Release of Memory after Effective Lifetime : 2
Regular Expression Denial of Service (ReDoS) : 1

the 'Missing Release of Memory after Effective Lifetime' appears in tests/ui but the klogg app did quit unexpectedly after being open for a few days with a number of log files loaded

@commandline-be commandline-be changed the title multiple vulnerabilities potentially multiple vulnerabilities Sep 23, 2024
@commandline-be commandline-be changed the title potentially multiple vulnerabilities potentially multiple vulnerabilities (14) Sep 23, 2024
@variar
Copy link
Owner

variar commented Sep 23, 2024

Hi, do you have some more details? What parts of code did trigger the tool to produce a report?

@commandline-be
Copy link
Author

commandline-be commented Sep 24, 2024

Most (11)) are found in Python
3 are found in cpp

for cpp the findings are on tests/ui (2) and for tests/helpers
test/ui/logdata_test.cpp tests/ui/qtests_main.cpp tests/helpers/file_write_helper.cpp

[update] Snyk only allow to create report with the Enterprise license which i don't have
take a 15 minutes to set up snyk with vscode in case such applies to your environment

@commandline-be
Copy link
Author

I'm looking into how to share the results, one way could be to invite you as a member to the project on Snyk.
Let me know if you want to explore this possibility.

@commandline-be
Copy link
Author

commandline-be commented Oct 5, 2024


Path Traversal

Snyk Code   [CWE-23](https://cwe.mitre.org/data/definitions/23.html)

Unsanitized input from a command line argument flows into QFile, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to read arbitrary files.


klogg/tests/helpers/file_write_helper.cpp

44    QFile file{ argv[ 1 ] };

validating the input to only allow permitted and purposeful file types and/or relative paths when applicable seems sensible

@commandline-be
Copy link
Author

commandline-be commented Oct 5, 2024

Missing Release of Memory after Effective Lifetime

Snyk Code  [CWE-401](https://cwe.mitre.org/data/definitions/401.html)

Leaking memory. TestRunner is allocated on the heap and never freed


klogg/tests/ui/qtests_main.cpp

98 TestRunner* runner = new TestRunner( argc, argv );

after being open for a few days klogg suddenly crashed in the middle of an analysis, this may be true

@variar
Copy link
Owner

variar commented Nov 15, 2024

Thanks for more information. Neither python scripts nor tests are part of klogg distribution, they are part of build pipeline. So there is not much to fix for end users.

one way could be to invite you as a member to the project on Snyk

Could you do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants