Skip to content

Restrict fish_config socket connections (CVE-2014-2914) #1438

Closed

Description

@zanchey

Before 6d74978 and 44b35f7 anyone* could connect to a running fish_config server and send code to (e.g.) set_prompt, which is obviously bad.

That's been clamped down to localhost-only now, which helps, but it's still possible for someone on your local machine to wait for you to start fish_config and then talk to the server.

There's a perfect API for verifying who is on the other end of a local IP/IPv6 socket - getpeerucred(3). Unfortunately, it's only available on Solaris.

We could include an authentication key in the URL, but that could be read from the command line.

Activity

  1. amluto commented on Apr 28, 2014

    @amluto
    Contributor

    See #1441 for a nicer version of this.

  2. added this to the milestone on Apr 29, 2014
  3. zanchey commented on Jun 28, 2014

    @zanchey
    MemberAuthor

    Note that #1441 still doesn't stop attackers on the same machine from sending arbitrary code to fish_config. I have not been struck by inspiration for a fix on mainstream platforms.

  4. amluto commented on Jun 28, 2014

    @amluto
    Contributor

    Use a token in a query string, perhaps? Or maybe a secret URL prefix?

  5. zanchey commented on Jun 29, 2014

    @zanchey
    MemberAuthor

    You can see that sort of thing in the process table unfortunately.

  6. amluto commented on Jun 29, 2014

    @amluto
    Contributor

    Next silly idea: write the main config page to ~/.config/fish/fish_config.html. Stick a secret token in there, and send the user to file:///HOME/.config/fish/fish_config.html.

    This might require setting a CORS policy on the server, but that's not so bad.

  7. added a commit that references this issue on Jul 31, 2014
    1afdc27
  8. zanchey commented on Jul 31, 2014

    @zanchey
    MemberAuthor

    Good idea! I've implemented something similar in #1587.

  9. added 2 commits that reference this issue on Jul 31, 2014
    25e2d98
    3d129c0
  10. added 2 commits that reference this issue on Aug 8, 2014
    397249a
    1e68508
  11. self-assigned this
    on Sep 1, 2014
  12. added a commit that references this issue on Aug 28, 2017
    307092c
  13. locked as resolved and limited conversation to collaborators on Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions