Categories
operating systems software security

future of the data center

This article from Ars Technica discusses a talk over the summer by Merrill Lynch’s chief technology architect, Jeffrey Birnbaum on “stateless cloud computing” – most concretely on distributed file systems.

Birnbaum believes that one of the key foundational elements of a stateless computing environment is a networked storage system that enables ubiquitous availability of software. The file paths of the individual applications should be based on clearly defined nomenclature, much like the domain of a web site. All application dependencies should be accessible through the network filesystem, and version numbers should be expressed with the path nomenclature.

Big distributed file system – sure. Why should version numbers be expressed with the path nomenclature (a Plan9 idea, btw)?  Now we go on to the ancient problem of caching distributed data.

The obvious challenge posed by rolling out worldwide network storage infrastructure is scalability. If everyone in a global organization is depending on a network storage solution, then it needs to be fast and consistently reliable. The solution that Birnbaum proposes is regional mirroring and caching. The storage system would be universally synchronized between mirrors that have all the data. Caching can also be used at individual facilities to further improve performance. To achieve this kind of global scalability, he says, the best approach is similar to that of Akamai.

So even with a non-globally distributed file system, the problem of shared access is non-trivial. A global file system makes things quite challenging. Suppose we have a file recording trades and the Singapore, London, NY, and Espanola main offices all are reading and writing at the same time. Caching and cache coherency is an utter nightmare.  Akamai, like Google, solves the problem of massive amounts of distributed data by focusing on “delivery” – otherwise known as “read only content” or “many readers one writer” and with no requirement for true synchronization.  But the ML problem is more difficult even if we ignore multiple writers because, presumably, you want Singapore to actually see every trade made in Espanola even though for Akamai, it’s ok if the cache is not fresh. How to solve multiple readers and writers is something else as well.

These concepts don’t cover a whole lot of new ground yet. Much of this was already possible with conventional thin-client systems. The point at which it becomes immensely valuable, according to Birnbaum, is when all of these technologies are used together with virtualization to abstract the processes away from the hardware. Once this is done, individual operations can seamlessly float around data centers and balance out in a manner that offers a more optimal level of resource utilization.

And this seems to me to gloss over the even harder problem. Imagine a serious Oracle application “seamlessly floating” from some set of machines in one data-center to another set.  I can’t imagine how that works. Imagining little jobs floating is easier, but is that really an interesting problem? And this brings us to the most interesting claim:

He claims that 61 percent of a company’s enterprise server capacity goes completely unused and proposes an automated load balancing solution—

SIXTY ONE PERCENT!  Think of the power use.

Categories
software business software security

Sorcerers apprentice at ATT: Security and privacy and reliability collide again

AT&T considers reading all the packets that cross its lines. Quite an interesting proposal. Tim Wu’s take


The prospect of AT&T, already accused of spying on our telephone calls, now scanning every e-mail and download for outlawed content is way too totalitarian for my tastes. But the bizarre twist is that the proposal is such a bad idea that it would be not just a disservice to the public but probably a disaster for AT&T itself. If I were a shareholder, I’d want to know one thing: Has AT&T, after 122 years in business, simply lost its mind?

The inspiration for Tim Wu’s article is a discussion described in NY Times.


“What we are already doing to address piracy hasn’t been working. There’s no secret there,” said James Cicconi, senior vice president, external & legal affairs for AT&T.

Mr. Cicconi said that AT&T has been talking to technology companies, and members of the M.P.A.A. and R.I.A.A., for the last six months about carrying out digital fingerprinting techniques on the network level.

“We are very interested in a technology based solution and we think a network-based solution is the optimal way to approach this,” he said. “We recognize we are not there yet but there are a lot of promising technologies. But we are having an open discussion with a number of content companies, including NBC Universal, to try to explore various technologies that are out there.”

It’s doubtful that anyone at AT&T has raised serious concerns about the civil liberties implications of such technology, and I’d be surprised if there was not some happy contemplation of all the marketing data that could be gathered – but the security implications are also interesting. AT&T is essentially contemplating a universal “man-in-the-middle” assault on the internet communications of all of its customers. Bob sends a message to Sue and the message gets opened in some network center between the two of them, inspected, read, logged, and possibly decrypted (because, surely, they have anticipated that the evil file sharers will use encryption). The logs and saved copies are immediately interesting targets for hackers. The data itself is tempting for ATT to abuse – or for enterprising employees to privatize (of course, we assume there will safeguards as elaborate as those banks use to protect themselves against rogue traders!). The snooping devices on the network are interesting targets. The presence of such devices will introduce timing quirks that are identical to those produced by free-lance man-in-the-middle attackers. In fact, the very idea is a gold-mine of potential security, shall we say, limitations.

As a digital content creator, I have a problem with piracy. I do not want people to be copying the proprietary software I create and circulating copies without paying me. I don’t want people copying the open-source software I create without putting the appropriate copyright statements and notices on the copies. I am not one of the “free information” utopians who long for a glorious future in which software developers can sell T-shirts and pass the hat to make a living. But many of the worst types of engineering failures are caused by the “sorcerers apprentice” or “neglected off-switch” error. Good system designers wrestle with trade-offs – reliability and features versus speed, power consumption versus computing power, size versus heat, and so on. They are acutely conscious of the possibility that a fix may itself introduce a new problem: “Solving” the problem of unlicensed material passing over a network by ripping a giant gaping hole in network security is, to put it mildly, not good system engineering.

Categories
operating systems software security

what do we got to verify in an os?

From comments below.

Just one more comment: I think we should make a distinction between a tool that can verify threaded code and a tool that can verify the code that implements threading. The latter is what you are looking for here and it is much more difficult. Furthermore it is arguably unnecessary — a reasonable engineering solution is to get someone really good to write the dispatcher/scheduler and then focus verification effort on the mountains of code written by the rest of us that run on top of that core functionality.

I’m not so sure about that. The example below uses threading primitives – it does not implement them. We could even look at a more academic example and see the same problem.

threadA:
    while(1){
                  x = x+1;
                  sem_post(&z);
                  sem_wait(&t);
                  y = y+1;
   }
}
threadB:
   while(1){
       y = y+1;
       sem_post(&t);
       sem_wait(&z);
       x = x+1;
     }

My 20 second inspection tell me this ultra-simple example is right (which means it may have 100 errors). Prove it without having enough machinery to do the code below.

Categories
operating systems software security

Happy new year and validation

Updated below!

Years ago I proposed the following code snippet as a minimal standard for a useful verification method. Still not quite there.

/* you are not expected to understand this */
if(save()){
          load_memory_management(); /* map in new current */
          return;
}else {
         current = new;
        resume();
        panic("RESUME RETURNED! KERNEL BROKENn");
}

Not so complicated, but if you can’t do this, you cannot handle operating systems at all- or any threading.

In response to the comment. This is a paraphrase of Dennis Ritchie’s  Unix switch code and comment.  “Save” saves the registers and the return address for “current” and always returns 0. “Resume” restores the saved registers and return address for current (by doing so, changes stacks) and returns 1 – to that saved return address which is the test of the “if”. So the “if” statement is always evaluated as false when saving and is always evaluated as true when resuming and “resume” never returns to the else.  I always took Ritchie’s comment to be a warning that the code and the previous comments were not easy to understand. The state change here is basic thread switching but it is slippery.

Categories
operating systems software security

formal methods considered harmful and more on soft real-time

[fixed a couple of typos, Dec. 20 2007]

John Regehr writes:

On the other hand, there is plenty of useful work to be done on supporting time sensitive applications (I’ll just avoid saying “soft real-time”) even when no guarantees are made. Let’s take the example of an OS that disables interrupts when any process is executing inside the kernel. This is not hypothetical, I was recently talking to people designing such an OS because they are formally verifying it; they did not believe they were capable of verifying an OS that accepts interrupts more liberally. Anyway, needless to say the average-case response time to interrupts of this OS will suck. Now if we have some breakthrough in verification that permits interrupts to be accepted most places in this kernel, average case responsiveness will improve though worst-case may
not. Is this useless? Of course not, if it makes it possible to watch videos or listen to music or similar, on this OS. For applications of this kind a mathematical guarantee is simply overkill and what we really care about is more like “works almost all of the time in practice, given actual workloads.”

This is perfectly reasonable, in fact, there are many interesting properties of operating systems that are not real-time properties at all if we define real-time properly so that it does not end up meaning “any performance properties.” What’s unreasonable is this idea that crippling a piece of software to make it possible to “prove” that it “works” gains much of anything. That story about the drunk looking for his keys under the light-post is supposed to be a joke, not a design methodology. It’s fine to argue that by simplifying a system one can validate it while not losing too much performance or functionality for the purpose – but all too often the second part of the argument is omitted. What is the point of a system that is provably “correct” at a performance level that assures it cannot be used for its ostensible purpose? Worse, this methodology is often used in order to make it possible to apply “mathematical” methods which have not been ever shown to be more reliable than testing or code reviews or even good luck charms (the claim that “formally validated code is better than other code is, at best, unproven).

The phrase “mathematical guarantee ” is worth some deeper analysis.

  • Mathematical. The types of “hard specifications” that I am advocating do not need to be overly “mathematical” and certainly don’t need to be “formal” to be useful. On the contrary. The “formal methods” advocates have made a fetish of formalization to the detriment of useful engineering specification and that causes people to shy away from attempting to be more precise. What we want from a specification, at minimal, is that it should be falsifiable. Perhaps an incremental approach to adding fast paths to operating system services to reduce interrupt latencies can make the system described above “more responsive” for “standard workload”. If so, we should be able to characterize “more responsive” in some falsifiable way. If the specification is just “there is no wall-clock observable delay on the echoing of typed characters while stress program S runs in the background and a tester types a file in the ed program” or that “programs A,B, and C start within 5 seconds of double clicking the icon” then it is at least a falsifiable specification and is a concrete goal for the software developer. In any case, we can see that “average” is not what is needed, since “average” implies that if the system runs for 1 hour, a 5 minute total stop can be amortized away by 55 minutes of high speed operation. Perhaps what we want is as simple as “the video player on an otherwise unloaded system will not stop more than 10 seconds cumulatively over a one hour period where stops are delays in frame display that are over 1/60th of a second.” But this “soft” real-time requirement carries a real-time property with it – as argued previously.
  • Guarantee. There is a difference between a design guarantee and an evaluation guarantee. A TCP/IP network stack is designed to produce an in-order, reliable, stream of data between sender and receiver. But it is possible that in some situations, under some loads and with some definition of “reliable”, a simple datagram stack can produce the same property. The TCP/IP stack is designed to guarantee a property that the simpler stack may be shown to have in some circumstances. An evaluation guaranty is an attempt to show that a system has some property. One of the most useful ideas in Common Criteria is the evaluation assurance level (EAL) which is supposed to indicate the reliability of such a guaranty. One might find “we ran it a couple of times and it looked good” to be less or more reassuring than “we produced a 300 page document that strenuously exercised the symbol production features of LaTex” but these are both “evaluation guarantees”. Note that design guarantees should be backed up by evaluation guarantees that the design is correct and implemented correctly.

“Real-time software” normally refers to software that offers design guarantees on latency and scheduling times, data rates, or other time sensitive operations. Validating that the design succeeds requires some combination of testing, mathematical proof, and design and code review. But we may also be able to validate real-time properties of code that has no design real-time properties at all. One could take an instance of a LAMP stack (Linux + Apache + MySQL + PHP) and subject it to extensive testing on a particular hardware platform and observe that in practice it satisfies a real-time specification. Suppose our measurements show that all pages of a certain limited complexity will be “served” within 1 second over a 1GB network that is reserved for the LAMP system and where requests are at a rate bounded by R and there are no more than 30 seconds cumulative failure on this property over 1 hour. That’s a falsifiable, concrete, real-time specification – mathematical, even [this is in response to a note from B., a very knowledgeable system designer who may or may not be quotable].

Categories
operating systems software business software security

OpenBSD developer notes king’s clothing is “virtual”

Theo de Raadt explains why virtualization does not improve security. How about this: to improve security, you have to have a secure design, a marketing buzzword won’t do the trick. Anyone who has seriously looked that the current generation x86 virtualization hardware knows that it does not provide clean separation or levels of security. It is possible, with great care, to use it in a way that improves some types of security, but mostly it seems like a way of justifying the use of SUV monster servers.

If you look at Xen code, for example, you can see that it copies huge chunks of Linux. The argument seems to be that if Linux does not have security and fails to efficiently allocate resources, Linux+ModifiedLinux will do a better job, somehow. There’s no reason to believe this will happen and many reasons to believe that it will, in fact, make security more elusive. That’s not to either argue against virtualization as a useful technique: our RTMS uses a type of virtualization and we have a lot of customers who love VMWare, but the hype-ervisor is disconnected from reality. The delusion that making arbitrary divisions in software can reduce complexity is a persistent one, but it has no basis.

Categories
operating systems software business software security

universal machinery

If even 20% of what Peter Gutman says is so, then I’ve been optimistic in my assessement of DRM.

Categories
software security

Notes on unintended security effects

I’ve been complaining about the security implications of DRM and “trusted computing” and “safe boot” for some time now. Susan Landau points out that the expansion of wiretapping has the same effect.

Such threats are not theoretical. For almost a year beginning in April 2004, more than 100 phones belonging to members of the Greek government, including the prime minister and ministers of defense, foreign affairs, justice and public order, were spied on with wiretapping software that was misused. Exactly who placed the software and who did the listening remain unknown. But they were able to use software that was supposed to be used only with legal permission.

The story is that the Greek phone system equipment provided by Erricson and managed by Vodaphone had a feature that was supposed to allow the police to tap phones. Someone who apparently was not the police found a way to use the feature and to hide traces for years. There is a good summary in the IEEE Spectrum. Landau’s point is that privacy and data security can’t just be waived for “bad guys”. Once set up the infrastructure to allow the police/NSA/whatever to listen in on any calls, even if we assume that they will only use their powers wisely and with restraint, others can make use of the same infrastructure. There is no assurance that the government will only listen to wiretaps to deter terror, no assurance that the mechanisms that open our calls to the government’s ears will only be used by the government (or authorized parts), and no assurance that DRM will only forbid use of unlicensed music.

See also here.

Categories
operating systems software security

Security cannot be improved by waving flags

Via Schneier comes a story about the US Navy and a disgruntled contractor who just plead guilty:

He confessed to programming malicious software codes into computers that track Navy submarines in May 2006 while in Naples. He told Navy investigators that he was upset that his company’s bid on a project was passed over. Sylvestre had fled Italy after he entered the codes.

The guilty party, one Richard Sylvestre, was a sys-admin at a US Navy System based in Naples Italy and he had a top-secret security clearance. So, without being to crass about it, the sales pitch about security as a property of who works on the software is once again shown to be simply ridiculous – see my old note on the subject. Security is a reliability issue that needs to be addressed in design and administration procedure. The network that was hacked was too trusting of its operators and the people who were responsible for administering the sys-admins were not doing their jobs.