Commit 4373838
authored
fix: polynomials module audit response (#22361)
## Summary
Addresses findings from the polynomials/ module security audit
(AztecProtocol/barretenberg-claude#2383).
- **F1** (Low): Harden file-backed polynomial memory: restrict temp file
permissions to `0600`, add `O_EXCL` to prevent race conditions, use
`MAP_PRIVATE` instead of `MAP_SHARED`
- **F4** (Info): Guard `compute_linear_polynomial_product` against `n=0`
to prevent underflow
- **F5** (Info): Clarify `UnivariateCoefficientBasis` docstring to
distinguish Karatsuba precomputation from polynomial coefficients
**Already fixed upstream:**
- **F2** (Low): `factor_roots` empty polynomial guard (in #22282)
- **F3** (Info): `get_scratch_space` thread safety via mutex (in #22306)1 parent 783d14f commit 4373838
File tree
3 files changed
+12
-6
lines changed- barretenberg/cpp/src/barretenberg/polynomials
3 files changed
+12
-6
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
0 commit comments