You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Windows Server 2022 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)|WHCP_21H2 |
17
-
| Windows 11 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)|WHCP_21H2|
18
-
| Windows 11, version 22H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)|WHCP_22H2|
19
-
| Windows 11, version 23H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)|WHCP_22H2|
20
-
| Windows 11, version 24H2 |[2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.1.0 | WHCP_24H2 |
14
+
| Release | CodeQL CLI version | microsoft/windows-drivers qlpack version| codeql/cpp-queries version |Associated Repo Branch|
| Windows Server 2022 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| 0.9.0 (If using codeql 2.15.4) | WHCP_21H2|
17
+
| Windows 11 |[2.4.6](https://github.com/github/codeql-cli-binaries/releases/tag/v2.4.6) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| 0.9.0 (If using codeql 2.15.4)|WHCP_21H2|
18
+
| Windows 11, version 22H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| 0.9.0 (If using codeql 2.15.4)|WHCP_22H2|
19
+
| Windows 11, version 23H2 |[2.6.3](https://github.com/github/codeql-cli-binaries/releases/tag/v2.6.3) or [2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.0.13 (If using codeql 2.15.4)| 0.9.0 (If using codeql 2.15.4)|WHCP_22H2|
20
+
| Windows 11, version 24H2 |[2.15.4](https://github.com/github/codeql-cli-binaries/releases/tag/v2.15.4)| 1.1.0 |0.9.0 | WHCP_24H2 |
21
21
22
22
23
23
@@ -69,14 +69,18 @@ This repository contains open-source components for supplemental use in developi
69
69
70
70
**Note:** It is no longer necessary to clone the Windows-Driver-Developer-Supplemental-Tools repo to use the queries for certification.
71
71
72
-
Download the correct version of the microsoft/windows-drivers pack from the Windows Hardware Compatibility Program Release Version Matrix:
73
-
```
72
+
Download the correct version of the CodeQL packs from the Windows Hardware Compatibility Program Release Version Matrix:
CodeQL will install the microsoft/windows-drivers pack to the default directory `C:\Users\<current user>\.codeql\packages\microsoft\windows-drivers\<downloaded version>\`. Do not change this directory or move the installed pack.
81
+
CodeQL will install the packs to the default directory `C:\Users\<current user>\.codeql\packages\microsoft\windows-drivers\<downloaded version>\`. Do not change this directory or move the installed pack.
78
82
79
-
For examples, if using WHCP_24H2, run the following command to download query pack:
83
+
For examples, if using WHCP_24H2, run the following command to download query the microsoft/windows-drivers pack:
<!DOCTYPEqhelp PUBLIC "-//Semmle//qhelp//EN" "qhelp.dtd">
2
+
<qhelp>
3
+
<overview>
4
+
<p>
5
+
This warning indicates that a thread has potential to access deleted objects if preempted. Unlike the Code Analysis version of this query, this query does not currently verify the use of any synchronization mechanisms, so it may produce false positives.
6
+
</p>
7
+
</overview>
8
+
<recommendation>
9
+
<p>
10
+
There should be no access to a reference-counted object after the reference count is at zero
11
+
</p>
12
+
</recommendation>
13
+
<example>
14
+
<p>
15
+
In this example, m_cRef is a member of this. A thread T1 executes the if condition, decrements m_cRef to 1, and is then preempted. Another thread T2 executes the if condition, decrements m_cRef to 0, executes the if body (where this is deleted), and returns NULL.
16
+
</p>
17
+
<samplelanguage="c"><![CDATA[
18
+
ULONG Release_bad()
19
+
{
20
+
if (0 == InterlockedDecrement(&m_cRef))
21
+
{
22
+
delete this;
23
+
return NULL;
24
+
}
25
+
/* this.m_cRef isn't thread safe */
26
+
return m_cRef;
27
+
}
28
+
]]>
29
+
</sample>
30
+
<p>
31
+
The following code does not reference any heap memory after the object is deleted.
0 commit comments