Skip to content

Commit 47623aa

Browse files
authored
Merge pull request #19663 from d10c/d10c/cpp/diff-informed
C++: mass enable diff-informed data flow
2 parents 79e982a + 4dd07f4 commit 47623aa

File tree

12 files changed

+24
-0
lines changed

12 files changed

+24
-0
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ module PrivateCleartextWrite {
4242
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
4343

4444
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
45+
46+
predicate observeDiffInformedIncrementalMode() { any() }
4547
}
4648

4749
module WriteFlow = TaintTracking::Global<WriteConfig>;

cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ module CastToPointerArithFlowConfig implements DataFlow::StateConfigSig {
4848
predicate isBarrierIn(DataFlow::Node node) { isSource(node, _) }
4949

5050
predicate isBarrierOut(DataFlow::Node node) { isSink(node, _) }
51+
52+
predicate observeDiffInformedIncrementalMode() { any() }
5153
}
5254

5355
/**

cpp/ql/src/Likely Bugs/Memory Management/NtohlArrayNoBound.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ private module NetworkToBufferSizeConfig implements DataFlow::ConfigSig {
141141
gc.controls(node.asExpr().getBasicBlock(), _)
142142
)
143143
}
144+
145+
predicate observeDiffInformedIncrementalMode() { any() }
144146
}
145147

146148
module NetworkToBufferSizeFlow = DataFlow::Global<NetworkToBufferSizeConfig>;

cpp/ql/src/Security/CWE/CWE-114/UncontrolledProcessOperation.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ module Config implements DataFlow::ConfigSig {
3939
or
4040
node.asCertainDefinition().getUnspecifiedType() instanceof ArithmeticType
4141
}
42+
43+
predicate observeDiffInformedIncrementalMode() { any() }
4244
}
4345

4446
module Flow = TaintTracking::Global<Config>;

cpp/ql/src/Security/CWE/CWE-129/ImproperArrayIndexValidation.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ module ImproperArrayIndexValidationConfig implements DataFlow::ConfigSig {
6666
not offsetIsAlwaysInBounds(arrayExpr, offsetExpr)
6767
)
6868
}
69+
70+
predicate observeDiffInformedIncrementalMode() { any() }
6971
}
7072

7173
module ImproperArrayIndexValidation = TaintTracking::Global<ImproperArrayIndexValidationConfig>;

cpp/ql/src/Security/CWE/CWE-134/UncontrolledFormatString.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ module Config implements DataFlow::ConfigSig {
4444
or
4545
isArithmeticNonCharType(node.asCertainDefinition().getUnspecifiedType())
4646
}
47+
48+
predicate observeDiffInformedIncrementalMode() { any() }
4749
}
4850

4951
module Flow = TaintTracking::Global<Config>;

cpp/ql/src/Security/CWE/CWE-190/IntegerOverflowTainted.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ module Config implements DataFlow::ConfigSig {
9494
not iTo instanceof PointerArithmeticInstruction
9595
)
9696
}
97+
98+
predicate observeDiffInformedIncrementalMode() { any() }
9799
}
98100

99101
module Flow = TaintTracking::Global<Config>;

cpp/ql/src/Security/CWE/CWE-497/ExposedSystemData.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ module ExposedSystemDataConfig implements DataFlow::ConfigSig {
3434
predicate isBarrier(DataFlow::Node node) {
3535
node.asIndirectArgument() = any(MemsetFunction func).getACallToThisFunction().getAnArgument()
3636
}
37+
38+
predicate observeDiffInformedIncrementalMode() { any() }
3739
}
3840

3941
module ExposedSystemData = TaintTracking::Global<ExposedSystemDataConfig>;

cpp/ql/src/Security/CWE/CWE-497/PotentiallyExposedSystemData.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ module PotentiallyExposedSystemDataConfig implements DataFlow::ConfigSig {
5454
predicate isBarrier(DataFlow::Node node) {
5555
node.asIndirectArgument() = any(MemsetFunction func).getACallToThisFunction().getAnArgument()
5656
}
57+
58+
predicate observeDiffInformedIncrementalMode() { any() }
5759
}
5860

5961
module PotentiallyExposedSystemData = TaintTracking::Global<PotentiallyExposedSystemDataConfig>;

cpp/ql/src/Security/CWE/CWE-611/XXE.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ module XxeConfig implements DataFlow::StateConfigSig {
4545
}
4646

4747
predicate neverSkip(DataFlow::Node node) { none() }
48+
49+
predicate observeDiffInformedIncrementalMode() { any() }
4850
}
4951

5052
module XxeFlow = DataFlow::GlobalWithState<XxeConfig>;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy