Skip to content

Commit 6fefb53

Browse files
committed
Fix Padding Oracle Probe result
Report "could not test" in Padding Oracle Probe if it can not execute the test. This can happen if no block ciphers are available.
1 parent 5e51cb1 commit 6fefb53

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/probe/PaddingOracleProbe.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ public ProbeResult executeTest() {
8181
}
8282
LOGGER.debug("Finished non-determinism evaluation");
8383
}
84-
return new PaddingOracleResult(testResultList);
84+
return new PaddingOracleResult(testResultList, TestResult.TRUE);
8585
} catch (Exception e) {
8686
LOGGER.error("Could not scan for " + getProbeName(), e);
87-
return new PaddingOracleResult(null);
87+
return new PaddingOracleResult(null,TestResult.ERROR_DURING_TEST);
8888
}
8989
}
9090

@@ -163,7 +163,7 @@ public void adjustConfig(SiteReport report) {
163163

164164
@Override
165165
public ProbeResult getCouldNotExecuteResult() {
166-
return new PaddingOracleResult(null);
166+
return new PaddingOracleResult(null, TestResult.COULD_NOT_TEST);
167167
}
168168

169169
private void extendFingerPrint(InformationLeakTest<PaddingOracleTestInfo> informationLeakTest,

TLS-Server-Scanner/src/main/java/de/rub/nds/tlsscanner/serverscanner/report/result/PaddingOracleResult.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,23 @@ public class PaddingOracleResult extends ProbeResult {
3131

3232
private TestResult vulnerable;
3333

34-
public PaddingOracleResult(List<InformationLeakTest<PaddingOracleTestInfo>> resultList) {
34+
public PaddingOracleResult(List<InformationLeakTest<PaddingOracleTestInfo>> resultList, TestResult vulnerable) {
3535
super(ProbeType.PADDING_ORACLE);
3636
this.resultList = resultList;
3737
if (this.resultList != null) {
38-
vulnerable = TestResult.FALSE;
38+
this.vulnerable = TestResult.FALSE;
3939
for (InformationLeakTest informationLeakTest : resultList) {
4040
if (informationLeakTest.isSignificantDistinctAnswers()) {
41-
vulnerable = TestResult.TRUE;
41+
this.vulnerable = TestResult.TRUE;
4242
}
4343
}
4444
} else {
45-
vulnerable = TestResult.ERROR_DURING_TEST;
45+
/*Check if it had failed because it could not execute the task, eg: no block ciphers supported*/
46+
if (vulnerable == TestResult.COULD_NOT_TEST)
47+
this.vulnerable = TestResult.COULD_NOT_TEST;
48+
else
49+
this.vulnerable = TestResult.ERROR_DURING_TEST;
50+
4651
}
4752
}
4853

0 commit comments

Comments
 (0)