4 ms·
My complaint about browsers is less about architecture (I mean, when using multiple processes is a vast improvement of the state of the art on the ground...), t
My complaint about browsers is less about architecture (I mean, when using multiple processes is a vast improvement of the state of the art on the ground...), than what I gather is the vast amount of work required to get today's standard web pages to render well.
There are, what, 4 state of the art rendering engines? (Two Microsoft, which has lots of money to spend, Webkit (now Apple and Google forked??), and Firefox's.) And there's much, much more to the security story for browsers.
Then again, this is not a topic I've looked closely at, maybe there's more hope than I think, and continuing financial losses might prompt more rigor, although I don't recall the worse ones being purely browser exploits.
Oh I see what you mean. Yes, it's become an oligopoly with a huge barrier to entry. The typical solution is to separate all these components with safer implementations, isolation, and/or interfaces. What I referenced do those. If you want to solve it directly, you have to make the code trustworthy. That's... another matter entirely.
There are a few approaches to this. One is to apply compiler transformations that make the code memory-safe along with interface checks at sys-call level. An example is Softbound+CETS albeit I'm not saying it's worked on a browser. Several have compiled C programs to run in a Java or other managed environment. Another example is a lighter security approach called control flow integrity where you just try to block code injections with data or pointer protection. Control Pointer Integrity is most interesting right now with several HW accelerators. The next approach is using software or hardware obfuscation to make it where the incoming attack (a) wouldn't hit its target or (b) would be mangled/detected by crypto work at HW level. This has been ported to Linux. CheriBSD is another, DARPA-funded effort that uses custom hardware (CHERI) and tooling to let you incrementally protect legacy stuff with capabilities.
So, quite a few ways to deal with it. As usual, the problem is that our machines and languages make it easy to cause a vulnerability with common, fundamental operations. Making those operations fundamentally safe[r] knocks out a lot of that risk. Traditional techniques, like separation kernels, can try to isolate and detect the rest. That's my take on how to deal with being stuck with codebases like Webkit. Still work but feels less impossible.
A few more thoughts, without having looked at your references or even having more than a vague idea of the (necessary) architecture of browsers (it's fiddly front end stuff I don't like all that much as a domain), and for that matter at this point I'm just looking at all this because I don't like how things are, how they've developed since Multics and the Lisp Machine (the latter, admittedly not a secure system), and looking for what to try to do next with my life:
A lot of what you suggest for directly solving it strike me as hacks not to my taste, but I'll look harder at that sort of thing in the future.
Absent that:
If you're going to modularize it, the interfaces are going to be complex and error prone, in part what I view as the difference between relatively easier to trust ciphers such as AES and much more fragile cryptosystems/cryptographic protocols (the one bit of real research I've done here was in 1979, trying to design an public key based authentication server; no success then, I gather it took half a decade to get to the not obviously broken stage).
It's got to be fast; for now, ever faster as web pages get more and more complicated.
Although one cause of that, calling out to zillions of different sources, admits to speed ups if you can incrementally/concurrently deal with the bits as you get them ... which of course makes the system more complicated.
(There's probably a space for a browser distribution that thoroughly pretends to be from a mobile source and gets those simpler pages. :-)
Firefox/Mozilla may be in the process of killing itself, worsening the oligopoly:
Objectively, I hear they're dramatically losing market share AKA $$$ for further development.
Related to that, poor organizational management.
I heard on HN that they're preparing to move to a multiprocess architecture which will nuke their extension ecosystem, which is one of their core advantages. This is one of those nasty security-usability tradeoffs, or at least probably due to some of the above resource and organizational issues, plus perhaps security issues, the API presented to extensions won't allow them to do much. Chrome of course has this "problem".
I guess what I'll personally do is concentrate on the lower level, tentatively starting with an Raspberry Pi seL4 port (I know, stop laughing, it's the most stable (long life promise) and widely available ARM platform for learning), wait to see how Servo plays out (see above Mozilla problems), and then return to this, maybe it's less "impossible" than I sense right now. Although still plenty impossible in the approaches my taste prefers that can't be used for the foreseeable future.
Thanks a lot for your contributions to all these HN security discussions!
"it's fiddly front end stuff I don't like all that much as a domain"
What (briefly) is your experience or skillset so I can better target my recommendations?
"A lot of what you suggest for directly solving it strike me as hacks not to my taste, but I'll look harder at that sort of thing in the future."
The problem is that the Web, Windows, and UNIX stacks are all hacks built on hacks with tons of compromises and many bad design choices. Anything that preserves their functionality without a rewrite is going to be hackish. So, we then decide where to put hacks among libraries, source-to-source translators, libraries, OS's, hardware, etc. I tried to name off more sensible one's to avoid readers having headaches I had going through 10,000 papers of this shit. ;)
"If you're going to modularize it, the interfaces are going to be complex and error prone"
Interface errors account for vast majority. Margaret Hamilton, Dijsktra, Robert Schell, and Paul Karger all independently discovered that w/ solutions presented. The consensus is you need to document the pre-conditions, post-conditions, and properties that always hold. Type-checking, Design-by-Contract, and similar techs help. Generic functions and good design helps keep complexity down. Functional languages with strong typing are best at making this safe and concise at same time. So, it doesn't have to be bad unless your tools suck.
"much more fragile cryptosystems/cryptographic protocols "
Sort of. Those do much more than just decompose: theory, design, implementation, distributed of all that... a tall order. Understanding the positive effect of decomposition and layering will be obvious if you look at this on p8 "Layered Design:"
http://www.cse.psu.edu/~trj1/cse543-f06/papers/vax_vmm.pdf http://www.cse.psu.edu/~trj1/cse543-f06/papers/vax_vmm.pdf
Now, try to imagine a description of how VMware or KVM do the same thing. It would probably be much more complex with looping around and such. The decomposition makes it easier to understand w/ sensible interfaces. That's how it's supposed to be done anyway.
"trying to design an public key based authentication server; no success then"
As I said, crypto protocols are extra hard to do right. It's the kind of thing that should get intense tool support. The state-of-the-art in high assurance is NSA and Rockwell-Collins tool that goes from a flowchart & specs in (Simula?) to generated code or hardware with verification checks for a processor whose security is verified. An example for the rest of us and ideal for your case is combining CRYPTOL for algorithm, state machines for overall code, and SPARK for implementation language. The protocol logic would be implemented with this kind of tool:
http://www.dsi.unive.it/~modesti/anbx/ http://www.dsi.unive.it/~modesti/anbx/
I call out plenty of people for their methods. Yet, it was understandably hard to pull off public key servers a few years after they were invented on 1970's computers. Even the people inventing INFOSEC sucked at security back then. ;)
"It's got to be fast; for now, ever faster as web pages get more and more complicated."
It does. Hence our hacks to work with normal, highly-optimized software. However, some old stuff was still faster. JavaScript is utter garbage. One alternative (Juice) used Oberon language for applets with ZIP'd abstract syntax trees. Let you type-check it, interface-check it, and then compile it super-fast to fast binary. Client-server apps could use efficient stacks, implementation languages, avoid rendering they didn't need, etc. So, plenty room for improvement especially if we use plugins or stand-alone apps where possible. Facebook Messenger, etc are ditching the Web that way.
"browser distribution that thoroughly pretends to be from a mobile source and gets those simpler pages. :-)"
Good thinking: I thought of that one, too. Still in backlog. Another model I worked out was ultra-fast, thin-client (phone or netbook) connected to a secure, desktop browser running on best hardware it could. Turns out that a variant of that (for efficiency) was done by mobile companies like Opera. So, it's possible.
"Objectively, I hear they're dramatically losing market share AKA $$$ for further development."
"that they're preparing to move to a multiprocess architecture which will nuke their extension ecosystem"
That is potentially bad. I don't know about their management. Can only hope for the best there. Good news is many of the best extensions are actively maintained or should be ported in event plugin architecture changes. So, here's hoping there too. This from Wikipedia bothers me:
"making Yahoo! Search the default search experience for Firefox in North America effective December 2014.[7] However, it is also to be noted that Yahoo! Search is a merely a front-end to Microsoft's search engine Bing, and Microsoft takes a 12% cut of all revenue from the search business per the deal."
Yahoo itself is in a shaky position and Bing gets a cut? That's risky esp with what they made on Google. I'd have gotten expenses in order instead. Maybe.
"starting with an Raspberry Pi seL4 port (I know, stop laughing, it's the most stable (long life promise)"
It and Beagle port. No laughing here: do what you can. Check out Genode as well as they're among more mature of L4-based architectures. Maybe better integrate it with seL4, Linux virtualization with either, or middleware for integrating components in protection domains. These are low-hanging fruit.
"Thanks a lot for your contributions to all these HN security discussions!"
Appreciate it. The few who might benefit are the only reason I post. Well, I enjoy it too but still. ;)
why ITS was an excellent design vs UNIX
Well, first refer to the first Worse is Better essay, which directly compares The Right Thing/MIT vs. Worse is Better/New Jersey styles in handling of interruption of long system calls (invisible PCLUSER back out vs. return with error and require you to try again: https://www.dreamsongs.com/RiseOfWorseIsBetter.html https://www.dreamsongs.com/RiseOfWorseIsBetter.html).
For a few details, the security model was very well matched to the threat model (although they were forced to add login password protection :-), and while constrained in a whole bunch of weird ways, e.g. the 3 local filename components were limited to 6 6 bit-characters, one 36 bit word, total number of directories were the number of words that would fit on a page, 512 I think, it had all sorts of features I miss. E.g. plugable I/O filter and error mechanisms, a [machine-name]: convention, e.g. "AI:DIR;FNAME1 FNAME2" which I think worked on all file accesses, or the general ecosystem's Chaosnet convention of string character ports. And then there's a feature ported to UNIX by Jim Kulp, a hacker with a foot in both worlds, shell job control (^Z and friends). And on MIT-MC, a ECL KL-10 (~2xVAX 11/780), it was seriously fast. I never learned the guts of this (doomed) architecture, but the results spoke for themselves, and exceeded any PDP-10/Decsystem 20 OS I know about.
At the highest level, ITS+TECO EMACS+Maclisp was the prototype for the Lisp Machine.
As for the ML language family, I'm going for the original formula first, because of all the research I want to be able to better follow that uses it, an allergy to objects I've developed ^_^, and the TCB issue, e.g. the active CakeML project: https://cakeml.org/ https://cakeml.org/ I gather that pretty much anything Magnus Myreen is or has worked on is worth looking at, e.g. he's the guy who solved the seL4 HOL -> CompCert impedance mismatch by going backwards, from GCC produced binary to auto-generated models of what that binary did. If I like ML, I'm sure I'll learn Ocaml, if not, Myreen helped develop a down to the machine code validated LISP for some ACL2 related work: http://www.cl.cam.ac.uk/~mom22/jitawa/ http://www.cl.cam.ac.uk/~mom22/jitawa/
Exactly what I do depends on whether I can grok HOL/this style of proving, haven't done that sort of thing since 1977....
Me-> "a modern web browser is a non-negotiable for users"
Maybe.
If you want to develop an end user OS that lots of people will use, that might develop a big enough developer community to survive, and that will of course address that very big pain point, well, those are all goals I hold and that I can to contribute to, one way or another. And your exception of "Lots of large companies get by forcing use of terminals, client-server, and minimalist web stuff." doesn't work for the knowledge workers that require access to the unconstrained web. That's so critical nowadays that the PRC still allows it (all but North Korea?), a ticketed programmer friend of mine does his day to day work with access to the web, starting in 1996 I would never accept a programming job that didn't give me such access, etc. etc. The ability to quickly find an answer (if it exists :-) to most any question you can ask from anywhere in the world is just too critical.
Hmmm, come to think of it, I'm not exactly enthused by the prospect of trying to run Gnu EMACS on a "secure"/validated system (and I know the C code very well, worked on the parent it forked on for a couple of years. Which just happens to be James Gosling's first C code base with a bytecode interpreter :-).
One additional comment on "Worse is Better": Java is an unique? modern example of a "Right Way" system winning, so the "why" would be worth looking at. Ditto the story of Clojure's success, built on top of the JVM.
And, yeah, WRT to what seL4 provides, 9,000 lines of code, a fair number of them due to oddities of the hand translation from Haskell to C, isn't going to do much for you, I know it's just the start. But a porting project, and then getting it to do something (blink lights via GPIO or whatever) is for me a good way to start working my way up the stack, learn ARM, etc.
Thanks a lot for this discussion and giving me hope WRT to intermediate ways to address the web browser problem!
It's funny you mentioned the PC losering problem because he countered his own claim later (see p3):
https://www.dreamsongs.com/Files/worse-is-worse.pdf https://www.dreamsongs.com/Files/worse-is-worse.pdf
The other stuff you mention are good for the time. Extra props for getting work done in direction of LISP machines. I could see that I'd have enjoyed using that system besides the odd quirks you mentioned. Plus, the name of the network is way cooler than the other guys'. ;)
re Magnus/ML. I had CakeML in my collection but didn't know about Jitawa + Milawa. I remember skipping it seeing "verified lisp" in abstract while rushing through ACM/IEEE stuff and thinking "I already have VLISP so who cares." However, I appreciate your link because Milawa was a great find: an answer to the "Do you trust the prover?" question that people keep asking. Plus, Jitawa verifying a LISP and it were a nice combo. Knew Magnus was smart but that's extra smart.
Anyway, looking at your update, I see CakeML now has a verified compiler and other cool stuff. I might stop recommending FLINT except for diversity. CakeML seems to be the one to build on with VeriML too limited imho: a portable compiler & runtime is always better than an interpreter for Getting Shit Done (TM). So, I appreciate that link.
Your HOL work might be tricky. I'll be interested in hearing your experience later as it will inform how other software/systems people might fare. If it's difficult or even before you start, you might want to check out Chlipala's methodology here:
http://adam.chlipala.net/cpdt/ http://adam.chlipala.net/cpdt/
It's more like the FLINT style than HOL. He's produced many solid works with that. His site (link on top) also has interesting tools for various use cases: Bedrock (verified assembly), Ur/Web (correct-by-construction web apps), contribute to Ynot (writing/verifying imperative code), and so on. What they built with it is obvious from descriptions. Their pace has been faster than full verification groups while knocking out lots of errors. There's also more investment of academic brains into Coq theorem prover so each work might benefit from others.
Now, a link to help you with what you're actually doing. The seL4 work at some point referenced this book on using Isabelle/HOL for verification. Might be what you need to learn it all. I'd try it first. Stay on it if you're able to do real stuff w/ projects you referenced. Otherwise, backtrack to try Chlipala's methods.
http://concrete-semantics.org/ http://concrete-semantics.org/
re browsers. Yes, they're critical for reasons you mentioned. There's a simple solution, though, which I used for years: physical separation w/ KVM switches and guards for information sharing. The browser stuff runs in a PC that handles it. Most of key work or trusted data on other system. The content is translated to formats that make verification easier or at least where you have trusted programs. The guard mediates flow of data to ensure files move back and forth without attacks on memory or transport. It's built as strong you can make it. KVM and drag-n-drop software make it easier to use. Tenix's Interactive Link is an implementation that's very similar.
re Worse is Better & Java. I semi-agree. Java is a horrid platform that was successful for these reasons: (a) similarity to existing, mainstream languages, (b) tooling in form of IDE's + libraries, (c) perceived advantages, and mainly (d) massive money in marketing by huge, enterprise firm. So, the strategy worked. Google, Mozilla, and Apple are all using the strategy with effectiveness. One needs deep pockets plus major connections to consumers and industry, though. Meanwhile, Python and Julia are examples (for me) of The Correct Thing with enough traits to make them successful despite lack of millions in funding, widespread industry support, etc. So, there's that approach too. Still an open topic where I have no definite answer.
re seL4. Good luck on the ARM, kernel, and HOL learning projects. Will keep you busy for some time I imagine with make a few less hairs on your head after righting with hardware and kernel-level issues. ;)
"Thanks a lot for this discussion and giving me hope WRT to intermediate ways to address the web browser problem!"
You're welcome and thanks to you, too. It's been an interesting one. Do give me feedback on the Concrete Semantics and Isabelle stuff later so I can assess minimal level of talent that can use it.