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

Fix/clean-up low impact issues in libinjector and libusermode #1257

Merged

Conversation

jgru
Copy link
Contributor

@jgru jgru commented Jul 11, 2021

Dear Tamas,

this PR submits three patches, which fix the following issues identified by static code analysis with low to medium impact :

  • CID 307533: Fix error handling in injector_int3_cb(...) by checking the return value from vmi_read(...)
  • CID 309662: Remove unused value (and therefore unnecessary variable assignment) in print_injection_info(...)
  • CID 304049: Add initialization of the scalar field func_addr of struct rh_data_t in uh-private.hpp

Although those are only minor changes, I think, they might help to declutter the results of static code analysis.
Thank you already advance for considering this PR.

Best regards
Jan

P.S.: I decided to not squash the commits this time, because they try to solve distinct issues. If you want me to do so, please let me know.

Add initialization of the scalar field func_add, which was
uninitialized, what coverity detected as CID 304049
@drakvuf-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@jgru jgru changed the title Fix coverity issues libinjector libusermode Fix/clean-up low impact issues in libinjector and libusermode Jul 11, 2021
@tklengyel
Copy link
Owner

@drakvuf-jenkins This is OK to test

@jgru jgru force-pushed the fix-coverity-issues-libinjector-libusermode branch 4 times, most recently from 2bf4f2a to 990b8a2 Compare July 11, 2021 19:26
jgru added 2 commits July 11, 2021 19:29
Remove unused value in print_injection_info(...), which was
identified as CUD 309662 by coverity
Fix error handling in injector_int3_cb in win_injector.c by
checking the return value from vmi_read. This prevents a call
to vmi_convert_str_encoding(...) passing uninitialized data.
This issue was identified by coverity as CID 307533
@jgru jgru force-pushed the fix-coverity-issues-libinjector-libusermode branch from 990b8a2 to 383b001 Compare July 11, 2021 19:29
@tklengyel tklengyel merged commit ad3dc49 into tklengyel:master Jul 11, 2021
@jgru jgru deleted the fix-coverity-issues-libinjector-libusermode branch July 12, 2021 07:19
skvl added a commit to skvl/drakvuf that referenced this pull request Nov 11, 2021
tklengyel pushed a commit that referenced this pull request Nov 11, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants