Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC-ing unused objects can lead to invalid repositories #33

Open
lolepezy opened this issue Mar 11, 2021 · 2 comments
Open

GC-ing unused objects can lead to invalid repositories #33

lolepezy opened this issue Mar 11, 2021 · 2 comments
Labels
maybe bug Hypothetical bug

Comments

@lolepezy
Copy link
Owner

lolepezy commented Mar 11, 2021

In the following scenario things can go really wrong.

  • A RRDP repository publishes a ROA and a manifest that doesn't refer to the ROA.
  • After time defined by --cache-lifetime the ROA is GC-ed, because it was never touched by a top-down validation.
  • After that the repository publishes a new manifest that now refers to the ROA
  • Top-down validation considers the manifest and the CA invalid, since it has a dangling reference.
  • Earth collapses to a black hole.

While in practice this scenario doesn't make any sense, it is still technically valid behaviour of a RRDP repository and must be taken into consideration.

@lolepezy lolepezy added the bug Something isn't working label Mar 11, 2021
@job
Copy link

job commented Mar 12, 2021

Unsure if the validators should 'fix' this, validator's dont have infinite memory.

RRDP servers should be encouraged to publish RPKI objects as concise coherent bundles. If a signer updates the manifest but does not provide the ROA at the same time, the signer messed up and the validator should reject the manifest. Nor can the signer expect validators to indefinitely cache ROA objects which are not referenced from any valid manifest.

Similarly to how rsync server operators are expected to atomically and gracefully update the rsync server's module contents, I'd expect RRDP server operators to publish in an atomically coherent fashion.

I think GC-ing unused objects is correct behavior, after all, they are unused. :)

@lolepezy
Copy link
Owner Author

I am not planning to change the cache cleanup behaviour on some fundamental level, I wouldn't want RRDP replacements and withdraws to be the only thing controlling lifetime of objects in the local cache.

But some extra heuristics of a kind "if there was an referential integrity problem in the tree, next time download the snapshot instead of deltas" would probably make sense. Or at least a better error message would do.

@lolepezy lolepezy added maybe bug Hypothetical bug and removed bug Something isn't working labels Jun 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maybe bug Hypothetical bug
Projects
None yet
Development

No branches or pull requests

2 participants