Section 18.5.14

Safety, liveness, availability, and continuity in plotted evidence

Definition

A safety property §1.11 says that something bad never happens, such as unauthenticated code running. A liveness property §1.12 says that something good eventually happens, such as every valid update being installed. Availability §1.10 means that authorized users obtain a stated service within a stated time, under stated load and failures. Continuity is availability followed through time: whether, and for how long, a service stops during an event such as an update. The difference that matters: one observed bad event refutes a safety property, but no finite observation refutes a liveness property.

Where it fits

Main entry: Safety property (§1.11).

The safety property entry, the liveness property entry and the availability entry give the formal definitions. This entry concerns what a plot of measurements can show about each of them. A plot shows a finite number of runs, each observed for a finite time, and that finiteness decides what each kind of property can draw from it.

A continuity plot, for example a plot of the longest gap between successive messages from a service during an update, must name four things: which service, for which users, over which interval and under which load. Each claim needs its own measurement. Ten uninterrupted read responses during an update do not show that the update itself made progress, and ten correct refusals of forged updates do not show that the read service stayed usable.

Downtime is an interval during which a stated service is not delivered to the users entitled to it. A claim of zero downtime, common for updates installed while a service keeps running, is meaningful only with three statements: which service, how its delivery is observed, and how long an interruption it tolerates. In an invented case, a sensor sends one reading every second, and during an update the readings pause: one arrives at 10 seconds and the next at 13 seconds, so the readings due at 11 and 12 seconds are missing. If the stated service is “the device keeps running and keeps its connection”, the update had zero downtime. If the service is “a reading at least every 1.5 seconds”, the 3-second gap is an outage of that service. Counting those 3 seconds as downtime within one hour gives an availability of (3600−3)/3600≈0.99917(3600 - 3) / 3600 \approx 0.99917, about 99.92%.

A fail-closed §1.13 design shows how safety and availability can part. Such a design denies a protected operation whenever it cannot complete its check. In an invented batch of 10 forged update requests, rejecting all 10 satisfies the safety property “no unauthenticated request activates code”. That observation says nothing about an eleventh, legitimate request. If an attacker keeps every checking resource busy with forged requests, the legitimate request can wait forever while the forged ones are processed, which is called starvation §9.18, and the safety property still holds. The attack is then a denial of service §1.28: an attack on availability.

Limits and common mistakes

A plot of measured latencies cannot establish a safety property for all runs, and it cannot prove eventual progress. Define the property first, then decide what the plot can test.

An availability fraction hides how outages are spread. One 3-second gap per hour and thirty 0.1-second gaps per hour both add up to 3 seconds, since 30×0.1=330 \times 0.1 = 3, and so give the same fraction, yet a user experiences them differently.

Zero downtime of one service says nothing about another service on the same device.

A gap still open when the observation ends is cut short by the window, so the longest gap a plot shows is a lower bound on the true longest gap.

Questions answered

Can a fail-closed design violate availability?

Yes. A fail-closed design, one that refuses a protected operation whenever it cannot complete its security check, can violate availability, the guarantee that authorized users obtain the service they need in time. It does so in two ways. First, by design: when the check cannot complete, for example because a key is unreadable or the check times out, legitimate requests are refused along with forged ones. Second, under attack: an attacker who can make the check fail, or who keeps the checking resources busy with forged requests, turns the refusals into a denial of service.

Throughout, the safety property that the design protects, such as “no unauthenticated code runs”, can still hold. Safety and availability are separate properties with separate evidence: ten correct refusals show safety in those ten cases and say nothing about whether legitimate users were served. A fail-closed design should therefore state which services stay available while it refuses, for example that the device keeps running its current version, and should limit how much of its resources forged requests can consume.

Related entries: Liveness property (§1.12), Availability (§1.10), Fail closed (§1.13), Denial of service (DoS) (§1.28), Starvation (§9.18).