Add query for tainted wordexp calls.#10077
Conversation
|
This is inspired by https://github.com/syoyo/tinygltf/issues/368.
|
geoffw0
left a comment
There was a problem hiding this comment.
Hi @intrigus-lgtm, this look to be a nice little query, with great qldoc and a clear example.
I've made a couple of comments, I also intend to look into why taint is getting lost in the inspiring instance.
|
Hi @intrigus-lgtm. I'm also suspicious you're right about taint not reaching the function, but I'm not sure where it stops or why (or whether its correct to). Again, the query is not at fault. |
I guess the problem is that lgtm.com received the new commits that patched the problem (by commenting out the vulnerable code), so the db does not contain any calls to I could successfully find the call to |
|
Thanks for that update ... I think the taint issue might be that the flow into |
|
I've started the checks, and run a moderately large LGTM run of the query here: https://lgtm.com/query/1704064894746891004/ (results look good at a glance) |
geoffw0
left a comment
There was a problem hiding this comment.
I think this is ready to merge. Thank you for your contribution!
|
Just to be sure, this does not need a review of the security lab? |
Yes, it will. It will be merged once Security Lab has reviewed it and are happy with it :) |
|
One FP pattern I have noticed is when the taint from I may add more comments in the thread as I review the results. |
Its fairly common to simply block flow through all integer typed expressions, in order to stop this sort of thing. Something like: |
|
|
|
I see why it doesn't find. Please, disregard. |
|
I switched the sink to |
|
@intrigus-lgtm Could you please add the sanitizer? |
|
@JarLob done, sorry for the delay. |
geoffw0
left a comment
There was a problem hiding this comment.
Sorry I lost track of this. I think its ready to merge into experimental.
|
Oh, and I'll run the checks now... |
|
@geoffw0 anything else missing? |
This is my first query for C/C++ I think, so there is likely some improvement possible.