Created
August 15, 2021 14:25
-
-
Save artem-smotrakov/4e804592e671fa2207e5af1bc058f68a to your computer and use it in GitHub Desktop.
CodeQL query for detecting timing attacks in Java code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from DataFlow::PathNode source, DataFlow::PathNode sink, NonConstantTimeCryptoComparisonConfig conf | |
where | |
conf.hasFlowPath(source, sink) and | |
( | |
source.getNode().(CryptoOperationSource).includesUserInput() and | |
sink.getNode().(NonConstantTimeComparisonSink).includesUserInput() | |
) | |
select sink.getNode(), source, sink, "Timing attack against $@ validation.", source, | |
source.getNode().(CryptoOperationSource).getCall().getResultType() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment