News for hackers. Stuff that matters.
Re:The SimCity Planning Commission Handbook by TheLoneWolfling on Friday September 04, 2015 @07:08PM (#10173245)
First off, kindly reread what I actually said, as opposed to what you skimmed :)

Secondly, now that you have actually done that, you'll note I did not said JITters are inherently insecure. I said that "Trying to write a language that is compiled / JITted quickly, is executed quickly, is powerful, and is secure, is doomed to failure". And the reason is simple. By the time you take a powerful language and add the optimizations necessary to make it be executed quickly, your execution engine becomes complex. (For instance, the v8 engine is, what, 1.4 million lines of code? And the SpiderMonkey engine is over half a million?) And because you need the engine to compile / JIT quickly, you end up writing code that takes advantage of "bare-metal" features. And as such, you have a nasty combination of an absurd amount of code, most of which is "unsafe" (to use the Rust parlance). And from there, simple probability dictates that you will have bugs, and you will have exploitable bugs.

Now, is this inherent to JS engines? No. You could, in theory, have a JS engine written in a language that checks the code for you. As you said, Erlang, or whatever. However, that is a moot point. Because there is not a single functional browser that uses a JITter that doesn't have these problems.

And as such, here's a good reason, albeit not a technical one: precedent. I am not so... hubristic, shall I say, to assume that even though every current major browser has a large chunk, if not the majority, of exploitable bugs be in the JS engine, that the next one will be any different.

I can hope, but I will not rely on it. Especially not as I am talking about now, not some potentially-mythical time in the future.

And no, I cannot give you a technical reason. Because I suspect that the moment anyone figures out said technical reason, they will be able to design a language and/or engine that doesn't have said reason.

Re:The SimCity Planning Commission Handbook by simoncion on Friday September 04, 2015 @07:22PM (#10173272)
I read all five sentences and the single sentence fragment in your statement several times before replying. :)

If your thesis is "Complex and/or difficult software is hard to get right.", I agree with it. I don't think any experienced programmer would disagree with it.

If your thesis is -as it appears to be- "Complex and/or difficult software is impossible to get right.", I cannot agree with it. It is often difficult and time consuming to create correct complex software, but far from impossible.

Re:The SimCity Planning Commission Handbook by TheLoneWolfling on Saturday September 05, 2015 @07:09AM (#10174488)
Complex software is possible to get right in the same sense that it is possible for all the O2 molecules in this room to move to the other side of this room at the same time.

It is technically possible, but improbable enough that, in the absence of direct evidence to the contrary (in this case, a functional browser that doesn't have bunches and bunches of exploitable bugs in its JS engine), it may as well not be.

Re:The SimCity Planning Commission Handbook by simoncion on Saturday September 05, 2015 @03:42PM (#10175832)
Like I said, correct complex software is almost always going to be expensive as fuck. Unless you're doing interesting work, you're unlikely to run into examples of such software. Because noone _directly_ makes millions of dollars per month from V8, there's no business reason to expend the effort required to make V8 bulletproof.

Is the software for an ATM switch that contains more than a million lines of code, runs uninterrupted for twenty years straight, and scales from 10gbit to 160gbit sufficiently complex for you?

Re:The SimCity Planning Commission Handbook by TheLoneWolfling on Saturday September 05, 2015 @07:20PM (#10176346)
Considering that is not what I was asking for (I quote, "a functional browser that doesn't have bunches and bunches of exploitable bugs in its JS engine"), it, although impressive in its own right, is irrelevant.

(Not to mention that said software isn't available for public scrutiny, and as such I have to take the assertion that it is bulletproof with a grain of salt. I mean, even NASA has had braindead-stupid moments (failing to convert units properly? A casting error? Running out of space on the filesystem?)))

Re:The SimCity Planning Commission Handbook by simoncion on Saturday September 05, 2015 @07:54PM (#10176399)
You made the assertion that "Complex software is possible to get right in the same sense that it is possible for all the O2 molecules in this room to move to the other side of this room at the same time.". [0]

Now you appear to refuse to consider any examples that demonstrate the in-correctness of your claim. Why?

Would you care to amend your claim to restrict it only to JavaScript engines shipping in free-to-use web browsers?

[0] https://news.ycombinator.com/item?id=10174488

Re:The SimCity Planning Commission Handbook by TheLoneWolfling on Saturday September 05, 2015 @08:35PM (#10176461)
Ah. A misunderstanding.

What was meant was "for each <thing X that is done by complex software>, <a piece of software S> doing X correctly is improbable enough that the existence of any piece of software doing X correctly may be considered to be impossible unless there is a piece of software that hasn't been shown to do X incorrectly".

What was taken was "for each <thing X that is done by complex software>, <a piece of software S> doing X correctly is improbable enough that the existence of any piece of software doing X correctly may be considered to be impossible unless there is a piece of software that hasn't been shown to do <any thing Y that is done by complex software> incorrectly".

An important distinction.

Hopefully this makes things clearer.

Re:The SimCity Planning Commission Handbook by simoncion on Saturday September 05, 2015 @09:00PM (#10176506)
You're backtracking on your original assertion without actually owning up to your gross overstatement. What's more, you're doing a poor job of attempting to Euler me in the process. :)

Here's the thing:

Problems in software are productively classed by their complexity and difficulty. That is to say that if you have two tasks, each of equivalent complexity and difficulty, the software to solve one task is going to be just as expensive to write as the software to solve the other one. [0]

I argue that designing and writing the software system required to run a piece of high-traffic, high-performance, near-zero-downtime networking gear that actually meets its goals [1] is in the same class of difficulty as writing a performant JS engine that has no "exploitable bugs". [3]

[0] For the purposes of this discussion, the cost to write any software used as part of the solution to either task must be included in the analysis of the overall cost.

[1] If you don't consider the existence of at least one production instance of this system being in continuous use for a decade or more proof of its correct design and implementation, I really don't know what else would convince you. You're highly unlikely to be able to evaluate the correctness of the system via manual inspection. [2]

[2] I mean, if you were one of the handful of mutants in existence who could do this, you'd likely not be wasting time arguing on HN.

[3] Actually, for giggles, can you point to a handful of somewhat recent High or Critical severity CVEs for V8 when used in Chrome or Chromium? Remember that you've been laser-focused on the Javascript engine, so failures of things like the browser's sandbox, browser's chrome, or OS process isolation don't count.

Re:The SimCity Planning Commission Handbook by TheLoneWolfling on Sunday September 06, 2015 @07:12AM (#10177343)
Ah, so not misunderstanding but difference of opinion. You consider software complexity comparable at a broader level than I do. A rather fundamental difference, and we have both made our points on the matter without swaying the others opinion.

(As for the V8 engine, see https://code.google.com/p/chromium/issues/list?can=1&q=Type=.... (Note that Google does not make severe recent bugs publicly available.))

Re:The SimCity Planning Commission Handbook by simoncion on Sunday September 06, 2015 @03:52PM (#10178789)
> You consider software complexity comparable at a broader level than I do.

If you're currently starting your career in software, you're sure to -one day- consider the topic in the same way that I do. It's the only rational way to think about it.

Regardless of how you think about the comparability of software complexity between software projects, your statement about the near-impossibility of creating correct complex software was a gross overstatement; one that you're still not owning up to. :)

That bug list is not a list of CVEs. What's more, it's a list of bugs for the entire Chromium project. I assume that you couldn't find any CVEs that only affected V8 the JS engine, as used in Chrome or Chromium. Their absence shoots a really big hole in the foundation of your primary claim, which was: "[There exists no] functional browser that doesn't have bunches and bunches of exploitable bugs in its JS engine.".