Commit aa9414b
committed
fix: reject value substitution on non-sorry'd definitions
Compare.loop's dependency walk accepts any constant whose type matches
between challenge and solution, even when the value (body) differs. A
submitter can exploit this by redefining a non-sorry'd definition to
make a false challenge statement true in the solution.
Guard the type-only fallback with hasSorryAxValue: only fire when the
challenge-side value references sorryAx. Non-sorry definitions with
mismatched values are now rejected.
Reproducer: https://github.com/savarin/comparator-proof-bypass1 parent 8d84e67 commit aa9414b
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
55 | | - | |
56 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
58 | 70 | | |
59 | 71 | | |
| |||
0 commit comments