user controlled data will be exposed in the launchpad.net domains at the next release

Bug #612779 reported by Robert Collins
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Abel Deuring

Bug Description

Hi, this is a new bug related to the exciting work going on to make private bug attachments well, private.

Sadly, that work is building on an incomplete foundation - the restricted librarian has only been used for system controlled content so far - that is, content where we are (reasonably) sure that it is harmless. The StreamOrRedirect view doesn't set content-disposition, and uses content sniffing to determine the content. As such, once db-devel deploys to staging today, a private bug attachment which is hostile javascript, will have full access to the viewing users launchpad account on staging; if we deploy that facility to production we'll be open to the same attack on production.

This is a critical issue to fix before our upcoming release, so I'm marking it as critical.

Tags: lp-bugs qa-ok

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

As far as fixing it goes, the simplest way would be to set cd:attachment on all StreamOrRedirect responses, but that will cause things like build logs which are system controlled and extremely hard to attack, to be downloaded rather than viewed in the browser.

A better approach might be to have two StreamOrRedirect views, and choose the right one based on the type of file - whether its a bug attachment (unsafe), a merge proposal diff(safe), log file from our buildds (safe) etc etc.

visibility: private → public
Revision history for this message
Abel Deuring (adeuring) wrote :

Right, the latter is quite easy to implement, combined with a navigation class for BugAttachment that inherits from FileNavigationMixin and returns the view for unsafe content.

Deryck Hodge (deryck)
Changed in malone:
status: Triaged → In Progress
assignee: nobody → Abel Deuring (adeuring)
milestone: none → 10.08
Abel Deuring (adeuring)
Changed in malone:
status: In Progress → Fix Committed
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
tags: added: qa-needstesting
Abel Deuring (adeuring)
tags: added: qa-ok
removed: qa-needstesting
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.