Skip to content

Commit b54fad7

Browse files
committed
C++: UnsafeDaclSecurityDescriptor
1 parent a4ec01e commit b54fad7

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,17 @@ module NullDaclConfig implements DataFlow::ConfigSig {
3838
)
3939
}
4040

41-
predicate observeDiffInformedIncrementalMode() {
42-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 91 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
43-
}
41+
predicate observeDiffInformedIncrementalMode() { any() }
4442

45-
Location getASelectedSourceLocation(DataFlow::Node source) {
46-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 91 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
47-
}
43+
Location getASelectedSourceLocation(DataFlow::Node source) { none() }
4844

4945
Location getASelectedSinkLocation(DataFlow::Node sink) {
50-
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 91 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
46+
exists(SetSecurityDescriptorDaclFunctionCall call | result = call.getLocation() |
47+
call.getArgument(1).getValue().toInt() != 0 and
48+
call.getArgument(2) instanceof NullValue
49+
or
50+
sink.asExpr() = call.getArgument(2)
51+
)
5152
}
5253
}
5354

@@ -82,15 +83,7 @@ module NonNullDaclConfig implements DataFlow::ConfigSig {
8283
}
8384

8485
predicate observeDiffInformedIncrementalMode() {
85-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 92 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
86-
}
87-
88-
Location getASelectedSourceLocation(DataFlow::Node source) {
89-
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 92 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
90-
}
91-
92-
Location getASelectedSinkLocation(DataFlow::Node sink) {
93-
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 92 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-732/UnsafeDaclSecurityDescriptor.ql@94:8:94:11)
86+
none() // only used negatively
9487
}
9588
}
9689

0 commit comments

Comments
 (0)