Skip to content

Authenticate connections to web_config service - #1587

Closed
zanchey wants to merge 2 commits into
fish-shell:masterfrom
zanchey:1438-token
Closed

zanchey wants to merge 2 commits into
fish-shell:masterfrom
zanchey:1438-token

Conversation

@zanchey

@zanchey zanchey commented Jul 31, 2014

Copy link
Copy Markdown
Member

This is a fix for CVE-2014-2914 (#1438) which allows us to be more secure in the way we accept web_config requests.

I would appreciate any testing before I merge to master and Integration_2.1.1. I've tried on Debian with Iceweasel 24.7.0 (close to Firefox 24.7.0) and Chrome (36.0.1985.125).

In particular:

@ridiculousfish

Copy link
Copy Markdown
Member

Thanks zanchey, I'll give this a try tomorrow

Comment thread share/tools/web_config/webconfig.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line fails to parse cookies correctly if localhost has set any other cookie than com.fishshell.auth.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now.

 - Require an authentication cookie for all requests.
 - Add a '/start/' handler for setting the authentication cookie.
 - Use a redirect file to avoid exposing the '/start' URL on the command
   line, as it contains the cookie value.

Fix for CVE-2014-2914.
Closes fish-shell#1438.
@amluto

amluto commented Jul 31, 2014

Copy link
Copy Markdown
Contributor

It is possible to do this without using cookies? I can imagine rather complicated attacks that hijack localhost cookies.

This whole thing is just one page, right? What prevents part of the query string from being used for this purpose?

@zanchey

zanchey commented Aug 1, 2014

Copy link
Copy Markdown
Member Author

Do you mean something along the lines of wait until fish_config is running, entice user to another webserver running on the local machine and use that to snarf the session cookie? I suspect CUPS is vulnerable to the same problem, because they use a session cookie as well.

We could add a query string, but that requires teaching the front end to add it to all GET requests and also as part of all POST requests. I'll look into that.

@ridiculousfish

Copy link
Copy Markdown
Member

For the record, this seems to work correctly on Mavericks. It launches correctly, other sessions see Access Denied, and there are no visible secrets.

 - Require all requests to use a session path.
 - Use a redirect file to avoid exposing the '/start' URL on the
   command line, as it contains the cookie value.

Fix for CVE-2014-2914.
Closes fish-shell#1438.
@zanchey

zanchey commented Aug 3, 2014

Copy link
Copy Markdown
Member Author

I tried adding a query string, but it rapidly made the code very complicated, so instead I've just implemented a change that bases the whole server out of /{authkey}/. I'll squash merge to master if it's all ok; appreciate any further testing.

@zanchey zanchey added this to the 2.1.1 milestone Aug 3, 2014
@zanchey zanchey self-assigned this Aug 3, 2014
@zanchey

zanchey commented Aug 4, 2014

Copy link
Copy Markdown
Member Author

Merged to master here:
To [email protected]:fish-shell/fish-shell.git
8844f0c..4ae2753 master -> master

Not yet merged to Integration_2.1.1.

@zanchey zanchey closed this Aug 22, 2014
@zanchey zanchey assigned zanchey and unassigned zanchey Aug 29, 2014
@zanchey
zanchey deleted the 1438-token branch March 31, 2016 23:26
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants