blob: 3a91ab1a52479d990666eb3f709de303d1ce0d68 [file] [log] [blame]
Kristof Beyls4d82ae62022-01-12 14:40:14 +01001========================================
2LLVM Security Group Transparency Reports
3========================================
4
5This page lists the yearly LLVM Security group transparency reports.
6
72021
8----
9
10The :doc:`LLVM security group <Security>` was established on the 10th of July
112020 by the act of the `initial
12commit <https://github.com/llvm/llvm-project/commit/7bf73bcf6d93>`_ describing
13the purpose of the group and the processes it follows. Many of the group's
14processes were still not well-defined enough for the group to operate well.
15Over the course of 2021, the key processes were defined well enough to enable
16the group to operate reasonably well:
17
18* We defined details on how to report security issues, see `this commit on
19 20th of May 2021 <https://github.com/llvm/llvm-project/commit/c9dbaa4c86d2>`_
20* We refined the nomination process for new group members, see `this
21 commit on 30th of July 2021 <https://github.com/llvm/llvm-project/commit/4c98e9455aad>`_
22* We started writing an annual transparency report (you're reading the 2021
23 report here).
24
25Over the course of 2021, we had 2 people leave the LLVM Security group and 4
26people join.
27
28In 2021, the security group received 13 issue reports that were made publicly
29visible before 31st of December 2021. The security group judged 2 of these
30reports to be security issues:
31
32* https://bugs.chromium.org/p/llvm/issues/detail?id=5
33* https://bugs.chromium.org/p/llvm/issues/detail?id=11
34
35Both issues were addressed with source changes: #5 in clangd/vscode-clangd, and
36#11 in llvm-project. No dedicated LLVM release was made for either.
37
38We believe that with the publishing of this first annual transparency report,
39the security group now has implemented all necessary processes for the group to
40operate as promised. The group's processes can be improved further, and we do
41expect further improvements to get implemented in 2022. Many of the potential
42improvements end up being discussed on the `monthly public call on LLVM's
43security group <https://llvm.org/docs/GettingInvolved.html#online-sync-ups>`_.
44
Kristof Beyls35576212023-01-20 09:49:16 +010045
462022
47----
48
49In this section we report on the issues the group received in 2022, or on issues
50that were received earlier, but were disclosed in 2022.
51
52In 2022, the llvm security group received 15 issues that have been disclosed at
53the time of writing this transparency report.
54
555 of these were judged to be security issues:
56
57* https://bugs.chromium.org/p/llvm/issues/detail?id=17 reports a miscompile in
58 LLVM that can result in the frame pointer and return address being
59 overwritten. This was fixed.
60
61* https://bugs.chromium.org/p/llvm/issues/detail?id=19 reports a vulnerability
62 in `std::filesystem::remove_all` in libc++. This was fixed.
63
64* https://bugs.chromium.org/p/llvm/issues/detail?id=23 reports a new Spectre
65 gadget variant that Speculative Load Hardening (SLH) does not mitigate. No
66 extension to SLH was implemented to also mitigate against this variant.
67
68* https://bugs.chromium.org/p/llvm/issues/detail?id=30 reports missing memory
69 safety protection on the (C++) exception handling path. A number of fixes
70 were implemented.
71
72* https://bugs.chromium.org/p/llvm/issues/detail?id=33 reports the RETBLEED
73 vulnerability. The outcome was clang growing a new security hardening feature
74 `-mfunction-return=thunk-extern`, see https://reviews.llvm.org/D129572.
75
76
77No dedicated LLVM releases were made for any of the above issues.
78
Peter Smith2cf415f2024-02-02 10:32:56 +0000792023
80----
81
82In this section we report on the issues the group received in 2023, or on issues
83that were received earlier, but were disclosed in 2023.
84
859 of these were judged to be security issues:
86
87https://bugs.chromium.org/p/llvm/issues/detail?id=36 reports the presence of
88.git folder in https://llvm.org/.git.
89
90https://bugs.chromium.org/p/llvm/issues/detail?id=66 reports the presence of
91a GitHub Personal Access token in a DockerHub imaage.
92
93https://bugs.chromium.org/p/llvm/issues/detail?id=42 reports a potential gap
94in the Armv8.1-m BTI protection, involving a combination of large switch statements
95and __builtin_unreachable() in the default case.
96
97https://bugs.chromium.org/p/llvm/issues/detail?id=43 reports a dependency
98on an old version of xml2js with a CVE filed against it.
99
100https://bugs.chromium.org/p/llvm/issues/detail?id=45 reports a number of
101dependencies that have had vulnerabilities reported against them.
102
103https://bugs.chromium.org/p/llvm/issues/detail?id=46 is related to issue 43.
104
105https://bugs.chromium.org/p/llvm/issues/detail?id=48 reports a buffer overflow
106in std::format from -fexperimental-library.
107
108https://bugs.chromium.org/p/llvm/issues/detail?id=54 reports a memory leak in
109basic_string move assignment when built with libc++ versions <=6.0 and run against
110newer libc++ shared/dylibs.
111
112https://bugs.chromium.org/p/llvm/issues/detail?id=56 reports an out of bounds buffer
113store introduced by LLVM backends, that regressed due to a procedural oversight.
114
115No dedicated LLVM releases were made for any of the above issues.
116
117Over the course of 2023 we had one person join the LLVM Security Group.
Kristof Beyls9a078a32025-03-19 17:26:41 +0100118
1192024
120----
121
122.. |br| raw:: html
123
124 <br/>
125
126
127Introduction
128^^^^^^^^^^^^
129
130In the first half of 2024, LLVM used the Chromium issue tracker to enable
131reporting security issues responsibly. We switched over to using GitHub's
132"privately reporting a security vulnerability" workflow in the middle of 2024.
133
134In previous years, our transparency reports were shorter, since the full
135discussion on a security ticket in the Chromium issue tracker is fully visible
136once disclosed. This is not the case with issues using GitHub's security
137advisory workflow, so instead we give a longer description in this transparency
138report, to make the relevant information on the ticket publicly available.
139
140This transparency report doesn't necessarily mention all issues that were deemed
141duplicates of other issues, or tickets only created to test the bug tracking
142system.
143
144Security issues fixed under a coordinated disclosure process
145^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146
147This section lists the reported issues where we ended up implementing fixes
148under a coordinated disclosure process. While we were still using the Chromium
149issue tracker, we did not write security advisories for such issues. Since we
150started using the GitHub issues tracker for security issues, we're now
151publishing security advisories for those issues at
152https://github.com/llvm/llvm-security-repo/security/advisories/.
153
1541. “Unexpected behavior when using LTO and branch-protection together” |br|
155 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=58
1562. “Security weakness in PCS for CMSE”
157 (`CVE-2024-0151 <https://nvd.nist.gov/vuln/detail/CVE-2024-0151>`_) |br|
158 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=68
1593. “CMSE secure state may leak from stack to floating-point registers”
160 (`CVE-2024-7883 <https://www.cve.org/cverecord?id=CVE-2024-7883>`_) |br|
161 Details are available at
162 `GHSA-wh65-j229-6wfp <https://github.com/llvm/llvm-security-repo/security/advisories/GHSA-wh65-j229-6wfp>`_
163
164Supply chain security related issues and project services-related issues
165^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166
1671. “GitHub User Involved in xz backdoor may have attempted to change to clang in order to help hide the exploit” |br|
168 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=71
1692. “llvmbot account suspended due to supicious login” |br|
170 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=72
1713. “.git Exposure” |br|
172 GHSA-mr8r-vvrc-w6rq |br|
173 The .git directory was accessible via web browsers under apt.llvm.org, a site
174 used to serve Debian/Ubuntu nightly packages. This issue has been addressed
175 by removing the directory, and is not considered a security issue for the
176 compiler. The .git directory was an artifact of the CI job that maintained
177 the apt website, and was mirroring an open-source project maintained on
178 github (under opencollab/llvm-jenkins.debian.net). The issue is not believed
179 to have leaked any non-public information.
1804. “llvm/llvm-project repo potentially vulnerable to GITHUB\_TOKEN leaks” |br|
181 GHSA-f5xj-84f9-mrw6 |br|
182 GitHub access tokens were being leaked in artifacts generated by GitHub
183 Actions workflows. The vulnerability was first reported publicly as
184 ArtiPACKED, generally applicable to GitHub projects, leading to an audit of
185 LLVM projects and the reporting of this security issue. LLVM contributors
186 audited the workflows, found that the “release-binaries” workflow was
187 affected, but only exposed tokens that were ephemeral and read-only, so was
188 not deemed a privilege escalation concern. The workflow was fixed in a
189 configuration change as PR
190 `106310 <https://github.com/llvm/llvm-project/pull/106310>`_. Older exposed
191 tokens all expired, and the issue is closed as resolved.
1925. “RCE in Buildkite Pipeline” |br|
193 GHSA-2j6q-qcfm-3wcx |br|
194 A Buildkite CI pipeline (llvm-project/rust-llvm-integrate-prototype) allowed
195 Remote Code Execution on the CI runner. The pipeline automatically runs a
196 test job when PRs are filed on the rust-lang/rust repo, but those PRs point
197 to user-controlled branches that could be maliciously modified. A security
198 researcher reported the issue, and demonstrated it by modifying build scripts
199 to expose the CI runner's internal cloud service access tokens. The issue has
200 been addressed with internal configuration changes by owners of the Buildkite
201 pipeline.
202
203Issues deemed to not require coordinated action before disclosing publicly
204^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
205
2061. “Clang Address Sanitizer gives False Negative for Array Out of Bounds Compiled with Optimization” |br|
207 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=57
2082. “Found exposed .svn folder” |br|
209 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=59
2103. “Arbitrary code execution when combining SafeStack \+ dynamic stack allocations \+ \_\_builtin\_setjmp/longjmp” |br|
211 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=60
2124. “RISC-V: Constants are allocated in writeable .sdata section” |br|
213 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=61
2145. “Manifest File with Out-of-Date Dependencies with CVEs” |br|
215 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=62
2166. “Non-const derived ctor should fail compilation when having a consteval base ctor” |br|
217 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=67
2187. “Wrong assembly code generation. Branching to the corrupted "LR".” |br|
219 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=69
2208. “Security bug report” |br|
221 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=70
2229. “Using ASan with setuid binaries can lead to arbitrary file write and elevation of privileges” |br|
223 Details are available at https://bugs.chromium.org/p/llvm/issues/detail?id=73
22410. “Interesting bugs for bool variable in clang projects and aarch64 modes outputting inaccurate results.” |br|
225 GHSA-w7qc-292v-5xh6 |br|
226 The issue reported is on a source code example having undefined behaviour
227 (UB), somewhat similar to this: https://godbolt.org/z/vo4P7bPYr.
228 Therefore, this issue was closed as not a security issue in the compiler. |br|
229 As part of the analysis on this issue, it was deemed useful to document this
230 example of UB and similar cases to help users of compilers understand how UB
231 in source code can lead to security issues. |br|
232 We concluded that probably the best option to do so is to create a regular
233 public issue at https://github.com/llvm/llvm-project/issues, with the same
234 title as the security issue, and to attach a PDF (which should easily be
235 created using a “print-to-pdf” method in the browser) containing all
236 comments. Such public tickets probably need some consistent way to indicate
237 they come from security issues that after analysis were deemed to be outside
238 the LLVM threat model or weren't accepted as a
239 needs-resolution-work-in-private security issue for other reasons. The LLVM
240 Security Response group has so far not taken action to progress this idea. |br|
241 There was also a suggestion of potentially adding a short section in
242 https://llsoftsec.github.io/llsoftsecbook/#compiler-introduced-security-vulnerabilities
243 that summarizes a short example showing that type aliasing UB can and is
244 causing security vulnerabilities.
24511. “llvm-libc qsort can use very large amounts of stack if an attacker can control its input list” |br|
246 GHSA-gw5j-473x-p29m |br|
247 If the llvm-libc `qsort` function is used in a context where its input list
248 comes from an attacker, then the attacker can craft a list that causes
249 `qsort`'s stack usage to be linear in the size of the input array,
250 potentially overflowing the available memory region for the stack. |br|
251 After discussion with stakeholders, including maintainers for llvm-libc, the
252 conclusion was that this doesn't have to be processed as a security issue
253 needing coordinated disclosure. An improvement to `qsort`'s implementation
254 was implemented through pull request
255 https://github.com/llvm/llvm-project/pull/110849.
25612. “VersionFromVCS.cmake may leak secrets in released builds” |br|
257 GHSA-rcw6-jqvr-fcrx |br|
258 The LLVM build system may leak secrets of VCS configuration into release
259 builds if the user clones the repo with an https link that contains their
260 username and/or password. |br|
261 Mitigations were implemented in
262 https://github.com/llvm/llvm-project/pull/105220,
263 https://github.com/llvm/llvm-project/commit/57dc09341e5eef758b1abce78822c51069157869.
264 An issue was raised to suggest one more mitigation to be implemented at
265 https://github.com/llvm/llvm-project/issues/109030.
266
267Invalid issues
268^^^^^^^^^^^^^^
269
270The LLVM security group received 5 issues which were created accidentally or
271were not related to the LLVM project. The subject lines for these were:
272
273* “Found this in my android”
274* “\[Not a new security issue\] Continued discussion for GHSA-w7qc-292v-5xh6”
275* “please delete it.”
276* “Please help me to delete it.”
277* “llvm code being used in malicious hacking of network and children's devices”
278
279Furthermore, we had 2 tickets that were created to test the setup and workflow
280as part of migrating to GitHub's “security advisory”-based reporting:
281
2821. “Test if new draft security advisory gets emailed to LLVM security group” |br|
283 GHSA-82m9-xvw3-rvpv
2842. “Test that a non-admin can create an advisory (no vulnerability).” |br|
285 GHSA-34gr-6c7h-cc93