Repository navigation
Release Proposal: v4.1.1 #2943
Description
Activity
- addedmetaIssues and PRs related to the general management of the project.Issues and PRs related to the general management of the project.
on Sep 18, 2015 suggesting we defer this until Monday, it's late in the week and while #2931 fixes a very important issue, the impact isn't likely to be super large - you have to be:
- using TypedArrays
- relying on them being zero-filled
- be also creating zero-length buffers
One of my primary concerns is in the perception that such a rapid series of releases so close to v4 creates, particularly for people not accustomed with how we've done things with io.js.
@rvagg Correct. Though, here a view from the other side, for balance.
To exploit this, the attacker should be able to:- Trigger a creation of a zero-length Buffer.
A presense of an empty file in/publicserver dir might (or might not) be enough for that (no time to check now). There could also be a way to trigger that solely by the means of HTTP requests (Buffers are heavily used in Node.js network stack). - Trigger a creation of a TypedArray that doesn't have at least some bytes manually set at least in some situations that he later receives data from. This one is project-dependant and may be tricky.
- The server has to run Node.js 4.1.0 (exactly). This is also not likely, because it has been just released.
Note that 1-2 do not necessary have to be done in a single request, an attacker could launch two parallel tasks — one that creates zero-length Buffers and one that retrives the data. Due to the server be highly async, this could work.
IMO, it would be better to fix that asap just to be on the safe side. This is a data leak.
- Trigger a creation of a zero-length Buffer.
@nodejs/tsc
@ChALkeR there's another step in there which is doing something with the TypedArray which is likely to be even more tricky than the other steps you've mentioned. I'm not viewing this as a vulnerability, it's just a bug.
@rvagg Doing what something? Check the testcase. Just creating and recieving data from it (which I mentioned being tricky already) is enough.
Atm, 2+3 almost guarantee that nothing is affected. But if and when a new (affected) version is deployed on more systems, just 2 won't be enough.
TypedArrays not being zero-filled in some cases (especially those that are triggerable by user actions) is a security issue no matter how one views it.
Quick steps to check (for this case):
- Is this against the docs? Yes. So, it's a bug.
- Could there be installs where this bug triggers a security vulnerability (i.e. data leak) in otherwise solid app? Yes. So, this bug is a security issue.
TypedArrays not being zero-filled in some cases (especially those that are triggerable by user actions) is a security issue no matter how one views it.
In the browser, that's why they are zero-filled by default in the browser because it's a sandbox, which Node is not and which is we don't zero-fill buffers, this is a break in assumptions and therefore a bug. By "doing something" I'm saying that you'd need to get the TypedArray data out of the server, so it's indeed an extra step, just because it exists in memory on the server doesn't make it an exploit.
Note that 1-2 do not necessary have to be done in a single request, an attacker could launch two parallel tasks — one that creates zero-length Buffers and one that retrives the data.
If the attacker had the ability to launch tasks to perform this type of operation then they could just check the contents of a Buffer. If the attack were along the lines of the http module then this would be near impossible because a Buffer would be instantiated by core internals, which would have reset the flag. Remember, the calls have to precisely follow each other for this to work.
Bug patches, even non armageddon security patches, are often not released immediately after patching. Based on the practical and possible impact this has waiting until Monday shouldn't be an issue.
I might be willing to concede this is a security issue based on a hypothetical and highly unlikely scenario along the lines of the dev partially filling a typed array with a crypto key, and depending on the remaining bits to be zero filled. Somehow then allowing false identification to the server. Did I mention the planets would need to be aligned for this to work?
So even though it might possibly be a security patch, the impact doesn't come close enough to warrant releasing today instead of Monday.
Here's my main concern here: we're at the beginning of converged Node, effectively we're proving ourselves as the new crew that's shipping Node.js and we have many eyes on us, many of whom are excited about what we're now doing, some of whom are wanting us to fail but even more who are watching on the sidelines waiting to see how it pans out–many of these are enterprise users of Node and prospective enterprise users of Node who are an important audience for the sustainability of our platform. So, what we have here is a balancing act between the perception of being cowboys with code, vs cowboys with security issues. Having a 4.1.0 9 days after 4.0.0 is going to be a big enough deal for many people, having a 4.1.1 straight after 4.1.0 is going to be read by a lot of people that we can't be trusted to ship quality code.
With regard to this specific issue, it's my personal judgement that it's a non-trivial bug, something we should get fixed as soon as practical, but it's far from a clear security exploit vector, i.e. it's very much in the realm of hypothetical. So, weighing that against the cost of releasing a new version ASAP (i.e. releases aren't free, they have a cost associated with them for the reasons outlined above), combined with the hassles of Friday & weekend releases suggest that we should just defer until early next week.
But I'm also inviting critique of all of this, this certainly isn't a final say, I can only suggest. I'm happy to change my mind in light of evidence or expertise to the contrary and even without that others' can push for a release if they think it's important enough.
Note that 1-2 do not necessary have to be done in a single request, an attacker could launch two parallel tasks — one that creates zero-length Buffers and one that retrives the data.
If the attacker had the ability to launch tasks to perform this type of operation then they could just check the contents of a Buffer. If the attack were along the lines of the http module then this would be near impossible because a Buffer would be instantiated by core internals, which would have reset the flag. Remember, the calls have to precisely follow each other for this to work.
@trevnorris You are wrong here. I explained it above.
Meta release methodology comment: This bug fix aside, before merging any feature to the stable release shouldn't it sit on master or the unstable release branch for at least a week? This Buffer optimization was first introduced a few days before release and wasn't really used in the wild before going into stable. It is very easy to miss subtleties in code reviews.
But then there's the counter argument that no one would actually test it unless it was an official release.
Related question - is iojs 3.x or node 5.x considered to be the latest "unstable" release branch? Or just master?
+1 on deferring to next week, and rolling it up with a few other fixes.
@piscisaureus I sent you an example over gitter =).
@rvagg @trevnorris I sent you an example over email.7 remaining items
Is it possible to have this release with latest version of npm.. Now that it is out of beta ?https://github.com/npm/npm/blob/master/CHANGELOG.md
npm@3 out of beta! I am really eager to get that integrated, as it fixes a long-standing problem with long nested paths on Windows. But would such a big change really be appropriate for a patch release?
But would such a big change really be appropriate for a patch release?
Not really. I think we already agreed it will go into node@5?
Not really. I think we already agreed it will go into node@5?
Yup, it has to land in a major. It should land on master, along with the new v8 I saw shoot by.
Updated OP with current commit list. Not sure what semver e0c3d2a is.
@Fishrock123 Changes in e0c3d2a are in files that are not packaged, they are used only by the tests. I'd say that's fine in a patch release.
I've had to take a few days properly off and am only just resyncing with the inevitable massive backlog that accrues when I do that and haven't been able to put anything for this together today like I intended. I'll attempt to work on it tomorrow if I get enough time and unless someone else in @nodejs/release gets to it first. We probably need to take a good look at what else on
mastercan be pushed out for this one too, although I'd personally prefer if we kept it to a semver-patch bump for simpler messaging.Any takers for #2966, #2967, #2968?
- doc: mention the behaviour if URL is invalid #2966 is about documenting a weird behavior we have in the current HTTP and HTTPS modules.
- http{s}: fix connecting to localhost if URL is invalid #2967 is about fixing the above mentioned weird behavior instead of documenting it. (We need to decide if this will be a major change or not.)
- repl: backslash bug fix #2968 is about a REPL bug which bites anyone who use backslash in string literal. There has been a report that someone copy pasted the example in our site in REPL and it errored. So pushing this fix out sooner might be a good thing.
Continued @ #2995
Contains fix that prevents
ArrayBuffers from possibly returning non zero filled memory.d63e02e08d] - buffer: don't set zero fill for zero-length buffer (Trevor Norris) #29315905b14bff] - build: fix icutrim when building small-icu on BE (Stewart Addison) #26022600fb8ae6] - deps: upgraded to node-gyp@3.0.3 in npm (Kat Marchán) #2958793aad2d7a] - deps: upgrade to npm 2.14.4 (Kat Marchán) #2958f7edbab367] - doc: clarify description of assert.ifError() (Rich Trott) #2941b2ddf0f9a2] - doc: refine process.kill() and exit explanations (Rich Trott) #2918f542e74c93] - http: guard against response splitting in trailers (Ben Noordhuis) #2945bc9f629387] - http_parser: do not dealloc during kOnExecute (Fedor Indutny) #2956d4cd5ac407] - readline: fix tab completion bug (Matt Harrison) #28162034f68668] - src: honor --abort_on_uncaught_exception flag (Evan Lucas) #27760b1ca4a9ef] - src: Add ABORT macro (Evan Lucas) #2776816f609c8b] - test: use tmpDir instead of fixtures in readdir (Sakthipriyan Vairamani) #25872084f52585] - test: test more http response splitting scenarios (Ben Noordhuis) #2945fa08d1d8a1] - test: add test-spawn-cmd-named-pipe (Alexis Campailla) #277071b5d80682] - test: make cluster tests more time tolerant (Michael Dawson) #28913e09dcfc32] - test: update cwd-enoent tests for AIX (Imran Iqbal) #2909@nodejs/release