@@ -25,6 +25,25 @@ private module VerifiedIntentConfig implements DataFlow::ConfigSig {
25
25
sink .asExpr ( ) = ma .getQualifier ( )
26
26
)
27
27
}
28
+
29
+ predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
30
+
31
+ Location getASelectedSourceLocation ( DataFlow:: Node src ) {
32
+ exists ( AndroidReceiverXmlElement rec , OnReceiveMethod orm , SystemActionName sa |
33
+ src .asParameter ( ) = orm .getIntentParameter ( ) and
34
+ anySystemReceiver ( rec , orm , sa )
35
+ |
36
+ result = rec .getLocation ( )
37
+ or
38
+ result = orm .getLocation ( )
39
+ or
40
+ result = sa .getLocation ( )
41
+ )
42
+ }
43
+
44
+ // All sinks are set to have no locations because sinks aren't selected in
45
+ // the query. This effectively means that we're filtering on sources only.
46
+ Location getASelectedSinkLocation ( DataFlow:: Node sink ) { none ( ) }
28
47
}
29
48
30
49
private module VerifiedIntentFlow = DataFlow:: Global< VerifiedIntentConfig > ;
@@ -67,13 +86,20 @@ class SystemActionName extends AndroidActionXmlElement {
67
86
string getSystemActionName ( ) { result = name }
68
87
}
69
88
70
- /** Holds if the XML element `rec` declares a receiver `orm` to receive the system action named `sa` that doesn't verify intents it receives. */
71
- predicate unverifiedSystemReceiver (
72
- AndroidReceiverXmlElement rec , UnverifiedOnReceiveMethod orm , SystemActionName sa
89
+ private predicate anySystemReceiver (
90
+ AndroidReceiverXmlElement rec , OnReceiveMethod orm , SystemActionName sa
73
91
) {
74
92
exists ( Class ormty |
75
93
ormty = orm .getDeclaringType ( ) and
76
94
rec .getComponentName ( ) = [ "." + ormty .getName ( ) , ormty .getQualifiedName ( ) ] and
77
95
rec .getAnIntentFilterElement ( ) .getAnActionElement ( ) = sa
78
96
)
79
97
}
98
+
99
+ /** Holds if the XML element `rec` declares a receiver `orm` to receive the system action named `sa` that doesn't verify intents it receives. */
100
+ predicate unverifiedSystemReceiver (
101
+ AndroidReceiverXmlElement rec , UnverifiedOnReceiveMethod orm , SystemActionName sa
102
+ ) {
103
+ // The type of `orm` is different in these two predicates
104
+ anySystemReceiver ( rec , orm , sa )
105
+ }
0 commit comments