Covert ChannelsFiducia Example

NRL Pump

A probabilistic downgrader that buffers, reorders, and adds timing jitter to messages crossing security boundaries. Same topology as a data diode, but with active timing channel mitigation that defeats covert channels simple diodes leave open.

System Topology — Timing Channel Mitigation
  +----------------+                              +----------------+
  |  domain_high   |                              |  domain_low    |
  |   (pri 100)    |                              |   (pri 100)    |
  +-------+--------+                              +--------+-------+
          |                                                |
     high_to_pump                                    pump_to_low
      (write only)                                   (read only)
          |                                                |
          +-------------------+    +-------------------+---+
                              |    |
                     +--------+----+--------+
                     |      nrl_pump        |
                     |  (trusted, pri 200)  |
                     |                      |
                     |  [batch: 4 msgs]     |
                     |  [Fisher-Yates]      |
                     |  [random jitter]     |
                     +----------------------+

  HIGH ---> LOW only.  Timing correlations broken by
  batching, reordering, and pseudo-random delay.
3
Protection Domains
2
Memory Regions
2
Channels

Security Properties

seL4 Microkit + C

The system description is identical in topology to a data diode. The pump logic — batching, reordering, and jitter — lives entirely within the nrl_pump protection domain's C implementation.

System Description nrl_pump.system
<?xml version="1.0" encoding="UTF-8"?>
<system>
    <memory_region name="high_to_pump" size="0x1_000" />
    <memory_region name="pump_to_low" size="0x1_000" />

    <protection_domain name="domain_high" priority="100">
        <program_image path="domain_high.elf" />
        <map mr="high_to_pump" vaddr="0x4_000_000" perms="rw" setvar_vaddr="outbox_vaddr" />
    </protection_domain>

    <protection_domain name="nrl_pump" priority="200">
        <program_image path="nrl_pump.elf" />
        <map mr="high_to_pump" vaddr="0x4_000_000" perms="rw" setvar_vaddr="inbound_vaddr" />
        <map mr="pump_to_low" vaddr="0x5_000_000" perms="rw" setvar_vaddr="outbound_vaddr" />
    </protection_domain>

    <protection_domain name="domain_low" priority="100">
        <program_image path="domain_low.elf" />
        <map mr="pump_to_low" vaddr="0x4_000_000" perms="rw" setvar_vaddr="inbox_vaddr" />
    </protection_domain>

    <channel><end pd="domain_high" id="1" /><end pd="nrl_pump" id="1" /></channel>
    <channel><end pd="nrl_pump" id="2" /><end pd="domain_low" id="1" /></channel>
</system>
Key Code Highlight nrl_pump.c
#define BATCH_SIZE 4

static msg_t batch[BATCH_SIZE];
static int batch_count = 0;

/* Fisher-Yates shuffle to destroy ordering correlations */
static void shuffle_batch(void) {
    for (int i = BATCH_SIZE - 1; i > 0; i--) {
        int j = prng_next() % (i + 1);
        msg_t tmp = batch[i];
        batch[i] = batch[j];
        batch[j] = tmp;
    }
}

void notified(microkit_channel ch) {
    if (ch == HIGH_CH) {
        batch[batch_count++] = read_msg(inbound_vaddr);
        if (batch_count == BATCH_SIZE) {
            shuffle_batch();
            add_jitter(prng_next() % MAX_JITTER);
            for (int i = 0; i < BATCH_SIZE; i++)
                write_msg(outbound_vaddr, batch[i]);
            microkit_notify(LOW_CH);
            batch_count = 0;
        }
    }
}
Full implementation available on request. Contact us at alex.potanin@anu.edu.au.
VS
Fiducia Specification

Same topology as the data diode, with batching in the process.

The pump's topology is the data diode's: HIGH → PUMP → LOW over two one-way channels. What differs is the pump's program. It stashes each message, and when a batch is full it shuffles the batch, waits a random delay, and releases every message. Shuffling and jitter are C computation events; the batching loop is the process Flush.

System Declarationnrl_pump.fis
// NRL Pump: domain_high → nrl_pump → domain_low, one-way High → Low.

struct Msg {
    length: uint32;
    offset: uint32;
}

const BATCH_SIZE: uint = 4;

High MemoryRegion high_to_pump(0x1000);
Low  MemoryRegion pump_to_low(0x1000);

ProtectionDomain domain_high(100, 33);
ProtectionDomain nrl_pump(200);
ProtectionDomain domain_low(100);

Chan h2p = domain_high --> nrl_pump via high_to_pump<Msg>;
Chan p2l = nrl_pump --> domain_low via pump_to_low<Msg>;

System = domain_high ||| nrl_pump ||| domain_low;
Pump Processnrl_pump.fi
// Collects BATCH_SIZE messages, shuffles them, waits a random delay,
// then releases the whole batch to Low.
import "include/pump.h" as pump;

full: bool;   // the batch holds BATCH_SIZE messages
out: Msg;     // the next message to release

@bind(microkit.init)
proc Init() {
    seed -> Skip;
}

@bind(microkit.notified)
proc Notified() {
    h2p?msg -> stash.msg -> Release();
    Notified();
}

proc Release() {
        [full] shuffle -> jitter -> Flush()
    [] [!full] Skip;
}

proc Flush() {
        [pump.pending() > 0] take -> p2l!out -> Flush()
    default Skip;
}

evt seed: pump.prng_seed();

evt stash.|msg: Msg|: full = pump.stash(msg);

evt shuffle: pump.shuffle_batch();   // Fisher–Yates

evt jitter: pump.add_jitter();

evt take: out = pump.take();

What fic checks: each channel's ring is mapped into its two endpoints and nowhere else; a High region is never mapped at Low, so data cannot flow from High to Low through a mapping; every channel is one-way (-->) and the channel graph has no cycle (WF2), so no path leads back from domain_low to domain_high; and each Notified handler starts with a receive. Labels are checked on mappings, not on values: fic decides where data can go, while what the imported C does to it is the C code's job (here, the shuffle and the jitter).

Both files pass fic --check. Install fic or read the language reference.