Skip to content

Commit 786706c

Browse files
authored
Merge branch 'secure-software-engineering:develop' into improve-code
2 parents 2e4b5df + 38a64fe commit 786706c

File tree

6 files changed

+17
-22
lines changed

6 files changed

+17
-22
lines changed

soot-infoflow-integration/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
<dependency>
145145
<groupId>org.springframework</groupId>
146146
<artifactId>spring-web</artifactId>
147-
<version>6.2.1</version>
147+
<version>6.2.8</version>
148148
<scope>test</scope>
149149
</dependency>
150150
</dependencies>

soot-infoflow-summaries/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
<dependency>
248248
<groupId>org.springframework</groupId>
249249
<artifactId>spring-web</artifactId>
250-
<version>6.2.1</version>
250+
<version>6.2.8</version>
251251
<scope>test</scope>
252252
</dependency>
253253
</dependencies>

soot-infoflow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
<dependency>
155155
<groupId>org.springframework</groupId>
156156
<artifactId>spring-web</artifactId>
157-
<version>6.1.13</version>
157+
<version>6.1.14</version>
158158
<scope>test</scope>
159159
</dependency>
160160
</dependencies>

soot-infoflow/src/soot/jimple/infoflow/codeOptimization/InterproceduralConstantValuePropagator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ private void propagateReturnValueIntoCallers(SootMethod sm) {
483483
ConstantPropagatorAndFolder.v().transform(caller.getActiveBody());
484484
checkAndAddMethod(caller);
485485
}
486-
caller.getActiveBody().getUnits().remove(assignConst);
487486

488487
Stmt inv = Jimple.v().newInvokeStmt(assign.getInvokeExpr());
489488
caller.getActiveBody().getUnits().swapWith(assign, inv);

soot-infoflow/src/soot/jimple/infoflow/problems/rules/backward/BackwardsImplicitFlowRule.java

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import soot.jimple.SwitchStmt;
2323
import soot.jimple.infoflow.InfoflowManager;
2424
import soot.jimple.infoflow.aliasing.Aliasing;
25-
import soot.jimple.infoflow.collect.MyConcurrentHashMap;
2625
import soot.jimple.infoflow.data.Abstraction;
2726
import soot.jimple.infoflow.data.AccessPath;
2827
import soot.jimple.infoflow.problems.TaintPropagationResults;
@@ -38,7 +37,6 @@
3837
* @author Tim Lange
3938
*/
4039
public 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
}

soot-infoflow/test/soot/jimple/infoflow/test/junit/backward/ImplicitFlowTests.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package soot.jimple.infoflow.test.junit.backward;
22

3+
import org.junit.Ignore;
4+
35
import soot.jimple.infoflow.AbstractInfoflow;
46
import soot.jimple.infoflow.BackwardsInfoflow;
57

@@ -10,4 +12,12 @@ protected AbstractInfoflow createInfoflowInstance() {
1012
return new BackwardsInfoflow(null, false, null);
1113
}
1214

15+
@Ignore("When running backwards, we don't know that the method will be from a "
16+
+ "different class depending on the instantiation of the object that we don't "
17+
+ "see until further up in the code, i.e., later in the analysis")
18+
@Override
19+
public void dataClassSetterTest() {
20+
//
21+
}
22+
1323
}

0 commit comments

Comments
 (0)