Skip to content

Commit b10552a

Browse files
committed
Specify exported Android components for local Android DoS
1 parent 76a0db8 commit b10552a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/experimental/Security/CWE/CWE-755/NFEAndroidDoS.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import java
1111
import semmle.code.java.frameworks.android.Intent
12-
import semmle.code.java.frameworks.android.WebView
1312
import semmle.code.java.dataflow.FlowSources
1413
import DataFlow::PathGraph
1514

@@ -80,7 +79,7 @@ private predicate throwsNFE(Expr e) {
8079
}
8180

8281
/**
83-
* Taint configuration tracking flow from untrusted inputs to number conversion calls.
82+
* Taint configuration tracking flow from untrusted inputs to number conversion calls in exported Android compononents.
8483
*/
8584
class NFELocalDoSConfiguration extends TaintTracking::Configuration {
8685
NFELocalDoSConfiguration() { this = "NFELocalDoSConfiguration" }
@@ -91,6 +90,7 @@ class NFELocalDoSConfiguration extends TaintTracking::Configuration {
9190
/** Holds if NFE is thrown but not caught */
9291
override predicate isSink(DataFlow::Node sink) {
9392
exists(Expr e |
93+
e.getEnclosingCallable().getDeclaringType() instanceof ExportableAndroidComponent and
9494
throwsNFE(e) and
9595
not exists(TryStmt t |
9696
t.getBlock() = e.getEnclosingStmt().getEnclosingStmt*() and

0 commit comments

Comments
 (0)