Skip to content

Unbounded memory growth from untrusted templates and Template.packplan_for_ielist() cache #46

Open

Description

@britram

Pre-existing 0.9 memory leaks (fixed in #34):

  • ie.for_template_entry() permanently registered every unknown (pen, num) received from wire templates into the global _ieForNum and _ieForName dicts, allowing untrusted network input to grow the global registry without bound.
  • @lru_cache(maxsize=32) on the bound method Template.packplan_for_ielist() cached self in a method-level LRU cache, holding strong references to Template instances globally and preventing garbage collection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions