Skip to content

Commit f5daeea

Browse files
authored
Merge pull request github#3421 from hvitved/csharp/dataflow/change-note
C#/Java/C++: Add change note for github#3110
2 parents 2a341d9 + c837ab7 commit f5daeea

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

change-notes/1.25/analysis-cpp.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Improvements to C/C++ analysis
2+
3+
The following changes in version 1.25 affect C/C++ analysis in all applications.
4+
5+
## General improvements
6+
7+
## New queries
8+
9+
| **Query** | **Tags** | **Purpose** |
10+
|-----------------------------|-----------|--------------------------------------------------------------------|
11+
12+
## Changes to existing queries
13+
14+
| **Query** | **Expected impact** | **Change** |
15+
|----------------------------|------------------------|------------------------------------------------------------------|
16+
17+
## Changes to libraries
18+
19+
* The data-flow library has been improved, which affects most security queries by potentially
20+
adding more results. Flow through functions now takes nested field reads/writes into account.
21+
For example, the library is able to track flow from `taint()` to `sink()` via the method
22+
`getf2f1()` in
23+
```c
24+
struct C {
25+
int f1;
26+
};
27+
28+
struct C2
29+
{
30+
C f2;
31+
32+
int getf2f1() {
33+
return f2.f1; // Nested field read
34+
}
35+
36+
void m() {
37+
f2.f1 = taint();
38+
sink(getf2f1()); // NEW: taint() reaches here
39+
}
40+
};
41+
```

change-notes/1.25/analysis-csharp.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,28 @@ The following changes in version 1.25 affect C# analysis in all applications.
2424
have type parameters. This means that non-generic nested types inside construced types,
2525
such as `A<int>.B`, no longer are considered unbound generics. (Such nested types do,
2626
however, still have relevant `.getSourceDeclaration()`s, for example `A<>.B`.)
27+
* The data-flow library has been improved, which affects most security queries by potentially
28+
adding more results. Flow through methods now takes nested field reads/writes into account.
29+
For example, the library is able to track flow from `"taint"` to `Sink()` via the method
30+
`GetF2F1()` in
31+
```csharp
32+
class C1
33+
{
34+
string F1;
35+
}
36+
37+
class C2
38+
{
39+
C1 F2;
40+
41+
string GetF2F1() => F2.F1; // Nested field read
42+
43+
void M()
44+
{
45+
F2 = new C1() { F1 = "taint" };
46+
Sink(GetF2F1()); // NEW: "taint" reaches here
47+
}
48+
}
49+
```
2750

2851
## Changes to autobuilder

change-notes/1.25/analysis-java.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Improvements to Java analysis
2+
3+
The following changes in version 1.25 affect Java analysis in all applications.
4+
5+
## General improvements
6+
7+
## New queries
8+
9+
| **Query** | **Tags** | **Purpose** |
10+
|-----------------------------|-----------|--------------------------------------------------------------------|
11+
12+
13+
## Changes to existing queries
14+
15+
| **Query** | **Expected impact** | **Change** |
16+
|------------------------------|------------------------|-----------------------------------|
17+
18+
19+
## Changes to libraries
20+
21+
* The data-flow library has been improved, which affects most security queries by potentially
22+
adding more results. Flow through methods now takes nested field reads/writes into account.
23+
For example, the library is able to track flow from `"taint"` to `sink()` via the method
24+
`getF2F1()` in
25+
```java
26+
class C1 {
27+
String f1;
28+
C1(String f1) { this.f1 = f1; }
29+
}
30+
31+
class C2 {
32+
C1 f2;
33+
String getF2F1() {
34+
return this.f2.f1; // Nested field read
35+
}
36+
void m() {
37+
this.f2 = new C1("taint");
38+
sink(this.getF2F1()); // NEW: "taint" reaches here
39+
}
40+
}
41+
```

0 commit comments

Comments
 (0)