Repository navigation
Commit 64023d6
committed
Fix the DNS_ParseDNSReply CBMC proofs
All four DNS_ParseDNSReply configurations failed with an unwinding
assertion on DNS_DecodeName.0. The decoder was reached from
DNS_ParseDNSReply() on the path where a response carries no question and
the name has to be taken from the first answer instead, and that loop is
not in those proofs' unwindsets, so --unwind 1 applied to it.
Take the name with DNS_ReadNameField() there instead of DNS_DecodeName().
The decoder was only used to reach it under the same condition that the
answer-name validation is compiled under, and widening the declaration of
DNS_ReadNameField() to the condition its definition already uses achieves
that without adding a loop to this entry point. Nothing precedes those
records but the header, so the name cannot usefully be a compression
pointer; should it be one anyway, the name stays empty and every answer
record fails the validation.
Bounding DNS_DecodeName.0 in those proofs instead would have worked, but
it made the two NetworkBufferSize configurations far more expensive: the
IPv4 dynamic one exhausted the SAT solver's memory locally. With this
change the four proofs take 1s, 1s, 87s and 108s and all report SUCCESS.1 parent 3a984fe commit 64023d6
2 files changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
360 | | - | |
361 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
362 | 366 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
0 commit comments