Skip to content

Commit 3e9c3e6

Browse files
committed
remove inputStream and its subclasses module which has no impact on query now!
1 parent c1b9310 commit 3e9c3e6

1 file changed

Lines changed: 0 additions & 38 deletions

File tree

java/ql/src/experimental/Security/CWE/CWE-522-DecompressionBombs/DecompressionBomb.ql

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -433,44 +433,6 @@ module Zip {
433433
}
434434
}
435435

436-
/**
437-
* Providing InputStream and it subClasses as Local Decompression sources
438-
*/
439-
module InputStream {
440-
class TypeInputStream extends RefType {
441-
TypeInputStream() { this.getASupertype*().hasQualifiedName("java.io", "InputStream") }
442-
}
443-
444-
class Source extends Call {
445-
Source() {
446-
exists(Call c | c.getCallee().getDeclaringType() instanceof TypeInputStream | this = c)
447-
}
448-
449-
DataFlow::Node getInputArgument() { result.asExpr() = this.(ConstructorCall).getArgument(0) }
450-
}
451-
452-
class Read extends MethodAccess {
453-
Read() {
454-
this.getReceiverType() instanceof TypeInputStream and
455-
this.getCallee().hasName(["read", "readNBytes", "readAllBytes"])
456-
}
457-
}
458-
459-
predicate additionalTaintStep(DataFlow::Node n1, DataFlow::Node n2) {
460-
exists(Call call |
461-
(
462-
call.getCallee().getDeclaringType() instanceof TypeInputStream or
463-
call.(MethodAccess).getReceiverType() instanceof TypeInputStream
464-
) and
465-
call.getCallee().hasName(["read", "readNBytes", "readAllBytes"]) and
466-
call.getQualifier() = n1.asExpr() and
467-
(
468-
call.getArgument(0) = n2.asExpr() or
469-
call = n2.asExpr()
470-
)
471-
)
472-
}
473-
}
474436

475437
module DecompressionBombsConfig implements DataFlow::StateConfigSig {
476438
class FlowState = DataFlow::FlowState;

0 commit comments

Comments
 (0)