Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 9y ago · link · parent

I'm sure it happens - my point is that it isn't relevant to microservices. Microservices allow multiple technology stacks, if dont properly, but it doesn't force it on anyone. If your developers are pushing code using a different programming language with no oversight there's an organizational issue.

That said, it's awesome that microservices let you use different tech stacks to solve different problems.

comment 9y ago · link · parent

Polyglot programming isn't "a fad" - it's something that microservices enable. That does not mean that developers make technical decisions in isolation.

If I were to introduce Haskell to my company there would have to be at least one other person interested in it and at least a few people who would be interested in learning it. I would never commit code using a new technology without discussing that with my manager.

comment 9y ago · link · parent

This is a totally nutty scenario. Microservices are not "do whatever you want!" - they give you the freedom to choose your stack. It is obviously still a business decision to choose Haskell and you've got other problems if developers are building things in random languages that they feel like using without a larger discussion.

The issue here isn't Haskell it's ownership and process.

comment 9y ago · link · parent

Yeah, the two weak points pointed out have always been weak points. It's unfortunate, but disabling autofill has always been my recommendation.

> Altogether it looks like LastPass is a lot better at PR than they are at security. Yes, that’s harsh but this is what I’ve seen so far. In particular, security vulnerabilities have been addressed punctually, only the exact scenario reported has been tested by the developers.

This seems unfair.

LastPass fixes the initial vulnerability punctually - we do not know what they will do in the future. Is it better for them to wait, come out with a defense in depth approach, and then patch? Seems silly.

Of course, how long do we wait? Historically, I would argue, LastPass has down defense in depth fairly well - when their was a breach they were quick to not only address the vulnerabilities immediately but soon after they rolled out Content Security Policy and HSTS, two technologies that were rarely deployed in the wild at the time (and are still sadly too rare).

My suggestion to LastPass users is to:

1) Enable 2FA 2) Up your PBKDF2 Rounds 3) Disable as many browser integration features as possible

I don't recommend dropping LastPass and trying to roll your own key-sync store with KeyPass/Dropbox as some have done. I don't know of any other browser-based password manager that isn't equally weak to attacks based on browser-integration.

Alternatively, don't use a browser-based solution. This is less convenient but you'll avoid by far the largest area of attack surface.

comment 9y ago · link · parent

> If.you have another metric please offer it.

Evaluating the security of a product is a fairly rigorous task with no clear, objective 'this one is strictly more secure' outcome possible.

> I have no reason to believe the metrics are biased.

I gave you multiple reasons why they could be based on a number of things. Not to mention that they seem flat out wrong - Chrome has dozens of security vulnerabilities patched every month. Maybe they don't create CVEs for all of them?

> Of course you're free to just take it on faith that Edge is more secure because Microsoft says so

I don't take it on their word. I have multiple reasons to believe that Edge is a pretty secure browser - I never said it is more secure than Chrome.

Here is a really solid post, that I felt was particularly unbias, by Justin Schuh, who works for (or is the head of? Can't remember) Chrome's security.

https://medium.com/@justin.schuh/securing-browsers-through-i...

As you can read, they both take fairly different approaches that are hard to compare objectively. Is a sandbox improvement more powerful than a new mitigation technique? Again, impossible to say. As Justin states, they're doing solid work though.

> that the CVE listings have no purpose being used as a comparison.

CVE has nothing to do with comparing the security of products and everything to do with notifying users of that products that they need to patch.

> But for me, without finding some other metric to compare by I'll use this metric until there's a better replacement

"I have no tools to compare, so I will use an arbitrary, incorrect tool to compare"

This is totally faulty logic. CVEs are not a metric for evaluating security and they were never intended for such a thing. If you want to actually evaluate software security it is a serious, real process that requires more discipline than saying "well some numbers that have no meaning should be good enough".

comment 9y ago · link · parent

Thunks are values that have yet to be evaluated. For example '3 + 3' could be represented as a thunk, and there's no cost other than memory because you have not computed '6'.

So you're skipping the cost of computation for a value you may never use, but you still have to represent the expression in memory somewhere. This can lead to large thunks building up, eating up memory.

comment 9y ago · link · parent

I didn't really understand what your question was, it sounded as if you were trying to imply the reason yourself.

I do not work for Microsoft, I have no insight into their decision making process. I doubt it has to do with security.

comment 9y ago · link · parent

> Saying 'you should have rewritten this in rust in order to avoid liability' is not a standard of care that anybody will ever be held to.

Why is 'you should not have exposed C code to the internet' an unreasonable basis for care?

I'm not saying your approach is wrong, I think they're not mutually exclusive - your solution would provide incentive to not use C in a technology agnostic way. But at some point isn't it just irresponsible to write critical infrastructure, or code that exposes user information, in a language that has historically been a disaster for security?

comment 9y ago · link · parent

My point is that not all bugs lead to data loss or loss of privacy. But yes, I agree.

That said, I feel that we're now talking about memory safety vs semantic safety.

We can certainly prove a program is entirely memory safe. Rust's type system is prove, so the work is then to prove the unsafe code safe (actively being researched).

There is no way to prove all semantics of a program (Rice's theorem). Therefor I would argue that a bug is due to a semantic issue is not necessarily negligent, whereas we could easily see memory safety issues from using C as a case of negligence.

But in terms of liability they would likely both fall into the same bucket.

comment 9y ago · link · parent

> I totally agree with that and have been a long time proponent of liability for damage caused by software bugs. But that would have to be all bugs, not just some classes of bugs.

Why? That goes against everything we've done to categorize bugs - we do not treat all bugs the same, and we would not consider all bugs to be due to negligence.

> D.

Only with a garbage collector or a 'safe' annotation. Rust has the opposite - a safe language by default.

> And by the way, rust is only 'memory safe' as long as you don't disable the safety mechanisms, so I think 'memory safe by default' would be a better way to describe it.

That's fine, memory safe by default is an acceptable way to refer to it. It's worth noting that I have written thousands of lines of rust code and never published code with a single line of unsafe. None of my projects have required it. So 'by default' is pretty powerful, since I've never ever needed to opt out.

comment 9y ago · link · parent

This seems like a strawman. "Rust prevents these bugs", "Oh, but Rust doesn't prevent all bugs!".

comment 9y ago · link · parent

> There are safer, better alternatives for almost everything we do. But economy dictates that we end up with a compromise. Rust would be just another compromise, slightly different stage, no huge difference and potentially a huge cost.

I think the argument is that the economics need to change. People need to stop being irresponsible - we need liability when someone is negligent, just like in any other engineering discipline.

> Silver bullets in software development do not exist, rust is no exception to this and the irrational hyping of rust as being a silver bullet actually has the opposite effect.

I keep seeing this, and yet I have not once seen anyone call it a silver bullet.

> Also, and this is another point of irritation with me, the rust community makes it seem as if theirs is the only language that will avoid this kind of bug, which is far from true, there are other platforms / languages with far wider adoption that have these traits as well.

Show me another language with no garbage collection, memory safety, C/C++ level performance that has been anything other than academic.

comment 9y ago · link · parent

There are many, many factors that need to be taken into account when asking "will this technology succeed" and only one of those factors is "is the technology good/ better than what exists now".

Familiarity is a huge one that impacts adoption. There's many other factors discussed.

In the book The Diffusion Of Innovation there are two great examples given.

The first is a health official trying to convince a town of people to boil their water in order to avoid infection. They utterly failed to convince anyone to do so because the concept of 'germs' was totally unfamiliar to these people, and the need to boil water conflicted with their cultural conception of the issue.

The other is dvorak - a keyboard layout that is, by some metric, objectively better than QWERTY. And yet adoption barely exists.

The reasons rust is not being used to replace C everywhere are many - Rust is young, many people do not want to learn rust, many people do not care about software security, rust has an unfamiliar syntax/ concepts in it, rust has a younger ecosystem, etc.

There is also the issue of liability in software. If I write an internet facing text-parser in C, and it's full of vulnerabilities, I am not liable. My negligence in technology choice (and I do consider it negligence) does not impact liability, unlike any other engineering discipline. So why change?

comment 9y ago · link · parent

You think that Edge is closed source to avoid more bugs being found, but Microsoft also pays 3rd party developers for finding bugs in Edge?

comment 9y ago · link · parent

Being critical and pursuing the issue is one thing. You can find lots of work on formally verifying rust code as well as it's type safety online.

comment 9y ago · link · parent

As I said above, CVE listings are a useless metric for measuring safety of a product. High # of CVEs can easily indicate a safer product with a more mature bug bounty program or an attitude of "Assume it's vulnerable, don't require full exploits to prove it".

There is no good information to be drawn from those two links.

comment 9y ago · link · parent

CVE listings are not a meaningful metric at all for security. What that could reflect is that Edge's bounty program is far more popular than Chrome's. It could mean that Edge is willing to hand out CVEs for uncomfirmed bugs whereas Chrome requires further proof (I am not saying this is the case at all, to be clear).

comment 9y ago · link · parent

> (excuse me, "unsafe Rust", as if that were a different thing)

They are - there is a world of difference between the two. From a security perspective the ability to audit unsafety explicitly is massive. Right now we rely on intuition and fuzzing at large scale to try to cover massive parts of a codebase. With explicit unsafety you can limit your checks to a subset of modules, rather than the entire program. Massive, massive difference that can not be understated.

> if Rust gains any genuine traction and widespread use it is very likely they'll exist "in the wild" and as exploits waiting to be discovered.

Naturally. But this certainly isn't worse than where we are now - where languages make 0 effort to be safe, or have far too much historic baggage to do it meaningfully.

Beyond that, rust's attitude towards security is pretty positive. Rust has been quick to adopt LLVM sanitizer support, fuzzer support for AFL and cargo-fuzz, and new mitigation techniques such as safestack. With rust's updates coming out quickly you get access to these in a matter of weeks/ months as opposed to years.

Rust isn't a cure-all, no one should be calling it one. But your response is overly pessimistic.

comment 9y ago · link · parent

I have two recommendations that anyone with a CS degree or equivalent knowledge should be able to jump into with 0 other training, and come out with a solid understanding of how to find vulnerabilities and exploit them.

* Hacking: The Art Of Exploitation

This is an excellent book. It's lab-oriented, so you will be getting hands-on experience with reverse engineering and exploiting software.

And: http://opensecuritytraining.info/

They have a graph of classes somewhere, and you can see "Oh I want to get to advanced exploitation, what should I take?" and you just follow along. Start with intro to x86, intermediary x86, then move on to the software vulnerability classes, life of a binary, etc.

Really, with only these skills alone, you can self-teach the rest of the way. There's a book called The Art Of Kernel Exploitation, if I'm remembering right, that would take you into a more advanced but more niche area, and it's really up to you where to go after you get the basis (just like with programming).

comment 9y ago · link · parent

Basically the VM is sandwiched between the host and parent OS. With a full VM you have a separate kernel. With containers, like Docker, you share a kernel.

The VM is then considered more secure because it adds that extra layer between them... but is it? It's just more code - more code, more problems.

The more effective solution is to simply harden the kernel of the host system, and then use a lighter solution like docker. Grsecurity + Docker seems like a solid fit to me, and you can mash another layer like Apparmor on top. It is very rare that I see a kernel vulnerability that would not be entirely mitigated by Grsecurity, or otherwise made far more costly.

The point is to stop adding layers on top and instead to focus on security that lower, trusted base.

comment 9y ago · link · parent

Actors + type safety is a huge selling point for Pony that, to my knowledge, no other language is really providing.

I'm definitely keeping an eye on it and I'm very excited to see its development continue.

comment 9y ago · link · parent

Hm. I wonder if this is configurable, or if there's an RFC open for this.

comment 9y ago · link · parent

That would this in rust: if number { true } else { false }

If it's the last expression it will implicitly return the values. Easily fits on one line.

comment 9y ago · link · parent

Yeah, I think SIMD will be the next big jump for these benchmarks. I also wish we could see clang used with the C/C++ cases.

comment 9y ago · link · parent

I would say that while Go is boring, it is worth learning. It may not be anything too new or interesting but it'll likely change how you think about programming at least a bit - concurrency and error handling in Go are particularly accessible while still being different enough to change how you think about the concepts.

I say that as someone who really isn't a fan of the language.

comment 9y ago · link · parent

I'm used to it I guess. Got &'a str all over my code.

comment 9y ago · link · parent

I bought this book and I've been using it - but I'm writing the interpreter in Rust instead of Go. I really like it, and I think Go is actually a cool language for this due to its simplicity. I had very little Go experience but the language is drop dead boring, incredibly easy to pick up.

I'd recommend it.

1
159160161
164