Commit 7886eea
resolved: limit the number of signature validations in a transaction
It has been demonstrated that tolerating an unbounded number of dnssec
signature validations is a bad idea. It is easy for a maliciously
crafted DNS reply to contain as many keytag collisions as desired,
causing us to iterate every dnskey and signature combination in vain.
The solution is to impose a maximum number of validations we will
tolerate. While collisions are not hard to craft, I still expect they
are unlikely in the wild so it should be safe to pick fairly small
values.
Here two limits are imposed: one on the maximum number of invalid
signatures encountered per rrset, and another on the total number of
validations performed per transaction.
(cherry picked from commit 67d0ce8)
(cherry picked from commit 1ebdb19)
(cherry picked from commit 2f5edff)1 parent e31a074 commit 7886eea
3 files changed
Lines changed: 38 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1176 | 1176 | | |
1177 | 1177 | | |
1178 | 1178 | | |
| 1179 | + | |
1179 | 1180 | | |
1180 | 1181 | | |
1181 | 1182 | | |
| |||
1221 | 1222 | | |
1222 | 1223 | | |
1223 | 1224 | | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1224 | 1233 | | |
1225 | 1234 | | |
1226 | 1235 | | |
| |||
1230 | 1239 | | |
1231 | 1240 | | |
1232 | 1241 | | |
| 1242 | + | |
| 1243 | + | |
1233 | 1244 | | |
1234 | 1245 | | |
1235 | 1246 | | |
| |||
1240 | 1251 | | |
1241 | 1252 | | |
1242 | 1253 | | |
1243 | | - | |
| 1254 | + | |
1244 | 1255 | | |
1245 | 1256 | | |
1246 | 1257 | | |
| |||
1287 | 1298 | | |
1288 | 1299 | | |
1289 | 1300 | | |
1290 | | - | |
| 1301 | + | |
1291 | 1302 | | |
1292 | 1303 | | |
1293 | 1304 | | |
| |||
2571 | 2582 | | |
2572 | 2583 | | |
2573 | 2584 | | |
| 2585 | + | |
2574 | 2586 | | |
2575 | 2587 | | |
2576 | 2588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3172 | 3172 | | |
3173 | 3173 | | |
3174 | 3174 | | |
| 3175 | + | |
3175 | 3176 | | |
3176 | 3177 | | |
3177 | 3178 | | |
3178 | 3179 | | |
3179 | 3180 | | |
| 3181 | + | |
| 3182 | + | |
3180 | 3183 | | |
3181 | 3184 | | |
3182 | 3185 | | |
| |||
3218 | 3221 | | |
3219 | 3222 | | |
3220 | 3223 | | |
| 3224 | + | |
3221 | 3225 | | |
3222 | 3226 | | |
3223 | 3227 | | |
| |||
3415 | 3419 | | |
3416 | 3420 | | |
3417 | 3421 | | |
3418 | | - | |
| 3422 | + | |
| 3423 | + | |
3419 | 3424 | | |
3420 | 3425 | | |
3421 | 3426 | | |
| |||
3508 | 3513 | | |
3509 | 3514 | | |
3510 | 3515 | | |
3511 | | - | |
| 3516 | + | |
3512 | 3517 | | |
3513 | 3518 | | |
3514 | | - | |
| 3519 | + | |
3515 | 3520 | | |
3516 | 3521 | | |
3517 | 3522 | | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
| 3528 | + | |
| 3529 | + | |
| 3530 | + | |
3518 | 3531 | | |
3519 | 3532 | | |
3520 | 3533 | | |
| |||
0 commit comments