Debian Codegraph @

dev/doc/critical-bugs.md

raw symbols SCIP
1 Compilation of critical bugs in stable releases of Coq
2 ======================================================
3
4 This file recollects knowledge about critical bugs found in Coq since version 8.0.
5
6 <!-- generate using dev/tools/markdown-toc -->
7
8 ## Table of Contents
9
10 - [Non fixed bugs](#non-fixed-bugs)
11 - [buffer overflow on large records and closures (infinite loop with OCaml 5)](#buffer-overflow-on-large-records-and-closures-infinite-loop-with-ocaml-5)
12 - [memory corruption by evaluating on ill-typed terms (obtained from unsafe tactics)](#memory-corruption-by-evaluating-on-ill-typed-terms-obtained-from-unsafe-tactics)
13 - [kernel and checker accept incorrect name aliasing information](#kernel-and-checker-accept-incorrect-name-aliasing-information)
14 - [coqchk checks too little about primitive declarations](#coqchk-checks-too-little-about-primitive-declarations)
15 - [Print Assumptions + Parameter Inline fails to report some inconsistent flags](#print-assumptions-parameter-inline-fails-to-report-some-inconsistent-flags)
16 - [Print Assumptions does not report Unset Universe Checking used during functor application](#print-assumptions-does-not-report-unset-universe-checking-used-during-functor-application)
17 - [Fixed bugs](#fixed-bugs)
18 - [Typing constructions](#typing-constructions)
19 - [substitution missing in the body of a let](#substitution-missing-in-the-body-of-a-let)
20 - [missing lift in checking guard](#missing-lift-in-checking-guard)
21 - [de Bruijn indice bug in checking guard of nested cofixpoints](#de-bruijn-indice-bug-in-checking-guard-of-nested-cofixpoints)
22 - [de Bruijn indice bug in computing allowed elimination principle](#de-bruijn-indice-bug-in-computing-allowed-elimination-principle)
23 - [bug in Prop<=Set conversion which made Set identifiable with Prop, preventing a proof-irrelevant interpretation of Prop](#bug-in-propset-conversion-which-made-set-identifiable-with-prop-preventing-a-proof-irrelevant-interpretation-of-prop)
24 - [incorrect abstraction of sort variables in relevance marks on opaque constants](#incorrect-abstraction-of-sort-variables-in-relevance-marks-on-opaque-constants)
25 - [guard checker forgot to check non-structural arguments of fixpoint](#guard-checker-forgot-to-check-non-structural-arguments-of-fixpoint)
26 - [guard checker incorrectly detects match on match as returning a subterm](#guard-checker-incorrectly-detects-match-on-match-as-returning-a-subterm)
27 - [guard checker does incorrect reduction across inner fixpoint, accepting wrong fixpoints](#guard-checker-does-incorrect-reduction-across-inner-fixpoint-accepting-wrong-fixpoints)
28 - [guard checker does not account for cross calls to compute uniform arguments of a nested mutual fixpoint](#guard-checker-does-not-account-for-cross-calls-to-compute-uniform-arguments-of-a-nested-mutual-fixpoint)
29 - [guard checker does not check for correct recursive calls when passed as uniform argument in a nested fixpoint](#guard-checker-does-not-check-for-correct-recursive-calls-when-passed-as-uniform-argument-in-a-nested-fixpoint)
30 - [guard checker does not count argument-less recursive calls to compute uniform arguments of a nested mutual fixpoint](#guard-checker-does-not-count-argument-less-recursive-calls-to-compute-uniform-arguments-of-a-nested-mutual-fixpoint)
31 - [guard checker does not check arguments of recursive calls in uniformity analysis](#guard-checker-does-not-check-arguments-of-recursive-calls-in-uniformity-analysis)
32 - [Module system](#module-system)
33 - [missing universe constraints in typing "with" clause of a module type](#missing-universe-constraints-in-typing-with-clause-of-a-module-type)
34 - [universe constraints for module subtyping not stored in vo files](#universe-constraints-for-module-subtyping-not-stored-in-vo-files)
35 - [module subtyping disrespected squashing status of inductives](#module-subtyping-disrespected-squashing-status-of-inductives)
36 - [Functor inlining drops universe substitution](#functor-inlining-drops-universe-substitution)
37 - [Primitives are incorrectly considered convertible to anything by module subtyping](#primitives-are-incorrectly-considered-convertible-to-anything-by-module-subtyping)
38 - [Missing substitution when strengthening functors](#missing-substitution-when-strengthening-functors)
39 - [Missing substitution when strengthening aliased functors](#missing-substitution-when-strengthening-aliased-functors)
40 - [Incorrect subtyping rule for universe polymorphic "with Definition".](#incorrect-subtyping-rule-for-universe-polymorphic-with-definition)
41 - [Subtyping ignored elimination constraints](#subtyping-ignored-elimination-constraints)
42 - [Universes](#universes)
43 - [issue with two parameters in the same universe level](#issue-with-two-parameters-in-the-same-universe-level)
44 - [universe polymorphism can capture global universes](#universe-polymorphism-can-capture-global-universes)
45 - [template polymorphism not collecting side constraints on the universe level of a parameter](#template-polymorphism-not-collecting-side-constraints-on-the-universe-level-of-a-parameter)
46 - [more template polymorphism missing constraints](#more-template-polymorphism-missing-constraints)
47 - [universe constraints erroneously discarded when forcing an asynchronous proof containing delayed monomorphic constraints inside a universe polymorphic section](#universe-constraints-erroneously-discarded-when-forcing-an-asynchronous-proof-containing-delayed-monomorphic-constraints-inside-a-universe-polymorphic-section)
48 - [Set+2 incorrectly simplified to Set+1](#set2-incorrectly-simplified-to-set1)
49 - [variance inference for section universes ignored use of section universes in inductives and axioms defined before the inductive being inferred](#variance-inference-for-section-universes-ignored-use-of-section-universes-in-inductives-and-axioms-defined-before-the-inductive-being-inferred)
50 - [Missing substitution for relevance of product domain in lazy](#missing-substitution-for-relevance-of-product-domain-in-lazy)
51 - [Missing stack conversion for irrelevant-to-relevant match](#missing-stack-conversion-for-irrelevant-to-relevant-match)
52 - [Incorrect discharge of sort polymorphic inductive squashing with section polymorphic sort](#incorrect-discharge-of-sort-polymorphic-inductive-squashing-with-section-polymorphic-sort)
53 - [Missing universe substitution in primitive array instance in lazy](#missing-universe-substitution-in-primitive-array-instance-in-lazy)
54 - [Double universe substitution in letins from indices in match return clause](#double-universe-substitution-in-letins-from-indices-in-match-return-clause)
55 - [Primitive projections](#primitive-projections)
56 - [check of guardedness of extra arguments of primitive projections missing](#check-of-guardedness-of-extra-arguments-of-primitive-projections-missing)
57 - [records based on primitive projections became possibly recursive without the guard condition being updated](#records-based-on-primitive-projections-became-possibly-recursive-without-the-guard-condition-being-updated)
58 - [incorrect checking of subtyping with algebraic universes](#incorrect-checking-of-subtyping-with-algebraic-universes)
59 - [Conversion machines](#conversion-machines)
60 - [the invariant justifying some optimization was wrong for some combination of sharing side effects](#the-invariant-justifying-some-optimization-was-wrong-for-some-combination-of-sharing-side-effects)
61 - [collision between constructors when more than 256 constructors in a type](#collision-between-constructors-when-more-than-256-constructors-in-a-type)
62 - [wrong universe constraints](#wrong-universe-constraints)
63 - [missing pops in executing 31bit arithmetic](#missing-pops-in-executing-31bit-arithmetic)
64 - [primitive integer emulation layer on 32 bits not robust to garbage collection](#primitive-integer-emulation-layer-on-32-bits-not-robust-to-garbage-collection)
65 - [broken long multiplication primitive integer emulation layer on 32 bits](#broken-long-multiplication-primitive-integer-emulation-layer-on-32-bits)
66 - [broken addmuldiv operation for large shifts](#broken-addmuldiv-operation-for-large-shifts)
67 - [translation of identifier from Coq to OCaml was not bijective, leading to identify True and False](#translation-of-identifier-from-coq-to-ocaml-was-not-bijective-leading-to-identify-true-and-false)
68 - [stuck primitive projections computed incorrectly by native_compute](#stuck-primitive-projections-computed-incorrectly-by-native_compute)
69 - [incorrect De Bruijn handling when inferring the relevance mark for a lambda](#incorrect-de-bruijn-handling-when-inferring-the-relevance-mark-for-a-lambda)
70 - [buffer overflow on large accumulators](#buffer-overflow-on-large-accumulators)
71 - [buffer overflow, arbitrary code execution on floating-point operations](#buffer-overflow-arbitrary-code-execution-on-floating-point-operations)
72 - [arbitrary code execution on irreducible PArray.set](#arbitrary-code-execution-on-irreducible-parrayset)
73 - [arbitrary code execution on arrays of floating point numbers](#arbitrary-code-execution-on-arrays-of-floating-point-numbers)
74 - [conversion of Prod / Prod values was comparing the wrong components](#conversion-of-prod-prod-values-was-comparing-the-wrong-components)
75 - [η-expansion of cofixpoints was performed in the wrong environment](#-expansion-of-cofixpoints-was-performed-in-the-wrong-environment)
76 - [conversion would compare the mutated version of primitive arrays instead of undoing mutation where needed](#conversion-would-compare-the-mutated-version-of-primitive-arrays-instead-of-undoing-mutation-where-needed)
77 - [tactic code could mutate a global cache of values for section variables](#tactic-code-could-mutate-a-global-cache-of-values-for-section-variables)
78 - [incorrect handling of universe polymorphism](#incorrect-handling-of-universe-polymorphism)
79 - [Forgotten universe substitution with Register Inline on universe polymorphic definition](#forgotten-universe-substitution-with-register-inline-on-universe-polymorphic-definition)
80 - [Side-effects](#side-effects)
81 - [polymorphic side-effects inside monomorphic definitions incorrectly handled as not inlined](#polymorphic-side-effects-inside-monomorphic-definitions-incorrectly-handled-as-not-inlined)
82 - [Section variables used in side effects not checked by Proof using](#section-variables-used-in-side-effects-not-checked-by-proof-using)
83 - [Forgetting unsafe flags](#forgetting-unsafe-flags)
84 - [unsafe typing flags used inside a section would not be reported by Print Assumptions after closing the section](#unsafe-typing-flags-used-inside-a-section-would-not-be-reported-by-print-assumptions-after-closing-the-section)
85 - [Conflicts with axioms in library](#conflicts-with-axioms-in-library)
86 - [axiom of description and decidability of equality on real numbers in library Reals was inconsistent with impredicative Set](#axiom-of-description-and-decidability-of-equality-on-real-numbers-in-library-reals-was-inconsistent-with-impredicative-set)
87 - [guard condition was unknown to be inconsistent with propositional extensionality in library Sets](#guard-condition-was-unknown-to-be-inconsistent-with-propositional-extensionality-in-library-sets)
88 - [incompatibility axiom of choice and excluded-middle with elimination of large singletons to Set](#incompatibility-axiom-of-choice-and-excluded-middle-with-elimination-of-large-singletons-to-set)
89 - [Incorrect specification of PrimFloat.leb](#incorrect-specification-of-primfloatleb)
90 - [Incorrect implementation of SFclassify.](#incorrect-implementation-of-sfclassify)
91 - [nativenorm reading back closures as arbitrary floating-point values](#nativenorm-reading-back-closures-as-arbitrary-floating-point-values)
92 - [guard condition issue made it inconsistent with propositional extensionality in library Sets](#guard-condition-issue-made-it-inconsistent-with-propositional-extensionality-in-library-sets)
93 - [Deserialization](#deserialization)
94 - [deserialization of .vo data not properly checked](#deserialization-of-vo-data-not-properly-checked)
95 - [Probably non exploitable fixed bugs](#probably-non-exploitable-fixed-bugs)
96 - [bug in 31bit arithmetic](#bug-in-31bit-arithmetic)
97
98 ## Non fixed bugs
99
100 #### buffer overflow on large records and closures (infinite loop with OCaml 5)
101
102 - component: VM reduction machine
103 - introduced: 8.1
104 - impacted versions: 8.1-NOW
105 - impacted coqchk versions: none (no VM in coqchk)
106 - fixed in: NONE
107 - found by: Dolan, Roux, Melquiond
108 - GH issue number: ocaml/ocaml#6385, rocq-prover/rocq#13439
109 - exploit: ??
110 - risk: requires very large number of arguments, fix block size or nested letins
111
112 #### memory corruption by evaluating on ill-typed terms (obtained from unsafe tactics)
113
114 - component: VM and native reduction machines
115 - introduced: 8.1
116 - impacted versions: 8.1-NOW
117 - impacted coqchk versions: none (no VM or native in coqchk)
118 - fixed in: NONE
119 - found by: Gaëtan Gilbert, Andres Erbsen
120 - GH issue number: rocq-prover/rocq#16891
121 - exploit: requires a memory corruption to craft something that doesn't just SIGSEV
122 - risk: could be activated by chance but unlikely to produce anything
123 other than SIGSEV outside a deliberate attack
124
125 #### kernel and checker accept incorrect name aliasing information
126
127 - component: name handling / typechecker
128 - introduced: a long time ago
129 - impacted versions: -NOW
130 - impacted coqchk versions: same
131 - fixed in: NONE
132 - found by: Pierre-Marie Pédrot
133 - GH issue number: rocq-prover/rocq#7609
134 - exploit: see issue (requires a plugin or hand crafted .vo file)
135 - risk: low
136
137 #### coqchk checks too little about primitive declarations
138
139 - component: primitive types and operators
140 - introduced: v8.10 (#6914 primitive integers)
141 - impacted versions: coqchk only
142 - impacted coqchk versions: V8.10-NOW
143 - fixed in: NONE
144 - found by: Gaëtan Gilbert
145 - GH issue number: rocq-prover/rocq#12439
146 - exploit: not fully worked out, requires crafted .vo file
147 - risk: none (requires crafted .vo file)
148
149 #### Print Assumptions + Parameter Inline fails to report some inconsistent flags
150
151 - component: module functors
152 - introduced: rocq-prover/rocq#79
153 - impacted versions: V8.6-NOW
154 - impacted coqchk versions: none
155 - found by: Jason Gross
156 - GH issue number: rocq-prover/rocq#12155
157 - exploit: see issue
158 - risk: moderate if not using coqchk, none if using coqchk (coqchk rejects the produced file)
159
160 #### Print Assumptions does not report Unset Universe Checking used during functor application
161
162 - component: module functors
163 - introduced: v8.11 (#10291) or earlier
164 - impacted versions: V8.11-NOW
165 - impacted coqchk versions: none
166 - found by: Gaëtan Gilbert
167 - GH issue number: rocq-prover/rocq#16646
168 - exploit: see issue
169 - risk: moderate if not using coqchk, none if using coqchk (coqchk rejects the produced file)
170
171 ## Fixed bugs
172
173 ### Typing constructions
174
175 #### substitution missing in the body of a let
176
177 - component: "match"
178 - introduced: ?
179 - impacted released versions: V8.3-V8.3pl2, V8.4-V8.4pl4
180 - impacted development branches: none
181 - impacted coqchk versions: ?
182 - fixed in: master/trunk/v8.5 ([e583a79b5](https://github.com/rocq-prover/rocq/commit/e583a79b5a0298fd08f34305cc876d5117913e95), 22 Nov 2015, Herbelin), v8.4 ([525056f1](https://github.com/rocq-prover/rocq/commit/525056f1a630426b78668ab583e228c25b492c35), 22 Nov 2015, Herbelin), v8.3 ([4bed0289](https://github.com/rocq-prover/rocq/commit/4bed0289d66e6e413ccdea7a33dc747c83bce92e), 22 Nov 2015, Herbelin)
183 - found by: Herbelin
184 - exploit: test-suite/success/Case22.v
185 - GH issue number: ?
186 - risk: ?
187
188 #### missing lift in checking guard
189
190 - component: fixpoint, guard
191 - introduced: probably from V5.10
192 - impacted released versions: probably V5-V7, V8.0-V8.0pl4, V8.1-V8.1pl4
193 - impacted development branches: v8.0 ?
194 - impacted coqchk versions: ?
195 - fixed in: master/trunk/v8.2 ([ff45afa8](https://github.com/rocq-prover/rocq/commit/ff45afa83a9235cbe33af525b6b0c7985dc7e091), r11646, 2 Dec 2008, Barras), v8.1 ([f8e7f273](https://github.com/rocq-prover/rocq/commit/f8e7f273f2e6009c3c0f0eee47c33542a6fdf361), r11648, 2 Dec 2008, Barras)
196 - found by: Barras
197 - exploit: test-suite/failure/guard.v
198 - GH issue number: none
199 - risk: unprobable by chance
200
201 #### de Bruijn indice bug in checking guard of nested cofixpoints
202
203 - component: cofixpoint, guard
204 - introduced: after V6.3.1, before V7.0
205 - impacted released versions: V8.0-V8.0pl4, V8.1-V8.1pl4, V8.2-V8.2pl2, V8.3-V8.3pl2, V8.4-V8.4pl4
206 - impacted development branches: none
207 - impacted coqchk versions: ?
208 - fixed in: master ([9f81e2c36](https://github.com/rocq-prover/rocq/commit/9f81e2c360c2be764e71d21ed7c266ee6e8a88c5), 10 Apr 2014, Dénès), v8.4 ([f50ec9e7d](https://github.com/rocq-prover/rocq/commit/f50ec9e7dbd082c9a465aedda25427d93e12cabe), 11 Apr 2014, Dénès), v8.3 ([40c0fe7f4](https://github.com/rocq-prover/rocq/commit/40c0fe7f44b3c99bec5188e01197c8a77348a4ee), 11 Apr 2014, Dénès), v8.2 ([06d66df8c](https://github.com/rocq-prover/rocq/commit/06d66df8c713307625b1c40c054ca06c00ff74b3), 11 Apr 2014, Dénès), v8.1 ([977afae90](https://github.com/rocq-prover/rocq/commit/977afae90c4e2aa974232b0c664346db72aadaa3), 11 Apr 2014, Dénès), v8.0 ([f1d632992](https://github.com/rocq-prover/rocq/commit/f1d632992e33a74b30e79271bd3748d69c5a2152), 29 Nov 2015, Herbelin, backport)
209 - found by: Dénès
210 - exploit: ?
211 - GH issue number: none ?
212 - risk: ?
213
214 #### de Bruijn indice bug in computing allowed elimination principle
215
216 - component: inductive types, elimination principle
217 - introduced: 23 May 2006, [9c2d70b](https://github.com/rocq-prover/rocq/commit/9c2d70b91341552e964979ba09d5823cc023a31c), r8845, Herbelin (part of template polymorphism)
218 - impacted released versions: V8.1-V8.1pl4, V8.2-V8.2pl2, V8.3-V8.3pl2, V8.4-V8.4pl4
219 - impacted development branches: none
220 - impacted coqchk versions: ?
221 - fixed in: master ([8a01c3685](https://github.com/rocq-prover/rocq/commit/8a01c36850353c1875383cbc788cec9c42590b57), 24 Jan 2014, Dénès), v8.4 ([8a01c3685](https://github.com/rocq-prover/rocq/commit/8a01c36850353c1875383cbc788cec9c42590b57), 25 Feb 2014, Dénès), v8.3 ([2b3cc4f85](https://github.com/rocq-prover/rocq/commit/2b3cc4f85cc134fe58c21d720851e275e6a77ea0), 25 Feb 2014, Dénès), v8.2 ([459888488](https://github.com/rocq-prover/rocq/commit/4598884884d6db00c485189e3a3b793b05814928), 25 Feb 2014, Dénès), v8.1 ([79aa20872](https://github.com/rocq-prover/rocq/commit/79aa208728420747a933f38b3aa101c92f4dcde0), 25 Feb 2014, Dénès)
222 - found by: Dénès
223 - exploit: see rocq-prover/rocq#3211
224 - GH issue number: rocq-prover/rocq#3211
225 - risk: ?
226
227 #### bug in Prop<=Set conversion which made Set identifiable with Prop, preventing a proof-irrelevant interpretation of Prop
228
229 - component: universe subtyping
230 - introduced: V8.2 ([bba897d5f](https://github.com/rocq-prover/rocq/commit/bba897d5fd964bef0aa10102ef41cee1ac5fc3bb), 12 May 2008, Herbelin)
231 - impacted released versions: V8.2-V8.2pl2
232 - impacted development branches: none
233 - impacted coqchk versions: ?
234 - fixed in: master/trunk ([679801](https://github.com/rocq-prover/rocq/commit/679801623c1f55d0081f952c2094c3572fa39d4f), r13450, 23 Sep 2010, Glondu), v8.3 ([309a53f2](https://github.com/rocq-prover/rocq/commit/309a53f2e1aa9b2a39654cf5fa23eb632a04c22f), r13449, 22 Sep 2010, Glondu), v8.2 (41ea5f08, r14263, 6 Jul 2011, Herbelin, backport)
235 - found by: Georgi Guninski
236 - exploit: test-suite/failure/prop_set_proof_irrelevance.v
237 - GH issue number: none?
238 - risk: ?
239
240 #### incorrect abstraction of sort variables in relevance marks on opaque constants
241
242 and lack of checking of relevance marks on constants in coqchk
243
244 - component: sort polymorphism / proof irrelevance
245 - introduced: V8.10 for the coqchk bug, V8.19 for the coqc bug
246 - impacted released versions: V8.19.0
247 - impacted coqchk: versions: V8.10-V8.19.0
248 - fixed in: V8.19.1, V8.20
249 - found by: Gaëtan Gilbert
250 - exploit / GH issue: [#18629](https://github.com/rocq-prover/rocq/issues/18629)
251 - risk: low (requires specific plugin code unlikely to be found in non malicious plugin)
252
253 #### guard checker forgot to check non-structural arguments of fixpoint
254
255 - component: guard checking
256 - introduced: V8.16 ([#15434](https://github.com/rocq-prover/rocq/pull/15434))
257 - impacted released versions: V8.16 to V9.0.0
258 - impacted coqchk versions: Same
259 - fixed in: V9.0.1, V9.1.0
260 - found by: ccz181078
261 - exploit / GH issue: [#20413](https://github.com/rocq-prover/rocq/issues/20413)
262 - risk: significant (bad terms may be generated by Program machinery)
263
264 #### guard checker incorrectly detects match on match as returning a subterm
265
266 - component: guard checking
267 - introduced: V8.16 ([#15434](https://github.com/rocq-prover/rocq/pull/15434))
268 - impacted released versions: V8.16 to V9.0.0
269 - impacted coqchk versions: Same
270 - fixed in: V9.0.1, V9.1.0
271 - found by: Yann Leray
272 - exploit / GH issue: [#20455](https://github.com/rocq-prover/rocq/issues/20455)
273 - risk: unknown (no development in CI was affected)
274
275 #### guard checker does incorrect reduction across inner fixpoint, accepting wrong fixpoints
276
277 - component: guard checking
278 - introduced: V8.16 ([#15434](https://github.com/rocq-prover/rocq/pull/15434))
279 - impacted released versions: V8.16 to V9.0.0
280 - impacted coqchk versions: Same
281 - fixed in: V9.0.1, V9.1.0 ([#20648](https://github.com/rocq-prover/rocq/issues/20648))
282 - found by: Yann Leray
283 - exploit / GH issue: [#20555](https://github.com/rocq-prover/rocq/issues/20555)
284 - risk: unknown (no development in CI was affected)
285
286 #### guard checker does not account for cross calls to compute uniform arguments of a nested mutual fixpoint
287 - component: guard checking
288 - introduced: V8.20 ([#17986](https://github.com/rocq-prover/rocq/pull/17986))
289 - impacted released versions: V8.20, V9.0, V9.1
290 - impacted coqchk versions: Same
291 - fixed in: V9.2.0 ([#21684](https://github.com/rocq-prover/rocq/pull/21684))
292 - found by: Tristan Stérin
293 - exploit / GH issue: [#21682](https://github.com/rocq-prover/rocq/issues/21682)
294 - risk: unknown (no development in CI was affected)
295
296 #### guard checker does not check for correct recursive calls when passed as uniform argument in a nested fixpoint
297 - component: guard checking
298 - introduced: V9.0.1, V9.1.0 ([#20648](https://github.com/rocq-prover/rocq/issues/20648), see 2 above)
299 - impacted released versions: V9.0.1, V9.1.0, V9.1.1
300 - impacted coqchk versions: Same
301 - fixed in: V9.2.0 ([#21684](https://github.com/rocq-prover/rocq/pull/21684))
302 - found by: Tristan Stérin
303 - exploit / GH issue: [#21683](https://github.com/rocq-prover/rocq/issues/21683)
304 - risk: unknown (no development in CI was affected)
305
306 #### guard checker does not count argument-less recursive calls to compute uniform arguments of a nested mutual fixpoint
307 - component: guard checking
308 - introduced: V8.20 ([#17986](https://github.com/rocq-prover/rocq/pull/17986))
309 - impacted released versions: V8.20, V9.0, V9.1
310 - impacted coqchk versions: Same
311 - fixed in: V9.2.0 ([#21684](https://github.com/rocq-prover/rocq/pull/21684))
312 - found by: Tristan Stérin
313 - exploit / GH issue: [#21701](https://github.com/rocq-prover/rocq/issues/21701)
314 - risk: unknown (no development in CI was affected)
315
316 #### guard checker does not check arguments of recursive calls in uniformity analysis
317 - component: guard checking
318 - introduced: V8.20 ([#17986](https://github.com/rocq-prover/rocq/pull/17986))
319 - impacted released versions: V8.20, V9.0, V9.1
320 - impacted coqchk versions: Same
321 - fixed in: V9.2.0 ([#21798](https://github.com/rocq-prover/rocq/pull/21798))
322 - found by: Pierre-Marie Pédrot
323 - exploit / GH issue: [#21797](https://github.com/rocq-prover/rocq/issues/21797)
324 - risk: unknown (no development in CI was affected)
325
326 ### Module system
327
328 #### missing universe constraints in typing "with" clause of a module type
329
330 - component: modules, universes
331 - introduced: ?
332 - impacted released versions: V8.3-V8.3pl2, V8.4-V8.4pl6; unclear for V8.2 and previous versions
333 - impacted development branches: none
334 - impacted coqchk versions: ?
335 - fixed in: master/trunk ([d4869e059](https://github.com/rocq-prover/rocq/commit/d4869e059bfb73d99e1f5ef1b0a1f0906fa27056), 2 Oct 2015, Sozeau), v8.4 ([40350ef3b](https://github.com/rocq-prover/rocq/commit/40350ef3b34b0be9d5ceddde772218c2f2dafe32), 9 Sep 2015, Sozeau)
336 - found by: Dénès
337 - exploit: test-suite/bugs/bug_4294.v
338 - GH issue number: rocq-prover/rocq#4294
339 - risk: ?
340
341 #### universe constraints for module subtyping not stored in vo files
342
343 - component: modules, universes
344 - introduced: presumably 8.2 ([b3d3b56](https://github.com/rocq-prover/rocq/commit/b3d3b566c5b5f34ab518c587f62530abde131be8))
345 - impacted released versions: 8.2, 8.3, 8.4
346 - impacted development branches: v8.5
347 - impacted coqchk versions: none
348 - fixed in: v8.2 ([c1d9889](https://github.com/rocq-prover/rocq/commit/c1d988904483eb1f3a8917ea08fced1240e3844b)), v8.3 (8056d02), v8.4 ([a07deb4](https://github.com/rocq-prover/rocq/commit/a07deb4eac1d5f886159784ef5d8d006892be547)), trunk ([0cd0a3e](https://github.com/rocq-prover/rocq/commit/0cd0a3ecdc7f942da153c59369ca3572bd18dd10)) Mar 5, 2014, Tassi
349 - found by: Tassi by running coqchk on the mathematical components library
350 - exploit: requires multiple files, no test provided
351 - GH issue number: rocq-prover/rocq#3243
352 - risk: could be exploited by mistake
353
354 #### module subtyping disrespected squashing status of inductives
355
356 - component: modules, universes, inductives
357 - introduced: probably 7.4 ([1296520](https://github.com/rocq-prover/rocq/commit/12965209478bd99dfbe57f07d5b525e51b903f22))
358 - impacted released versions: until 8.15.0
359 - impacted coqchk versions: none
360 - fixed in: 8.15.1, 8.16
361 - found by: Pédrot
362 - exploit: see GitHub issue
363 - GH issue number: rocq-prover/rocq#15838
364 - risk: unlikely (caught by coqchk, needs Unset Elimination Schemes in the module type)
365
366 #### Functor inlining drops universe substitution
367
368 - component: Modules
369 - introduced: ?
370 - impacted released versions: ??-V8.8.0
371 - impacted coqchk versions: same? not sure if coqchk has a this bug
372 - fixed in: V8.8.1, V8.9.0 (#7616)
373 - found by: Pierre-Marie Pédrot
374 - GH issue number: rocq-prover/rocq#7615
375 - exploit: see issue
376 - risk: medium
377
378 #### Primitives are incorrectly considered convertible to anything by module subtyping
379
380 - component: modules, primitive types
381 - introduced: 8.11
382 - impacted released versions: V8.11.0-V8.18.0
383 - impacted coqchk versions: same
384 - fixed in: V8.19.0
385 - found by: Gaëtan Gilbert
386 - GH issue number: rocq-prover/rocq#18503
387 - exploit: see issue
388 - risk: high if there is a Primitive in a Module Type, otherwise low
389
390 #### Missing substitution when strengthening functors
391
392 - component: modules
393 - introduced: 8.5 for the kernel (c5b699f), 8.10 for the checker (#8773)
394 - impacted released versions: 8.5-9.0.0
395 - impacted coqchk version: 8.10-9.0.0
396 - fixed in: V9.0.1
397 - found by: Pierre-Marie Pédrot
398 - GH issue number: rocq-prover/rocq#21051
399 - exploit: see issue
400 - risk: could be exploited by mistake when using heavy module machinery
401
402 #### Missing substitution when strengthening aliased functors
403
404 - component: modules
405 - introduced: 8.5 for the kernel (c5b699f), 8.10 for the checker (#8773)
406 - impacted released versions: 8.5-9.1
407 - impacted coqchk version: 8.10-9.1
408 - fixed in: V9.2.0
409 - found by: Tristan Stérin
410 - GH issue number: rocq-prover/rocq#21685
411 - exploit: see issue
412 - risk: could be exploited by mistake when using heavy module machinery
413
414 #### Incorrect subtyping rule for universe polymorphic "with Definition".
415
416 - component: modules
417 - introduced: 8.5
418 - impacted released versions: 8.5-9.1
419 - impacted coqchk version: none
420 - fixed in: V9.2.0
421 - found by: Tristan Stérin
422 - GH issue number: rocq-prover/rocq#21702
423 - exploit: see issue
424 - risk: moderate, requires uncommon features
425
426 #### Subtyping ignored elimination constraints
427
428 - component: modules, sort polymorphism
429 - introduced: V9.2+rc1
430 - impacted released versions: none
431 - impacted coqchk versions: none
432 - fixed in: V9.2.0
433 - found by: Yann Leray
434 - GH issue number: rocq-prover/rocq#21750
435 - exploit: see issue
436 - risk: high when combining module subyping with sort polymorphism
437 (but not possible in non-rc version)
438
439 ### Universes
440
441 #### issue with two parameters in the same universe level
442
443 - component: template polymorphism
444 - introduced: 23 May 2006, [9c2d70b](https://github.com/rocq-prover/rocq/commit/9c2d70b91341552e964979ba09d5823cc023a31c), r8845, Herbelin
445 - impacted released versions: V8.1-V8.1pl4, V8.2-V8.2pl2, V8.3-V8.3pl2
446 - impacted development branches: none
447 - impacted coqchk versions: ?
448 - fixed in: trunk/master/v8.4 ([8082d1faf](https://github.com/rocq-prover/rocq/commit/8082d1faf85a0ab29f6c144a137791902a4e9c1f), 5 Oct 2011, Herbelin), V8.3pl3 ([bb582bca2](https://github.com/rocq-prover/rocq/commit/bb582bca2ca3fd94df01aad8d8070f8d129b25b3), 5 Oct 2011, Herbelin), v8.2 branch ([3333e8d3](https://github.com/rocq-prover/rocq/commit/3333e8d3387b3bc4d3ceb75aad853f8e455af444), 5 Oct 2011, Herbelin), v8.1 branch ([a8fc2027](https://github.com/rocq-prover/rocq/commit/a8fc2027258e1fb2defd05344e1249374f6e4e19), 5 Oct 2011, Herbelin),
449 - found by: Barras
450 - exploit: test-suite/failure/inductive.v
451 - GH issue number: none
452 - risk: unlikely to be activated by chance
453
454 #### universe polymorphism can capture global universes
455
456 - component: universe polymorphism
457 - impacted released versions: V8.5 to V8.8
458 - impacted coqchk versions: V8.5 to V8.9
459 - fixed in: [ec4aa4971f](https://github.com/rocq-prover/rocq/commit/ec4aa4971f7789eeccec2f38f2bb7ec976f87ede) ([58e1d0f200](https://github.com/rocq-prover/rocq/commit/58e1d0f2006f3243cbf7b57a9858f5119ffea666) for the checker)
460 - found by: Gaëtan Gilbert
461 - exploit: test-suite/misc/poly-capture-global-univs
462 - GH issue number: rocq-prover/rocq#8341
463 - risk: unlikely to be activated by chance (requires a plugin)
464
465 #### template polymorphism not collecting side constraints on the universe level of a parameter
466
467 this is a general form of the previous issue about template
468 polymorphism exploiting other ways to generate untracked constraints
469
470 - component: template polymorphism
471 - introduced: morally at the introduction of template polymorphism, 23
472 - May 2006, [9c2d70b](https://github.com/rocq-prover/rocq/commit/9c2d70b91341552e964979ba09d5823cc023a31c), r8845, Herbelin
473 - impacted released versions: at least V8.4-V8.4pl6, V8.5-V8.5pl3,
474 V8.6-V8.6pl2, V8.7.0-V8.7.1, V8.8.0-V8.8.1, V8.9.0-V8.9.1, in theory
475 also V8.1-V8.1pl4, V8.2-V8.2pl2, V8.3-V8.3pl2 but not exploit found
476 there yet (an exploit using a plugin to force sharing of universe
477 level is in principle possible though)
478 - impacted development branches: all from 8.4 to 8.9 at the time of writing and suspectingly also all from 8.1 to 8.4 if a way to create untracked constraints can be found
479 - impacted coqchk versions: a priori all (tested with V8.4 and V8.9 which accept the exploit)
480 - fixed in: V8.10.0 ([eb3f8225a2](https://github.com/rocq-prover/rocq/commit/eb3f8225a286aef3a57ad876584b4a927241ff69), PR rocq-prover/rocq#9918, Aug 2019, Dénès and Sozeau)
481 - found by: Gilbert using explicit sharing of universes, exploit found for 8.5-8.9 by Pédrot, other variants generating sharing using sections, or using ltac tricks by Sozeau, exploit in 8.4 by Herbelin and Jason Gross by adding new tricks to Sozeau's variants
482 - exploit: test-suite/failure/Template.v
483 - GH issue number: rocq-prover/rocq#9294
484 - risk: moderate risk to be activated by chance
485
486 #### more template polymorphism missing constraints
487
488 using the same universe in the parameters and the constructor
489 arguments of a template polymorphic inductive (using named universes
490 in modern Coq, or unification tricks in older Coq) produces implicit
491 equality constraints not caught by the previous template polymorphism
492 fix.
493
494 - component: template polymorphism
495 - introduced: same as the previous template polymorphism bug, morally
496 from V8.1, first verified impacted version V8.5 (the universe
497 unification is sufficiently different in V8.4 to prevent our trick
498 from working)
499 - fixed in: expected in 8.10.2, 8.11+beta, master (#11128, Nov 2019, Gilbert)
500 - found by: Gilbert
501 - exploit: test-suite/bugs/bug_11039.v
502 - GH issue number: rocq-prover/rocq#11039
503 - risk: moderate risk (found by investigating rocq-prover/rocq#10504)
504
505 #### universe constraints erroneously discarded when forcing an asynchronous proof containing delayed monomorphic constraints inside a universe polymorphic section
506
507 - component: universe polymorphism, asynchronous proofs
508 - introduced: between 8.4 and 8.5 by merging the asynchronous proofs feature branch and universe polymorphism one
509 - impacted released versions: V8.5-V8.10
510 - impacted development branches: none
511 - impacted coqchk versions: immune
512 - fixed in: rocq-prover/rocq#10664
513 - found by: Pédrot
514 - exploit: no test
515 - GH issue number: none
516 - risk: unlikely to be triggered in interactive mode, not present in batch mode (i.e. coqc)
517
518 #### Set+2 incorrectly simplified to Set+1
519
520 - component: algebraic universes
521 - introduced: V8.10 (with the SProp commit [7550876976](https://github.com/rocq-prover/rocq/commit/75508769762372043387c67a9abe94e8f940e80a))
522 - impacted released versions: V8.10.0 V8.10.1 V8.10.2
523 - impacted coqchk versions: same
524 - fixed in: rocq-prover/rocq#11422
525 - found by: Gilbert
526 - exploit: see PR (custom application of Hurkens to get around the refreshing at elaboration)
527 - GH issue number: see PR
528 - risk: unlikely to be triggered through the vernacular (the system "refreshes" algebraic
529 universes such that +2 increments do not appear), mild risk from plugins which manipulate
530 algebraic universes.
531
532 #### variance inference for section universes ignored use of section universes in inductives and axioms defined before the inductive being inferred
533
534 - component: cumulative inductives and sections
535 - introduced: V8.12 ([73c3b87463](https://github.com/rocq-prover/rocq/commit/73c3b874633d6f6f8af831d4a37d0c1ae52575bc))
536 - impacted released versions: V8.12 to V8.15 including patch releases
537 - impacted coqchk versions: none
538 - fixed in: V8.16 rocq-prover/rocq#15950 ([118ffbc010](https://github.com/rocq-prover/rocq/commit/118ffbc010ce53ebd45baa42edd28335301ca9a5))
539 - found by: Gilbert and Pédrot
540 - exploit: see rocq-prover/rocq#15916
541 - risk: could be used inadvertently in developments with complex universe usage, only when using cumulative inductives declared in sections. coqchk still works.
542
543 #### Missing substitution for relevance of product domain in lazy
544
545 - component: lazy reduction, sort polymorphism
546 - introduced: V8.19 (with sort polymorphism, [1e7473812cec](https://github.com/rocq-prover/rocq/commit/1e7473812cec6e735394ca5f5fbefb9c78600893))
547 - impacted released versions: V8.19 to V9.1 including patch releases
548 - impacted coqchk versions: same
549 - fixed in: V9.2 [rocq-prover/rocq#21697](https://github.com/rocq-prover/rocq/pull/21697)
550 - found by: Tristan Stérin, Gaëtan Gilbert
551 - exploit: not fully worked out, see bug_21691.v for example error
552 - risk: low (needs sort polymorphism and to exploit the incorrect
553 substitution from a reduction done by the kernel instead of in the
554 higher layers)
555
556 #### Missing stack conversion for irrelevant-to-relevant match
557
558 - component: conversion, SProp
559 - introduced: V8.16 ([57081c1ae01a](https://github.com/rocq-prover/rocq/commit/57081c1ae01a742033dec44a2a42bffa08a9f5af))
560 (V8.13 with the introduction of Definitional UIP for the Definitional UIP variant)
561 - impacted released versions: V8.16 to V9.1 including patch releases (V8.13 to V9.1 for Definitional UIP variant)
562 - impacted coqchk versions: same
563 - fixed in: V9.2 [rocq-prover/rocq#21696](https://github.com/rocq-prover/rocq/pull/21696)
564 - found by: Tristan Stérin, Gaëtan Gilbert
565 - exploit: see bug_21690.v
566 - risk: without Definitional UIP, believed to only contradict axioms incompatible with equality reflection (i.e. no axiom-free proof of False).
567 With Definitional UIP, could be used inadvertently.
568
569 #### Incorrect discharge of sort polymorphic inductive squashing with section polymorphic sort
570
571 - component: sections, sort polymorphism
572 - introduced: V9.1 ([0706a177b5cb](https://github.com/rocq-prover/rocq/commit/0706a177b5cb4c829108ec8953d6087161ddb8b4))
573 - impacted released versions: V9.1 including patch releases
574 - impacted coqchk versions: none
575 - fixed in: V9.2 [rocq-prover/rocq#21699](https://github.com/rocq-prover/rocq/pull/21699)
576 - found by: Tristan Stérin, Gaëtan Gilbert
577 - exploit: bug_21694.v
578 - risk: needs a sort polymorphic inductive declared in a section with
579 a section polymorphic sort and sort polymorphism in the inductive command (cf bug file)
580
581 #### Missing universe substitution in primitive array instance in lazy
582
583 - component: lazy, primitive arrays
584 - introduced: V8.17 ([2db83c8a7e5b](https://github.com/rocq-prover/rocq/commit/2db83c8a7e5b823d2c8d25ef07dac40b38408d3c))
585 - impacted released versions: V8.17 to V9.1 including patch releases
586 - impacted coqchk versions: same
587 - fixed in: V9.2 [rocq-prover/rocq#21698](https://github.com/rocq-prover/rocq/pull/21698)
588 - found by: Tristan Stérin, Gaëtan Gilbert
589 - exploit: not fully worked out, see bug_21692.v for example error
590 - risk: low, the instance on primitive array literals is irrelevant for conversion
591
592 #### Double universe substitution in letins from indices in match return clause
593
594 - component: conversion
595 - introduced: V8.14 ([d72e5c154f](https://github.com/rocq-prover/rocq/commit/d72e5c154faeea1d55387bc8c039d97f63ebd1c4))
596 - impacted released versions: V8.14 to V9.1 including patch releases
597 - impacted coqchk versions: same
598 - fixed in: V9.2 [rocq-prover/rocq#21688](https://github.com/rocq-prover/pull/21688)
599 - found by: Gaëtan Gilbert
600 - exploit: no full exploit known, anomaly in bug_21689.v
601 - risk: low (needs to use universe substitution in letin from the
602 inductive indices to incorrectly convert match return clauses and
603 somehow derive inconsistency from there)
604
605 ### Primitive projections
606
607 #### check of guardedness of extra arguments of primitive projections missing
608
609 - component: primitive projections, guard condition
610 - introduced: 6 May 2014, [a4043608f](https://github.com/rocq-prover/rocq/commit/a4043608f704f026de7eb5167a109ca48e00c221), Sozeau
611 - impacted released versions: V8.5-V8.5pl2,
612 - impacted development branches: none
613 - impacted coqchk versions: ?
614 - fixed in: trunk/master/v8.5 ([ba00867d5](https://github.com/rocq-prover/rocq/commit/ba00867d515624aee734d998bfbe3880f559d907), 25 Jul 2016, Sozeau)
615 - found by: Sozeau, by analyzing bug report rocq-prover/rocq#4876
616 - exploit: to be done (?)
617 - GH issue number: rocq-prover/rocq#4876
618 - risk: consequence of bug found by chance, unlikely to be exploited by chance (MS?)
619
620 #### records based on primitive projections became possibly recursive without the guard condition being updated
621
622 - component: primitive projections, guard condition
623 - introduced: 10 Sep 2014, [6624459e4](https://github.com/rocq-prover/rocq/commit/6624459e492164b3d189e3518864379ff985bf8c), Sozeau (?)
624 - impacted released versions: V8.5
625 - impacted development branches: none
626 - impacted coqchk versions: ?
627 - fixed in: trunk/master/v8.5 ([120053a50](https://github.com/rocq-prover/rocq/commit/120053a50f87bd53398eedc887fa5e979f56f112), 4 Mar 2016, Dénès)
628 - found by: Dénès exploiting bug rocq-prover/rocq#4588
629 - exploit: test-suite/bugs/bug_4588.v
630 - GH issue number: rocq-prover/rocq#4588
631 - risk: ?
632
633 #### incorrect checking of subtyping with algebraic universes
634
635 - component: modules and universes
636 - introduced: a long time ago
637 - impacted released versions: ??-V8.8.0
638 - impacted coqchk versions: same
639 - fixed in: V8.8.1, V8.9.0 (#7798)
640 - found by: Gaëtan Gilbert
641 - GH issue number: rocq-prover/rocq#7695
642 - exploit: see issue
643 - risk: needs usage of explicit algebraic universe annotations, coqchk
644 may catch through defunctorialization
645
646 ### Conversion machines
647
648 #### the invariant justifying some optimization was wrong for some combination of sharing side effects
649
650 - component: "lazy machine" (lazy krivine abstract machine)
651 - introduced: prior to V7.0
652 - impacted released versions: V8.0-V8.0pl4, V8.1-V8.1pl3
653 - impacted development branches: none
654 - impacted coqchk versions: ([eefe63d52](https://github.com/rocq-prover/rocq/commit/eefe63d523b1b4c1b855e0f18e2574f98ff4ae64), Barras, 20 May 2008), was in beta-development for 8.2 at this time
655 - fixed in: master/trunk/8.2 ([f13aaec57](https://github.com/rocq-prover/rocq/commit/f13aaec57df12380323edf450aec14c372422d58) / [a8b034513](https://github.com/rocq-prover/rocq/commit/a8b034513e0c03ceb7e154949b15f62ac6862f3b), 15 May 2008, Barras), v8.1 ([e7611477a](https://github.com/rocq-prover/rocq/commit/e7611477a0a0d1b7e8c233330def46a066985cdc), 15 May 2008, Barras), v8.0 ([6ed40a8bc](https://github.com/rocq-prover/rocq/commit/6ed40a8bc000b0419f3f4731bf83d05ab5062e76), 29 Nov 2016, Herbelin, backport)
656 - found by: Gonthier
657 - exploit: by Gonthier
658 - GH issue number: none
659 - risk: unrealistic to be exploited by chance
660
661 #### collision between constructors when more than 256 constructors in a type
662
663 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
664 - introduced: V8.1
665 - impacted released versions: V8.1-V8.5pl3, V8.2-V8.2pl2, V8.3-V8.3pl3, V8.4-V8.4pl5
666 - impacted development branches: none
667 - impacted coqchk versions: none (no virtual machine in coqchk)
668 - fixed in: master/trunk/v8.5 ([00894adf6](https://github.com/rocq-prover/rocq/commit/00894adf6fc11f4336a3ece0c347676bbf0b4c11) / [596a4a525](https://github.com/rocq-prover/rocq/commit/596a4a5251cc50f50bd6d25e36c81341bf65cfed), 26-39 Mar 2015, Grégoire), v8.4 ([cd2101a39](https://github.com/rocq-prover/rocq/commit/cd2101a39b3b8d58ce569761c905a5baf1dcdc86), 1 Apr 2015, Grégoire), v8.3 ([a0c7fc05b](https://github.com/rocq-prover/rocq/commit/a0c7fc05b302e38a2869c20f6db1dc376cdb59da), 1 Apr 2015, Grégoire), v8.2 ([2c6189f61](https://github.com/rocq-prover/rocq/commit/2c6189f61b85bbe1a2a56754c9effc2d7a72f16d), 1 Apr 2015, Grégoire), v8.1 ([bb877e5b5](https://github.com/rocq-prover/rocq/commit/bb877e5b54678bc34e4362fcf0315224e7c4f4cc), 29 Nov 2015, Herbelin, backport)
669 - found by: Dénès, Pédrot
670 - exploit: test-suite/bugs/bug_4157.v
671 - GH issue number: rocq-prover/rocq#4157
672 - risk:
673
674 #### wrong universe constraints
675
676 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
677 - introduced: possibly exploitable from V8.1; exploitable at least from V8.5
678 - impacted released versions: V8.1-V8.4pl5 unknown, V8.5-V8.5pl3, V8.6-V8.6.1, V8.7.0-V8.7.1
679 - impacted development branches: unknown for v8.1-v8.4, none from v8.5
680 - impacted coqchk versions: none (no virtual machine in coqchk)
681 - fixed in: master ([c9f3a6cbe](https://github.com/rocq-prover/rocq/commit/c9f3a6cbe5c410256fe88580019f5c7183bab097), 12 Feb 2018, rocq-prover/rocq#6713, Dénès), v8.7 ([c058a4182](https://github.com/rocq-prover/rocq/commit/c058a4182b39460ba2b256c479a1389216c25ca9), 15 Feb 2018, Zimmermann, backport), v8.6 ([a2cc54c64](https://github.com/rocq-prover/rocq/commit/a2cc54c649c0b13190268cc5d490342d5f0cec10), 21 Feb 2018, Herbelin, backport), v8.5 ([d4d550d0f](https://github.com/rocq-prover/rocq/commit/d4d550d0f1ae5f4a8d29bbcdf991a2526ab555a6), 21 Feb 2018, Herbelin, backport)
682 - found by: Dénès
683 - exploit: test-suite/bugs/bug_6677.v
684 - GH issue number: rocq-prover/rocq#6677
685 - risk:
686
687 #### missing pops in executing 31bit arithmetic
688
689 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
690 - introduced: V8.5
691 - impacted released versions: V8.1-V8.4pl5
692 - impacted development branches: v8.1 (probably)
693 - impacted coqchk versions: none (no virtual machine in coqchk)
694 - fixed in: master/trunk/v8.5 ([a5e04d9dd](https://github.com/rocq-prover/rocq/commit/a5e04d9dd178b2870b79776e1fbf1a858cdac49d), 6 Sep 2015, Dénès), v8.4 ([d5aa3bf6](https://github.com/rocq-prover/rocq/commit/d5aa3bf6fc7382e31b6f1bac58b644843d783f13), 9 Sep 2015, Dénès), v8.3 ([5da5d751](https://github.com/rocq-prover/rocq/commit/5da5d751c92df23ff3f42a04061960b287a4d3ea), 9 Sep 2015, Dénès), v8.2 ([369e82d2](https://github.com/rocq-prover/rocq/commit/369e82d2cdcd0d66d0c474dc1d062a4fc62aa24a), 9 Sep 2015, Dénès),
695 - found by: Catalin Hritcu
696 - exploit: lost?
697 - GH issue number: ?
698 - risk:
699
700 #### primitive integer emulation layer on 32 bits not robust to garbage collection
701
702 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
703 - introduced: master (before v8.10 in GH pull request rocq-prover/rocq#6914)
704 - impacted released versions: none
705 - impacted development branches: v8.10
706 - impacted coqchk versions: none (no virtual machine in coqchk)
707 - fixed in: [5914313](https://github.com/rocq-prover/rocq/commit/591431312465291e85fb352a69e947eedeb2e199) (v8.10)
708 - found by: Roux, Melquiond
709 - exploit:
710 - GH issue number: rocq-prover/rocq#9925
711 - risk:
712
713 #### broken long multiplication primitive integer emulation layer on 32 bits
714
715 - component: all 3 kernel conversion machines (lazy, VM, native)
716 - introduced: [e43b176](https://github.com/rocq-prover/rocq/commit/e43b1768d0f8399f426b92f4dfe31955daceb1a4)
717 - impacted released versions: 8.10.0, 8.10.1, 8.10.2
718 - impacted development branches: 8.11
719 - impacted coqchk versions: none (no virtual machine in coqchk)
720 - fixed in: [4e176a7](https://github.com/rocq-prover/rocq/commit/4e176a7ee4660d505321ca55c5ce70a6c3d50d3b)
721 - found by: Soegtrop, Melquiond
722 - exploit: test-suite/bugs/bug_11321.v
723 - GH issue number: rocq-prover/rocq#11321
724 - risk: critical, as any BigN computation on 32-bit architectures is wrong
725
726 #### broken addmuldiv operation for large shifts
727
728 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
729 - impacted released versions: 8.10 to 8.19
730 - impacted development branches: 8.20
731 - impacted coqchk versions: none (no virtual machine in coqchk)
732 - fixed in: [bc0adb4](https://github.com/rocq-prover/rocq/commit/bc0adb41a7c311f8d8305839c19e4812ff602720)
733 - found by: Martin Karup Jensen
734 - GH issue number: rocq-prover/rocq#19402
735 - risk: could be exploited by chance (though not in BigNums)
736
737 #### translation of identifier from Coq to OCaml was not bijective, leading to identify True and False
738
739 For instance `α` and `__U03b1_` were the same in the native compiler.
740
741 - component: "native" conversion machine (translation to OCaml which compiles to native code)
742 - introduced: V8.5
743 - impacted released versions: V8.5-V8.5pl1
744 - impacted development branches: none
745 - impacted coqchk versions: none (no native computation in coqchk)
746 - fixed in: master/trunk/v8.6 ([244d7a9aa](https://github.com/rocq-prover/rocq/commit/244d7a9aafe7ad613dd2095ca3126560cb3ea1d0), 19 May 2016, letouzey), v8.5 ([088b3161c](https://github.com/rocq-prover/rocq/commit/088b3161c93e46ec2d865fe71a206cee15acd30c), 19 May 2016, letouzey),
747 - found by: Letouzey, Dénès
748 - exploit: see commit message for [244d7a9aa](https://github.com/rocq-prover/rocq/commit/244d7a9aafe7ad613dd2095ca3126560cb3ea1d0)
749 - GH issue number: ?
750 - risk:
751
752 #### stuck primitive projections computed incorrectly by native_compute
753
754 - component: primitive projections, native_compute
755 - introduced: 1 Jun 2018, [e1e7888a](https://github.com/rocq-prover/rocq/commit/e1e7888ac4519f4b7470cc8469f9fd924514e352), ppedrot
756 - impacted released versions: 8.9.0
757 - impacted coqchk versions: none
758 - fixed in: 8.9.1 rocq-prover/rocq#9900
759 - found by: maximedenes exploiting bug rocq-prover/rocq#9684
760 - exploit: test-suite/bugs/bug_9684.v
761 - GH issue number: rocq-prover/rocq#9684
762
763 #### incorrect De Bruijn handling when inferring the relevance mark for a lambda
764
765 - component: lazy machine
766 - introduced: 2019-03-15, [23f84f37c6](https://github.com/rocq-prover/rocq/commit/23f84f37c674a07e925925b7e0d50d7ee8414093) and [71b9ad8526](https://github.com/rocq-prover/rocq/commit/71b9ad8526155020c8451dd326a52e391a9a8585), SkySkimmer
767 - impacted released versions: 8.10.0
768 - impacted coqchk versions: 8.10.0
769 - fixed in: 8.10.1 rocq-prover/rocq#10904
770 - found by: ppedrot investigating unexpected conversion failures with SProp
771 - exploit: test-suite/bugs/bug_10904.v
772 - GH issue number: rocq-prover/rocq#10904
773 - risk: none without using -allow-sprop (off by default in 8.10.0),
774 otherwise could be exploited by mistake
775
776 #### buffer overflow on large accumulators
777
778 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
779 - introduced: 8.1
780 - impacted released versions: 8.1-8.12.1
781 - impacted coqchk versions: none (no virtual machine in coqchk)
782 - fixed in: 8.13.0 (#13431)
783 - found by: Dolan, Roux, Melquiond
784 - GH issue number: ocaml/ocaml#6385, rocq-prover/rocq#11170
785 - risk: medium, as it can happen for large irreducible applications
786
787 #### buffer overflow, arbitrary code execution on floating-point operations
788
789 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
790 - introduced: 8.13
791 - impacted released versions: 8.13.0
792 - impacted coqchk versions: none (no virtual machine in coqchk)
793 - fixed in: 8.13.1
794 - found by: Melquiond
795 - GH issue number: rocq-prover/rocq#13867
796 - risk: none, unless using floating-point operations; high otherwise;
797 noticeable if activated by chance, since it usually breaks
798 control-flow integrity
799
800 #### arbitrary code execution on irreducible PArray.set
801
802 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
803 - introduced: 8.13
804 - impacted released versions: 8.13.0, 8.13.1
805 - impacted coqchk versions: none (no virtual machine in coqchk)
806 - fixed in: 8.13.2
807 - found by: Melquiond
808 - GH issue number: rocq-prover/rocq#13998
809 - risk: none, unless using primitive array operations; systematic otherwise
810
811 #### arbitrary code execution on arrays of floating point numbers
812
813 - component: "virtual" and "native" conversion machines
814 - introduced: 8.13
815 - impacted released versions: 8.13.0, 8.13.1, 8.14.0
816 - impacted coqchk versions: none (no VM / native computation in coqchk)
817 - fixed in: 8.14.1
818 - found by: Melquiond
819 - GH issue number: rocq-prover/rocq#15070
820 - risk: none, unless mixing open terms and primitive floats inside primitive
821 - arrays; critical otherwise
822
823 #### conversion of Prod / Prod values was comparing the wrong components
824
825 - component: "native" conversion machine (translation to OCaml which compiles to native code)
826 - introduced: V8.5
827 - impacted released versions: V8.5-V8.16.0 (when built with native computation enabled)
828 - impacted coqchk versions: none (no native computation in coqchk)
829 - fixed in: 8.16.1
830 - found by: Melquiond
831 - GH issue number: rocq-prover/rocq#16645
832 - risk: systematic
833
834 #### η-expansion of cofixpoints was performed in the wrong environment
835
836 - component: "virtual" and "native" conversion machines
837 - introduced: V8.9
838 - impacted released versions: V8.9-V8.16.0
839 - impacted coqchk versions: none (no VM / native computation in coqchk)
840 - fixed in: 8.16.1
841 - found by: Gaëtan Gilbert and Pierre-Marie Pédrot
842 - GH issue number: rocq-prover/rocq#16831
843 - risk: low, as it requires carefully crafted cofixpoints
844
845 #### conversion would compare the mutated version of primitive arrays instead of undoing mutation where needed
846
847 - component: all 3 kernel conversion machines (lazy, VM, native), primitive arrays
848 - introduced: V8.13
849 - impacted released versions: V8.13 to V8.16.0
850 - impacted coqchk versions: same
851 - fixed in: V8.16.1, V8.17
852 - found by: Maxime Buyse and Andres Erbsen
853 - exploit: Andres Erbsen
854 - GH issue number: rocq-prover/rocq#16829
855 - risk: some if using primitive arrays
856
857 #### tactic code could mutate a global cache of values for section variables
858
859 - component: "virtual" reduction machine
860 - introduced: V8.1
861 - impacted released versions: V8.1-V8.16.1
862 - impacted coqchk versions: none (no tactics in coqchk, VM only sees checked terms)
863 - fixed in: V8.17.0
864 - found by: Gaëtan Gilbert with hint from Pierre-Marie Pédrot
865 - GH issue number: rocq-prover/rocq#16957
866 - risk: the full exploitation seems to require "Definition := ltac:()"
867 with change_no_check on a section variable in the ltac
868
869 #### incorrect handling of universe polymorphism
870
871 - component: VM machine
872 - introduced: V8.5
873 - impacted released versions: V8.5-V8.8.0
874 - impacted coqchk versions: none (no VM in coqchk)
875 - fixed in: V8.8.1, V8.9.0
876 - found by: Jason Gross
877 - GH issue number: rocq-prover/rocq#7723
878 - exploit: see issue
879 - risk: ??
880
881 #### Forgotten universe substitution with Register Inline on universe polymorphic definition
882
883 - component: VM and native
884 - introduced: V8.5
885 - impacted released versions: V8.5-V9.1 (all patch versions)
886 - impacted coqchk versions: same (only when using -bytecode-compiler yes)
887 - fixed in: V9.2.0
888 - found by: Gaëtan Gilbert
889 - GH issue number: rocq-prover/rocq#21736
890 - exploit: see issue
891 - risk: requires Register Inline on universe polymorphic constant
892 - additional note: does not seem to be exploitable before 8.8 (until 8.6 Register
893 Inline fails with anomaly on universe polymorphic constants, and before
894 8.8 Register Inline only affects native which fails in ocamlopt)
895
896 ### Side-effects
897
898 #### polymorphic side-effects inside monomorphic definitions incorrectly handled as not inlined
899
900 - component: side-effects
901 - introduced: ?
902 - impacted released versions: at least from 8.6 to 8.12.0
903 - impacted coqchk versions: none (no side-effects in the checker)
904 - fixed in: V8.12.1 (rocq-prover/rocq#13331)
905 - found by: ppedrot
906 - exploit: test-suite/bugs/bug_13330.v
907 - GH issue number: rocq-prover/rocq#13330
908 - risk: unlikely to be exploited by mistake, requires the use of unsafe tactics
909
910 #### Section variables used in side effects not checked by Proof using
911
912 - component: side-effects / sections
913 - introduced: 8.11
914 - impacted released versions: from 8.11.0 to 8.20.0
915 - impacted coqchk versions: none (no side-effects in the checker)
916 - fixed in: V9.0 (rocq-prover/rocq#19476)
917 - found by: Pierre Courtieu
918 - exploit: test-suite/output/bug_19861.v
919 - GH issue number: rocq-prover/rocq#19861
920 - risk: requires incorrect `Proof using` and no use of coqchk
921
922 ### Forgetting unsafe flags
923
924 #### unsafe typing flags used inside a section would not be reported by Print Assumptions after closing the section
925
926 - component: sections
927 - introduced: [abab878b8d](https://github.com/rocq-prover/rocq/commit/abab878b8d8b5ca85a4da688abed68518f0b17bd) (#10291, 8.11), technically available earlier through plugins
928 - impacted coqchk versions: none (coqchk rejects affected files)
929 - fixed in: 8.14 rocq-prover/rocq#14395
930 - found by: Anton Trunov
931 - GH issue number: rocq-prover/rocq#14317
932 - risk: low as it needs the use of explicit unsafe flags
933
934 ### Conflicts with axioms in library
935
936 #### axiom of description and decidability of equality on real numbers in library Reals was inconsistent with impredicative Set
937
938 - component: library of real numbers
939 - introduced: [67c75fa01](https://github.com/rocq-prover/rocq/commit/67c75fa01adbbe1d4e39eff2b930ad168510072c), 20 Jun 2002
940 - impacted released versions: 7.3.1, 7.4
941 - impacted coqchk versions:
942 - fixed by deciding to drop impredicativity of Set: [bac707973](https://github.com/rocq-prover/rocq/commit/bac707973955ef64eadae24ea01e029a5394626e), 28 Oct 2004
943 - found by: Herbelin & Werner
944 - exploit: need to find the example again
945 - GH issue number: no
946 - risk: unlikely to be exploited by chance
947
948 #### guard condition was unknown to be inconsistent with propositional extensionality in library Sets
949
950 - component: library of extensional sets, guard condition
951 - introduced: not a bug per se but an incompatibility discovered late
952 - impacted released versions: technically speaking from V6.1 with the introduction of the Sets library which was then inconsistent from the very beginning without we knew it
953 - impacted coqchk versions: ?
954 - fixed by constraining the guard condition: ([9b272a8](https://github.com/rocq-prover/rocq/commit/9b272a861bc3263c69b699cd2ac40ab2606543fa), [ccd7546c](https://github.com/rocq-prover/rocq/commit/ccd7546cd32c8a7901a4234f86aa23b4a7e1a043) 28 Oct 2014, Barras, Dénès)
955 - found by: Schepler, Dénès, Azevedo de Amorim
956 - exploit: ?
957 - GH issue number: none
958 - risk: unlikely to be exploited by chance (?)
959
960 #### incompatibility axiom of choice and excluded-middle with elimination of large singletons to Set
961
962 - component: library for axiom of choice and excluded-middle
963 - introduced: not a bug but a change of intended "model"
964 - impacted released versions: strictly before 8.1
965 - impacted coqchk versions: ?
966 - fixed by constraining singleton elimination: [b19397ed8](https://github.com/rocq-prover/rocq/commit/b19397ed88ef8aa1ea1ca228b5d23b94e15f419f), r9633, 9 Feb 2007, Herbelin
967 - found by: Benjamin Werner
968 - exploit:
969 - GH issue number: none
970 - risk:
971
972 #### Incorrect specification of PrimFloat.leb
973
974 - component: primitive floating-points
975 - introduced: 8.11
976 - impacted released versions: 8.11.0, 8.11.1, 8.11.2
977 - fixed by fixing the spec: rocq-prover/rocq#12484
978 - found by: Pierre Roux
979 - exploit: test-suite/bugs/bug_12483.v
980 - GH issue number: rocq-prover/rocq#12483
981 - risk: proof of false when using the incorrect axiom
982
983 #### Incorrect implementation of SFclassify.
984
985 - component: floating-point library
986 - introduced: 8.11
987 - impacted released versions: 8.11.0-8.15.1
988 - fixed by fixing the implementation: rocq-prover/rocq#16101
989 - found by: François Bobot
990 - exploit: test-suite/bugs/bug_16096.v
991 - GH_issue_number: rocq-prover/rocq#16096
992 - risk: proof of false when using the axioms in Floats.Axioms.
993
994 #### nativenorm reading back closures as arbitrary floating-point values
995
996 - component: primitive floating-points + "native" conversion machine (translation to OCaml which compiles to native code)
997 - introduced: 8.11
998 - impacted released versions: 8.11.0-8.17.1
999 - impacted coqchk versions: none (no native computation in coqchk)
1000 - fixed in: 8.18.0
1001 - found by: Jason Gross
1002 - GH issue number: rocq-prover/rocq#17871
1003 - risk: proof of false when using primitive floats and native_compute
1004
1005 #### guard condition issue made it inconsistent with propositional extensionality in library Sets
1006
1007 - component: library of extensional sets, guard condition
1008 - introduced: variant of [the issue with propositional extensionality](#guard-condition-was-unknown-to-be-inconsistent-with-propositional-extensionality-in-library-Sets) that was not fixed then
1009 - impacted released versions: the relative inconsistency was present from the very beginning, until 9.0
1010 - impacted coqchk versions: *-9.0
1011 - fixed in: 9.0.1
1012 - fixed by further constraining the guard condition: [PR 21050](https://github.com/rocq-prover/rocq/pull/21050)
1013 - found by: Thomas Lamiaux, Yann Leray, Pierre-Marie Pédrot, Nicolas Tabareau
1014 - GH issue number: [21053](https://github.com/rocq-prover/issues/21053)
1015 - risk: unlikely to be exploited by chance (?)
1016
1017 ### Deserialization
1018
1019 #### deserialization of .vo data not properly checked
1020
1021 - component: coqchk (coqc trusts that .vo files are well formed)
1022 - introduced: 8.16 (univ levels), 8.10 (retroknowledge)
1023 - impacted released versions: 8.10-8.18.1
1024 - impacted coqchk versions: same
1025 - fixed in: 8.19
1026 - found by: Mario Carneiro
1027 - GH issue number: N/A (fix pull requests: rocq-prover/rocq#18403, rocq-prover/rocq#18406)
1028 - risk: can lead to segfaults or arbitrary code execution on crafted .vo files
1029 (files produced by coqc are fine)
1030
1031 There were otherwise several bugs in beta-releases, from memory, bugs with beta versions of primitive projections or template polymorphism or native compilation or guard (e7fc96366, 2a4d714a1).
1032
1033 ## Probably non exploitable fixed bugs
1034
1035 There were otherwise maybe unexploitable kernel bugs, e.g. 2df88d83
1036 (Require overloading), 0adf0838 ("Univs: uncovered bug in
1037 strengthening of opaque polymorphic definitions."), 5122a398 (#3746
1038 about functors), rocq-prover/rocq#4346 (casts in VM), a14bef4 (guard condition in
1039 8.1), 6ed40a8 ("Georges' bug" with ill-typed lazy machine), and
1040 various other bugs in 8.0 or 8.1 without knowing if they are critical.
1041
1042 #### bug in 31bit arithmetic
1043
1044 - component: "virtual machine" (compilation to bytecode ran by a C-interpreter)
1045 - introduced: V8.1
1046 - impacted released versions: none
1047 - impacted development branches:
1048 - impacted coqchk versions: none (no virtual machine in coqchk)
1049 - fixed in: master/trunk/v8.5 (0f8d1b92c, 6 Sep 2015, Dénès)
1050 - found by: Dénès, from a bug report by Tahina Ramananandro
1051 - exploit: non exploitable?
1052 - GH issue number: ?
1053 - risk: