4.65 KB, patch
|Details | Diff | Splinter Review|
1.85 KB, patch
Alexander Sack: approval1.8.0.next+
|Details | Diff | Splinter Review|
3.13 KB, patch
Samuel Sidler (old account; do not CC): approval1.8.1.next+
|Details | Diff | Splinter Review|
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:184.108.40.206) Gecko/20081217 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:18.104.22.168) Gecko/20081217 Firefox/22.214.171.124 The following was sent to Adobe PSIRT (firstname.lastname@example.org): *Overview* When a Flash file is loaded in Mozilla Firefox from within the 'view-source:' protocol handler, the Adobe Flash plugin miscalculates the origin of the content. To the plugin, it appears the content was loaded from the local file system. This introduces two specific security weaknesses: * bypass of 'crossdomain.xml' and access to arbitrary third-party web content * ability to read and write local shared objects within the context of localhost *Background* In Mozilla Firefox, it isn't normally possible to render content using the 'view-source:' pseudo protocol handler. However, by providing the content as a valid JAR file, the 'jar:' handler can be used to load a file as HTML from within the context of 'view-source:'. This sequence would appear as: jar:view-source:http://example.com/data.jar!/page.html where 'data.jar' would contain: * page.html * content.swf The 'page.html' file would include 'content.swf' within an embed tag and the Flash content would be loaded with a root path of 'view-source:http://example.com/data.jar!/content.swf'. *Summary* The Flash security policy restricts objects from accessing third-party web content unless the third-party site opts in via a 'crossdomain.xml' file. For content that is loaded from the local file system, no network access is allowed unless a user specifically allows it by adding a security exception. But, by default, local Flash objects can load any other local file system content. Because Flash believes that any content loaded from 'view-source:' originated on the local machine, the Flash standard network security policy is not applied. The standard 'crossdomain.xml' file is not consulted. Mozilla Firefox allows access to the third-party data because both sets of content originate on the network. When a Flash object is loaded from within the 'view-source:' protocol, the content is created within the context of the 'localhost' hostname. This allows for the creation of Local Shared Object (LSO) that appears to originate from the localhost. Since the local networking restrictions can be circumvented by resubmitting the content using a 'view-source:' URL, coordinating third-party sites can read and write locally shared objects as well as post the information back. In this way, a complete privacy compromise and user tracking is possible. *Details* Additional details and demonstrations are available at http://pseudo-flaw.net/v/view-source-flash-issues/ Reproducible: Always
I think this is just a hole in the fix for bug 369814. We should, imo be checking that not only is the HTTP header set that way but that GetContentType on |channel| (NOT on the nsIHttpChannel) gives the same type. Since view-source: overides the type, there wouldn't be a problem, right?
What data does the view-source channel actually give back? Is it just the parent channel's data? The linked website is public. Has this vulnerability been publicly announced?
> Is it just the parent channel's data? Yes, with a special content-type that causes special processing in nsContentDLF. I should note that on our end view-source URIs are properly created as nested URIs and so forth, so we give them the right principals and whatnot.
(In reply to comment #2) > The linked website is public. Has this vulnerability been publicly announced? No, this vulnerability hasn't been publicly announced. The information was sent to Adobe PSIRT and entered here.
Blocking 126.96.36.199 probably isn't reasonable without a 1.9.1 fix (188.8.131.52 is more realistic), but blocking for now since I can't make it block 1.9.1
ccing some likely fixers. I guess I could patch this, but then I'm not sure who to get to review it...
(In reply to comment #1) > I think this is just a hole in the fix for bug 369814. We should, imo be > checking that not only is the HTTP header set that way but that GetContentType > on |channel| (NOT on the nsIHttpChannel) gives the same type. Since > view-source: overides the type, there wouldn't be a problem, right? If we generally avoid rendering view-source content, and jar: lets someone get around that, should we just always disallow unpacking if our child is a view-source channel? Just extending the 369814 fix will still leave people vulnerable if they have the network.jar.open-unsafe-types pref set. Also, if flash is generally treating unknown protocols as local, this might happen again if another channel implements nsIHttpChannel and doesn't happen to override GetContentType(). Maybe we should really only trust nsHttpChannel to provide the safe-jar content type?
> should we just always disallow unpacking if our child is a view-source channel? We could, yes. > still leave people vulnerable if they have the network.jar.open-unsafe-types > pref set. They're already vulnerable to various attacks, but agreed. > Also, if flash is generally treating unknown protocols as local, Then it's busted in all sorts of ways and should be fixed, imo... Any extension protocol will break that assumption, no?
Created attachment 366006 [details] [diff] [review] v1
Created attachment 366027 [details] [diff] [review] v1 with tests Not sure why that patch didn't include the test changes...
This patch conflicts a bit with the patch in bug 474536. If that patch is going to land on 1.9.0/1.9.1 we should land it first, otherwise I can put together a new patch for those branches.
Comment on attachment 366027 [details] [diff] [review] v1 with tests Approved for 184.108.40.206, a=dveditz for release-drivers
Checking in docshell/test/Makefile.in; /cvsroot/mozilla/docshell/test/Makefile.in,v <-- Makefile.in new revision: 1.14; previous revision: 1.13 done Checking in docshell/test/test_bug369814.html; /cvsroot/mozilla/docshell/test/test_bug369814.html,v <-- test_bug369814.html new revision: 1.2; previous revision: 1.1 done Checking in modules/libjar/nsJARChannel.cpp; /cvsroot/mozilla/modules/libjar/nsJARChannel.cpp,v <-- nsJARChannel.cpp new revision: 1.131; previous revision: 1.130 done Checking in bug369814.jar; /cvsroot/mozilla/docshell/test/bug369814.jar,v <-- bug369814.jar initial revision: 1.1 done
Verified for 220.127.116.11 using the checked in tests, which pass.
18.104.22.168 was renamed to 22.214.171.124, to make room for an inserted "Firefox 3.0.8". The release containing this fix has been renamed to "Firefox 3.0.9" but will release on pretty much the same schedule (mid-April).
Comment on attachment 371669 [details] [diff] [review] 1.8.0 branch patch Can you check this one?
Comment on attachment 371669 [details] [diff] [review] 1.8.0 branch patch Looks fine.
Created attachment 374884 [details] [diff] [review] same for 1.8
Comment on attachment 374884 [details] [diff] [review] same for 1.8 Approved for 126.96.36.199, a=dveditz for release-drivers
Checked into the 1.8(.1) branch Checking in Makefile.in; /cvsroot/mozilla/modules/libjar/Makefile.in,v <-- Makefile.in new revision: 188.8.131.52; previous revision: 1.50 done Checking in nsJARChannel.cpp; /cvsroot/mozilla/modules/libjar/nsJARChannel.cpp,v <-- nsJARChannel.cpp new revision: 184.108.40.206; previous revision: 220.127.116.11 done
Verified for 1.8.1 using http://pseudo-flaw.net/v/view-source-flash-issues/thirdpartycontent.html and Seamonkey 1.8 nightly (Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:18.104.22.168pre) Gecko/20090602 SeaMonkey/1.1.17pre). Verified for 1.9.1 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090601 Shiretoko/3.5pre. Verified for trunk with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090529 Minefield/3.6a1pre.