2222import soot .jimple .SwitchStmt ;
2323import soot .jimple .infoflow .InfoflowManager ;
2424import soot .jimple .infoflow .aliasing .Aliasing ;
25- import soot .jimple .infoflow .collect .MyConcurrentHashMap ;
2625import soot .jimple .infoflow .data .Abstraction ;
2726import soot .jimple .infoflow .data .AccessPath ;
2827import soot .jimple .infoflow .problems .TaintPropagationResults ;
3837 * @author Tim Lange
3938 */
4039public class BackwardsImplicitFlowRule extends AbstractTaintPropagationRule {
41- private final MyConcurrentHashMap <Unit , Set <Abstraction >> implicitTargets = new MyConcurrentHashMap <Unit , Set <Abstraction >>();
4240
4341 public BackwardsImplicitFlowRule (InfoflowManager manager , Abstraction zeroValue , TaintPropagationResults results ) {
4442 super (manager , zeroValue , results );
@@ -164,12 +162,6 @@ public Collection<Abstraction> propagateCallFlow(Abstraction d1, Abstraction sou
164162 return null ;
165163 }
166164
167- if (implicitTargets .containsKey (stmt ) && (d1 == null || implicitTargets .get (stmt ).contains (d1 ))) {
168- if (killAll != null )
169- killAll .value = true ;
170- return null ;
171- }
172-
173165 // We do not propagate empty taints into methods
174166 // because backward no taints are derived from empty taints.
175167 if (source .getAccessPath ().isEmpty ()) {
@@ -225,8 +217,8 @@ public Collection<Abstraction> propagateCallToReturnFlow(Abstraction d1, Abstrac
225217
226218 List <Unit > condUnits = manager .getICFG ().getConditionalBranchesInterprocedural (stmt );
227219 for (Unit condUnit : condUnits ) {
228- Abstraction abs = new Abstraction (sink .getAllDefinitions (), AccessPath .getEmptyAccessPath (), stmt ,
229- sink .getUserData (), false , false );
220+ Abstraction abs = new Abstraction (sink .getAllDefinitions (), AccessPath .getEmptyAccessPath (),
221+ stmt , sink .getUserData (), false , false );
230222 abs .setCorrespondingCallSite (stmt );
231223 abs .setDominator (condUnit );
232224 res .add (abs );
@@ -235,8 +227,8 @@ public Collection<Abstraction> propagateCallToReturnFlow(Abstraction d1, Abstrac
235227 if (!sm .isStatic ()) {
236228 AccessPath thisAp = manager .getAccessPathFactory ()
237229 .createAccessPath (sm .getActiveBody ().getThisLocal (), false );
238- Abstraction thisTaint = new Abstraction (sink .getDefinitionsForAccessPath (ap ), thisAp , stmt , sink . getUserData (),
239- false , false );
230+ Abstraction thisTaint = new Abstraction (sink .getDefinitionsForAccessPath (ap ), thisAp , stmt ,
231+ sink . getUserData (), false , false );
240232 thisTaint .setCorrespondingCallSite (stmt );
241233 res .add (thisTaint );
242234 }
@@ -269,12 +261,6 @@ public Collection<Abstraction> propagateCallToReturnFlow(Abstraction d1, Abstrac
269261 && getAliasing ().mayAlias (((AssignStmt ) stmt ).getLeftOp (), source .getAccessPath ().getPlainValue ())) {
270262 boolean isImplicit = source .getDominator () != null ;
271263 if (isImplicit ) {
272- // if (d1 != null) {
273- // Set<Abstraction> callSites = implicitTargets.putIfAbsentElseGet(stmt,
274- // new ConcurrentHashSet<Abstraction>());
275- // callSites.add(d1);
276- // }
277-
278264 killSource .value = true ;
279265 return Collections .singleton (source .deriveConditionalUpdate (stmt ));
280266 }
0 commit comments