@@ -226,8 +226,6 @@ module TaintTracking {
226226 stringBuilderStep ( src , sink )
227227 or
228228 serializationStep ( src , sink )
229- or
230- qualifierToArgStep ( src , sink )
231229 }
232230
233231 private class BulkData extends RefType {
@@ -353,6 +351,10 @@ module TaintTracking {
353351 m .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "ByteArrayOutputStream" ) and
354352 m .hasName ( "writeTo" ) and
355353 arg = 0
354+ or
355+ m .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "InputStream" ) and
356+ m .hasName ( "read" ) and
357+ arg = 0
356358 }
357359
358360 /** Access to a method that passes taint from the qualifier. */
@@ -596,29 +598,6 @@ module TaintTracking {
596598 arg = 0
597599 }
598600
599- /**
600- * Holds if `tracked` is a qualifier and `sink` is an argument
601- * of a method that transfers taint from the qualifier to the argument.
602- */
603- private predicate qualifierToArgStep ( Expr tracked , RValue sink ) {
604- exists ( MethodAccess ma , Method method , int i |
605- taintPreservingQualifierToArg ( method , i ) and
606- ma .getMethod ( ) = method and
607- ma .getArgument ( i ) = sink and
608- ma .getQualifier ( ) = tracked
609- )
610- }
611-
612- /**
613- * Holds if `method` is a method that transfers taint from the qualifier
614- * to the `i`th argument.
615- */
616- private predicate taintPreservingQualifierToArg ( Method method , int i ) {
617- method .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "InputStream" ) and
618- method .hasName ( "read" ) and
619- i = 0
620- }
621-
622601 /** A comparison or equality test with a constant. */
623602 private predicate comparisonStep ( Expr tracked , Expr sink ) {
624603 exists ( Expr other |
0 commit comments