TaskShuffler++: Real-Time Schedule Randomization for Reducing Worst-Case Vulnerability to Timing Inference Attacks

Man-Ki Yoon, Jung-Eun Kim, Richard M. Bradford, Zhong ShaoarXiv 2019

Abstract

This paper presents a schedule randomization algorithm that reduces the vulnerability of real-time systems to timing inference attacks which attempt to learn the timing of task execution. It utilizes run-time information readily available at each scheduling decision point to increase the level of uncertainty in task schedules, while preserving the original schedulability. The randomization algorithm significantly reduces an adversary's best chance to correctly predict what tasks would run at arbitrary times. This paper also proposes an information-theoretic measure that can quantify the worst-case vulnerability, from the defender's perspective, of an arbitrary real-time schedule.

TL;DR

TaskShuffler++ is a schedule randomization algorithm designed to protect real-time systems from timing inference attacks by making task execution patterns unpredictable. It introduces a dynamic budgeting mechanism and a weighted job selection process that significantly increases "schedule min-entropy," a new metric proposed to quantify a system's worst-case vulnerability to an adversary’s predictions.

What Problem Does This Paper Address?

Real-time systems are defined by their determinism—tasks must meet strict deadlines. However, this predictability is a security liability. If an adversary can infer exactly when a sensitive task (like a cryptographic operation) is running, they can precisely time side-channel attacks or data injection attempts.

Previous attempts at "scheduling obfuscation," such as the original TaskShuffler, used static "priority inversion budgets" to introduce randomness. However, these static budgets are often too pessimistic, leading to "temporal locality"—periods where certain tasks are almost guaranteed to run because the scheduler ran out of "randomness budget" earlier. This leaves windows of predictability that a clever attacker can exploit.

Methods

The authors propose TaskShuffler++, which improves upon previous work through two main phases:

  1. Dynamic Candidate Selection: Instead of relying on pre-calculated static budgets, the scheduler performs a run-time "schedulability test" at every decision point. It calculates the "worst-case busy interval" to see if allowing a lower-priority task to run (a priority inversion) would cause any higher-priority task to miss its deadline in the future. If the system remains schedulable, the task is added to a list of candidates.
Priority inversion mechanism used to introduce schedule randomness.

This dynamic test accounts for the current state of the system, including "residue executions" of active tasks and the impact of "future releases" of higher-priority tasks within a specific look-ahead window. By using this real-time state information, TaskShuffler++ can reclaim "slack" that static analysis would otherwise ignore, significantly increasing the opportunities for randomization.

Parameters for the dynamic schedulability test used in TaskShuffler++.
  1. Weighted Random Job Selection: Once a list of candidate tasks is formed, the scheduler doesn't just pick one at random (uniform distribution). Instead, it uses weighted selection based on each task's "remaining utilization" (how much work it has left vs. how much time remains until its deadline).
  2. Approximate Algorithm: To reduce the computational overhead of the exact run-time test, the authors provide an $O(N^2)$ approximate version that uses "maximum slack" values calculated offline to simplify the online checks.

The paper also introduces Schedule Min-Entropy ($H_\infty$). Unlike standard Shannon entropy, which measures average uncertainty, min-entropy identifies the "weakest link"—the specific time slot where an adversary has the highest probability of correctly guessing the running task.

Key Insights and Ideas

  • Pessimism is the Enemy of Security: Static analysis must assume the absolute worst-case scenario for every task. By moving to dynamic, run-time analysis, TaskShuffler++ "reclaims" slack that static budgets would have wasted, allowing for more frequent and varied randomization.
  • Uniform Randomness is Not Optimal: Counter-intuitively, picking tasks with equal probability ($1/n$) can lead to predictability. If a task with a lot of work left isn't picked early, it eventually must run as its deadline nears, creating a deterministic window. Weighting tasks by their "urgency" (remaining utilization) spreads their execution more evenly across the available time, increasing overall uncertainty.
  • Min-Entropy as a Security Metric: The authors argue that for security, we care about the adversary's best chance to win. A schedule might look very random on average, but if it has one deterministic "leak" every hyper-period, it is vulnerable. Min-entropy captures this worst-case vulnerability.

Key Results

  • Eliminating Determinism: In the original TaskShuffler, over 92% of task sets in high-utilization scenarios had at least one deterministic time slot (zero min-entropy). With TaskShuffler++ Exact, zero task sets resulted in deterministic slots.
  • Higher Uncertainty: TaskShuffler++ significantly increased both standard schedule entropy and the more rigorous schedule min-entropy across all utilization levels compared to the baseline.
  • Efficiency: The "Approximate" version of the algorithm performed nearly as well as the "Exact" version in low-to-mid utilization scenarios while maintaining a lower computational complexity ($O(N^2)$), making it more practical for real-world implementation.
  • Context Switches: While randomization naturally increases context switches (by about 47% over non-randomized schedules), the authors show that TaskShuffler++ provides a much better "Entropy Per Switch" (EPS) ratio than previous methods.

Limitations and Future Work

  • WCET Dependency: The current run-time computations still rely on Worst-Case Execution Time (WCET) estimates. If actual execution times vary significantly from the WCET, the "weighted selection" can become slightly less effective at high utilizations because the scheduler overestimates how "urgent" a task is.
  • Overhead: While $O(N^2)$ is better than the exact test, it may still be too heavy for extremely high-frequency real-time systems with dozens of tasks.
  • Future Directions: The authors suggest investigating the "bandwidth" of covert channels that might still exist and exploring mutual information between task timings to further harden the system.

Summary updated

BibTeX
@misc{yoon2019taskshuffler,
  author = {Man-Ki Yoon and Jung-Eun Kim and Richard M. Bradford and Zhong Shao},
  title = {{TaskShuffler++: Real-Time Schedule Randomization for Reducing Worst-Case Vulnerability to Timing Inference Attacks}},
  year = {2019},
  eprint = {1911.07726},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.07726},
}
Figure