Commit b91d87b
committed
test: an oversized multisig signature must be refused
MultisigRedeemScriptType.signatures is declared max_size:73, so the decoder
accepts 73 bytes, but a DER-encoded ECDSA signature is at most 72: 0x30 len,
then two 0x02-tagged integers of at most 33 bytes each.
The witness serializer appended the sighash byte AT signatures[i].size, so a
73-byte value wrote one past the end of bytes[73] -- onto signatures[i+1].size
for i < 14, which can revive a slot the host deliberately left empty and
change the witness stack after the user reviewed it, or onto has_m at i == 14.
A declared max_size is a DECODER bound and never a runtime one. Registered as
Z27 so it is in the CI filter and actually runs.1 parent 34a1c6c commit b91d87b
2 files changed
Lines changed: 53 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2291 | 2291 | | |
2292 | 2292 | | |
2293 | 2293 | | |
| 2294 | + | |
| 2295 | + | |
| 2296 | + | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
2294 | 2303 | | |
2295 | 2304 | | |
2296 | 2305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
243 | 287 | | |
244 | 288 | | |
0 commit comments