News for hackers. Stuff that matters.
Re:A Crash Course on ML Modules (2015) by skybrian on Sunday February 25, 2018 @02:36PM (#16460712)
Good point! But leaving types aside, the same argument applies. "Observable semantics" seems to mean "observable according to our semantic model" which is an agreement to pretend that machine behavior outside the model isn't observable and avoid relying on it.

This agreement is normally a good thing since it's what allows for the same program to run on different machines, or to compile the same program with different optimizations, or swap in a newer version of a library with a better hash function and claim it doesn't break backward compatibility.

Nevertheless, it can be a blind spot as we saw with Meltdown and Spectre, so I wanted to emphasize that this is a useful myth but the world isn't obliged to go along with it. It's often important to observe program behavior that isn't specified by the language.

Re:A Crash Course on ML Modules (2015) by Drup on Sunday February 25, 2018 @02:46PM (#16460765)
Ah, yes, This is where safety and security differs! Abstraction is about safety: preventing errors and giving additional guarantees, not preventing attacks. :)

Nothing I said hold when people are being malicious: Even in OCaml, you have escape hooks that allows you to break past abstraction boundaries and do whatever you want.

Re:A Crash Course on ML Modules (2015) by nickpsecurity on Sunday February 25, 2018 @06:10PM (#16461768)
There's work to address that. Look into proof-carrying code and "fully-abstract compilation." There's also been proofs done for hardware and assembly against specs in ACL2 and Abstract, State Machines.
Re:A Crash Course on ML Modules (2015) by skybrian on Sunday February 25, 2018 @03:08PM (#16460893)
Agreed, but this is where our own jargon betrays us: in ordinary usage by non-programmers, "safety" includes safety from attacks. Perhaps especially from attacks?
Re:A Crash Course on ML Modules (2015) by Tomte on Sunday February 25, 2018 @03:20PM (#16460958)
Ordinary usage is often murky, but the usual distinction between security and safety is not whether it is about an attack, but about the direction of the threat.

Safety means the environment is not harmed by the system. Security means the system is not harmed by the environment.

Re:A Crash Course on ML Modules (2015) by nickpsecurity on Sunday February 25, 2018 @06:07PM (#16461759)
That's an interesting definition. Traditionally, we had several ways of looking at it:

1. Safety contends with accidents like components breaking. Security contends with malice where input is crafted and failures are set up intelligently to do damage unlikely to happen on accident. There's quite a bit of overlap, though.

2. If talking leaks, safety rarely requires confidentiality of data. It's usually integrity or availability that it shares with security. So, a security violation with covert/side channels might not be a safety violation.

Just two off top of my head to illustrate the difference.

Re:A Crash Course on ML Modules (2015) by lmm on Monday February 26, 2018 @09:09AM (#16465304)
I think of it the same way you'd think of it in a workshop: a "safe" drill or saw is one that can be used in a safe way, not one that's safe from deliberate attacks.