Skip to content

Investigate options to make ExternalPermutationWorkerFactory more safe #10256

@niloc132

Description

@niloc132

It has been suggested in #10250 that there is a security vulnerability by which a running compiler can be attacked by a client. I'm extremely skeptical, but out of that discussion a few notes have arisen:

  • Insufficient entropy in the client cookie - in theory, an attacker who can also reliably predict ports could connect and send serialization gadgets to the compiler process. Switching to SecureRandom should resolve this.
  • Don't accept a client until it has presented a valid cookie, and invalidate that cookie when it is presented. If a client presents a bad cookie, log it and wait for another. This mitigates a potential DoS from an attacker who can accurately guess the port number within the narrow window while workers are starting.
  • Only after a client is accepted should the ObjectInputStream be created, avoiding any potential for risk of an unauthenticated client attacking the server with untrusted serialized data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions