Commit f3394ca
committed
fix: harden off-chain ABI decoding against malicious receiver metadata (Report #71024)
- Revert on-chain receiver_registry changes to keep fix entirely off-chain
- Convert decodeParam panics to errors with checked type assertions
- Add explicit TypeParameter rejection in ABI parameter decoding
- Add defer/recover defense-in-depth in BuildOffRampExecutePTB
- Fix unchecked assertions in token pool and receiver PTB construction
- Add comprehensive unit tests for malformed and adversarial ABI shapes1 parent 0d6856b commit f3394ca
File tree
11 files changed
+611
-114
lines changed- bindings/generated/ccip/ccip/receiver_registry
- contracts/ccip
- ccip_dummy_receiver/sources
- ccip
- sources
- tests
- relayer/chainwriter/ptb/offramp
11 files changed
+611
-114
lines changedLines changed: 17 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 16 | | |
23 | 17 | | |
24 | 18 | | |
| |||
31 | 25 | | |
32 | 26 | | |
33 | 27 | | |
34 | | - | |
35 | 28 | | |
36 | 29 | | |
37 | 30 | | |
| |||
64 | 57 | | |
65 | 58 | | |
66 | 59 | | |
67 | | - | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
81 | 73 | | |
82 | 74 | | |
83 | 75 | | |
84 | | - | |
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
88 | 79 | | |
89 | 80 | | |
90 | 81 | | |
91 | 82 | | |
92 | | - | |
93 | 83 | | |
94 | 84 | | |
95 | 85 | | |
| |||
142 | 132 | | |
143 | 133 | | |
144 | 134 | | |
145 | | - | |
146 | | - | |
| 135 | + | |
| 136 | + | |
147 | 137 | | |
148 | 138 | | |
149 | 139 | | |
150 | 140 | | |
151 | 141 | | |
152 | 142 | | |
153 | | - | |
| 143 | + | |
154 | 144 | | |
155 | 145 | | |
156 | 146 | | |
| |||
161 | 151 | | |
162 | 152 | | |
163 | 153 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 154 | + | |
169 | 155 | | |
170 | 156 | | |
171 | | - | |
| 157 | + | |
172 | 158 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
| |||
0 commit comments