13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 9y ago · link · parent
I'm not a professional RE so my experience is limited, but when I went looking for vulns that's how I went about it, and I think that's generally the case.
With rust there's significantly less guesswork. That parser doesn't use unsafe? OK, let's start elsewhere. That seemingly innocent code uses unsafe? Great, check that out.
You can grep for vulnerabilities, basically.
comment 9y ago · link · parent
Yep, on some pages, on some benchmarks, it can go either way. I think this more brings Firefox to a competitive place, and shows the potential for the project Quantum - there's much more to come, webrender in particular.
> Both of those things can be counted in Chrome's favor as well.
Totally. Whether one browser is more secure than another is a complicated topic.
comment 9y ago · link · parent
General responsiveness is definitely something I consider when choosing any tool. 1%? I don't think that's a real number. It can be much faster, especially since this is just one of many-to-come improvements.
When you have lots of tabs open, lots of extensions, etc, pages can actually be quite slow to render. As webpages become more complex (I'm thinking about my company's web-app product) or as we start leveraging renderers for more than just web content, performance is more important.
Beyond that, given mobile devices low memory usage, strong energy requirements, and insane popularity, it makes sense to care about how well we utilize resources in our applications.
> FF had its selling point to power users which is why i'm currently browsing from ff.
"Power users" like to believe this, and they're certainly the loudest, but I don't think it's true. Most people are not power users, and I think it stands to reason that most Firefox users are not "power users". Many are just regular people using their browser to get to Facebook, a site that loads a huge a mount of content. Things like "I visited a website and got hacked, I hate firefox now" or "Ugh firefox hung on facebook" or "ugh instagram is taking forever to load" matter a lot to these users.
> Now there is no reason at all to use it.
Well, performance is one reason. Security could easily be another - as Firefox moves to a memory safe language we can expect to see lower critical bug rates. I know for a lot of the older people whose computers I've set up "I don't want to get viruses" is a huge ask from them. So moving your renderer to a memory safe language is a nice win there.
Most users extensions are likely to continue to work with the new Firefox. Maybe not the 'power users', who almost by definition are a minority, but most.
comment 9y ago · link · parent
I don't see how, at all, and you haven't addressed how this somehow makes the C++ developer different from an engineer.
I think your analogy is absolutely imprecise.
And the people on the bridge aren't going to care.
> If you forgot to initialise the variable before using it - it's your problem, not the problem of the language.
Wrong! It's very clearly not the developer's problem, because they don't take responsibility. It's the end user's problem, because they're the ones who get hacked.
> It is well documented, it is expected
Oh, please. As if any C++ developer can spot every instance of UB.
> it is there for a good reason
Is it? This is an unfounded statement. Is there ever a good reason to read from an uninitialized variable? It's UB, so it seems like the language is telling you explicitly that it is not a good idea. But the language gives you not way of formally verifying that you don't.
> And if you are running into this issue all the time, perhaps C++ is not for you.
Alternatively, perhaps C++ is not for any human, as it's clearly far too complicated to reason about.
comment 9y ago · link · parent
No.
Should the developers of C++ take responsibility? Or just the consumers of the language? Why is one different from the other?
This entire argument that the users of C++ are at fault for everything is absurd. Users suffer for it, and no one truly takes responsibility.
comment 9y ago · link · parent
* Most developers are not writing data structures, so optimizing for that seems unnecessary.
* There is work and research going into verifying unsafe code
* I think historically we can see that most memory safety vulnerabilities are not going to be in some lower level data structure, which is well encapsulated and likely already built by someone else, but in the use of that data structure. In particular - sharing references and also invalidating data safely without leaving references to that data. Rust helps you here, and this seems like the far better target.
* Even if your rust code uses unsafe, you still have benefits - you know where to audit for unsafety, you know where to pay extra close attention, and you can still write a large portion of your code in safe rust.
comment 9y ago · link · parent
Meaningless statement - 'fault' in these discussions is impossible to objectively attribute. Is every vulnerability the fault of the developer writing the code, or the tool that facilitated the code? Some would argue the former, some the latter.
The end result is the same - using these tools you can produce vulnerabilities, and your users get exploited all the same. So is fault really important?
> Writing a parser in a memory-safe language does nothing for it's correctness, as memory safety is not the only security problem. One should use a domain specific language, as simplicity is very important for safety.
You have two statements here - one is that memory safety is no the end of safety, one is that simplicity is important to safety beyond memory safety.
The first feels... weak. No kidding - security encompasses more than memory safety. But eliminating memory safety issues limits what you have to worry about.
As for simplicity leading to security, this isn't a supported argument. But as for encoding semantic security issues into your program (security issues outside of memory safety), I would argue a strong type system is the right way to go here, something Rust certainly provides.
> edit: Rust is the new systemd, full of fanboys pushing it forcefully on others (or, as they say, "gently nudging"). I have not much to say against rust itself (except that it is not for "systems programming"), but the fanboys are idiots.
blah blah blah, literally just vapor at this point, not worth addressing.
comment 9y ago · link · parent
The author of this post wants uncompromising safety, ragel does not allow for that - programmer error can introduce memory unsafety. They even explicitly call out Cloudbleed.
comment 9y ago · link · parent
It's not really like that - with reference counting you sort of have multiple 'owners' of a variable, and they all get to 'free' that memory except that 'free' just decrements a counter.
With rust there is a very clear owner at all points - you always know that your code in one spot owns the memory, and no other code does. There may be references handed out but those are very clearly distinct - that is, by looking at the code you can see "yes, I own this" or "yes, I'm borrowing this".
Now, with borrowing it's a little bit more like reference counting, but it's really just scope based. We know that the references are valid for some scope, and after that scope they are not. There's no internal counting or anything like that in the compiler as far as I am aware.