File tree Expand file tree Collapse file tree
java/ql/src/experimental/Security/CWE/CWE-522-DecompressionBombs Expand file tree Collapse file tree Original file line number Diff line number Diff 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
475437module DecompressionBombsConfig implements DataFlow:: StateConfigSig {
476438 class FlowState = DataFlow:: FlowState ;
You can’t perform that action at this time.
0 commit comments