Skip to content

Commit

Permalink
MsgNotHashedBeforeSigVerfication fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
GrosQuildu committed Jul 5, 2024
1 parent f866d55 commit 3ec87ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private module LongestFlowConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source = source }
predicate isSink(DataFlow::Node sink) { sink = sink }
}
module LongestFlowFlow = TaintTracking::Global<LongestFlowConfig>;
module LongestFlowFlow = DataFlow::Global<LongestFlowConfig>;

/**
* Flows from anything to SignatureMsgTruncationFunction
Expand Down Expand Up @@ -138,13 +138,15 @@ module AnythingToSignatureMsgTrunFuncConfig implements DataFlow::ConfigSig {
node.asExpr().getType().getUnderlyingType().(ArrayType).getLength() <= 66
}
}
module AnythingToSignatureMsgTrunFuncFlow = TaintTracking::Global<AnythingToSignatureMsgTrunFuncConfig>;
module AnythingToSignatureMsgTrunFuncFlow = DataFlow::Global<AnythingToSignatureMsgTrunFuncConfig>;
import AnythingToSignatureMsgTrunFuncFlow::PathGraph

from AnythingToSignatureMsgTrunFuncFlow::PathNode source, AnythingToSignatureMsgTrunFuncFlow::PathNode sink
where
AnythingToSignatureMsgTrunFuncFlow::flowPath(source, sink)

// only the longest flow
// TODO: find only flows originating from user input
and not exists(DataFlow::Node source2 |
LongestFlowFlow::flow(source2, source.getNode())
and source2 != source.getNode()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
edges
| MsgNotHashedBeforeSigVerfication.go:78:33:78:46 | "test message" | MsgNotHashedBeforeSigVerfication.go:78:26:78:47 | type conversion |
| MsgNotHashedBeforeSigVerfication.go:86:31:86:44 | "test message" | MsgNotHashedBeforeSigVerfication.go:86:24:86:45 | type conversion |
| MsgNotHashedBeforeSigVerfication.go:78:33:78:46 | "test message" | MsgNotHashedBeforeSigVerfication.go:78:26:78:47 | type conversion | provenance | |
| MsgNotHashedBeforeSigVerfication.go:86:31:86:44 | "test message" | MsgNotHashedBeforeSigVerfication.go:86:24:86:45 | type conversion | provenance | |
nodes
| MsgNotHashedBeforeSigVerfication.go:78:26:78:47 | type conversion | semmle.label | type conversion |
| MsgNotHashedBeforeSigVerfication.go:78:33:78:46 | "test message" | semmle.label | "test message" |
Expand Down

0 comments on commit 3ec87ae

Please sign in to comment.