-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
C++: Remove pointer/pointee conflation from parameter nodes #18531
base: main
Are you sure you want to change the base?
Conversation
5bc3caf
to
f678d66
Compare
f678d66
to
8de7d4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (6)
- cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowPrivate.qll: Language not supported
- cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll: Language not supported
- cpp/ql/test/experimental/query-tests/Security/CWE/CWE-409/DecompressionBombs/DecompressionBombs.expected: Language not supported
- cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected: Language not supported
- cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp: Language not supported
- cpp/ql/test/query-tests/Security/CWE/CWE-119/semmle/tests/UnboundedWrite.expected: Language not supported
Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more
|
DCA shows quite a lot of alert changes. What's the deal with those? |
I'm still reviewing some of them. So far they're all FP that are now gone 🎉 I'll continue to update the PR description as I go through the results (but as you say there are quite a lot 😅) |
Since
node.hasAddressOperandAndIndirectionIndex(op, indirectionIndex)
can hold for multiple(op, indirectionIndex)
pairs for a givennode
(because a singleDataFlow::Node
can represent multipleOperand
s with different indirections) it's pretty much always a bug to only considerop
orindirectionIndex
in isolation. I thought we had fixed all problems like this as of #13425, but apparently this one was still lurking.Luckily, the fix is simple 🎉
There are lots of DCA changes:
systemd
cpp/unbounded-write
The 7 lost results all go through the following:
That is: We track flow to
***l
, but somehow end up tracking flow to**user_data
.So we magically lose an indirection here because of the conflation.
cpp/use-after-free
Both lost results are FPs. This removes the only two FPs on this project for this query 🎉 The pattern is:
We previously claimed that
*f
dereferenced the memory that was freed byfree
, but that's obviously not the case.vim__vim
cpp/path-injection
TODO
cpp/unbounded-write
TODO
wireshark__wireshark
cpp/type-confusion
TODO
keepassxc
cpp/type-confusion
TODO
neovim__neovim
cpp/unbounded-write
TODO