[Paper Review] A Compiler Assisted Scheduler for Detecting and Mitigating Cache-Based Side Channel Attacks
Biscuit is a compiler-assisted scheduler that detects and mitigates cache-based side-channel attacks in multi-tenancy server environments by inserting cache-miss beacons at loop entrances to predict and monitor cache behavior. It achieves 100% F-score for detecting Prime+Probe, Flush+Reload, and Flush+Flush attacks with under 6% overhead in normal operation and under 11% during attacks.
Side channel attacks steal secret keys by cleverly leveraging information leakages and can, therefore, break encryption. Thus, detection and mitigation of side channel attacks is a very important problem, but the solutions proposed in the literature have limitations in that they do not work in a real-world multi-tenancy setting on servers, have high false positives, or have high overheads. In this work, we demonstrate a compiler guided scheduler, Biscuit, that detects cache-based side channel attacks for processes scheduled on multi-tenancy server farms. A key element of this solution involves the use of a cache-miss model which is inserted by the compiler at the entrances of loop nests to predict the cache misses of the corresponding loop. Such inserted library calls, or beacons, convey the cache miss information to the scheduler at run time, which uses it to co-schedule processes such that their combined cache footprint does not exceed the maximum capacity of the last level cache. The scheduled processes are then monitored for actual vs predicted cache misses, and when an anomaly is detected, the scheduler performs a search to isolate the attacker. We show that Biscuit is able to detect and mitigate Prime+Probe, Flush+Reload, and Flush+Flush attacks on OpenSSL cryptography algorithms with an F-score of 1, and also to detect and mitigate degradation of service on a vision application suite with an F-score of 0.9375. Under a no-attack scenario, the scheme poses low overheads (up to a maximum of 6 percent). In the case of an attack, the scheme ends up with less than 11 percent overhead and is able to reduce the degradation of service in some cases by 40 percent. With these many desirable features such as an ability to deal with multi-tenancy, its ability to detect attacks early, its ability to mitigate those attacks, and low runtime overheads, Biscuit is a practical solution.
Motivation & Objective
- Address the lack of practical, low-overhead solutions for detecting and mitigating cache-based side-channel attacks in real-world multi-tenancy server environments.
- Overcome limitations of prior solutions, such as high false positives, high runtime overhead, and inability to scale in shared infrastructure.
- Enable early detection and mitigation of both key-extraction attacks (e.g., Flush+Reload) and degradation-of-service (DoS) attacks using compiler-inserted runtime monitoring.
- Ensure high detection accuracy while maintaining low performance overhead through precise cache footprint prediction at loop-level granularity.
Proposed method
- Insert compiler-generated 'beacons'—cache-miss prediction functions—at loop nest entrances to estimate runtime cache misses based on loop bounds.
- Use the beacon data to guide a scheduler that co-allocates processes to minimize combined cache footprint, ensuring it stays within last-level cache (LLC) capacity.
- Monitor actual vs. predicted cache misses during execution to detect anomalies indicating potential side-channel attacks.
- Trigger an isolation procedure upon anomaly detection to identify and mitigate the attacker process.
- Leverage loop-level cache-miss modeling to achieve zero false positives by precisely predicting expected cache behavior.
- Integrate with existing OS scheduling and virtual memory isolation to operate in real-world multi-tenant server farms without requiring hardware changes.
Experimental results
Research questions
- RQ1Can a compiler-assisted scheduler detect cache-based side-channel attacks with high accuracy in a real-world multi-tenancy server environment?
- RQ2How can precise loop-level cache-miss prediction reduce false positives in side-channel detection?
- RQ3What is the runtime overhead of integrating such a detection and mitigation system in normal and attack scenarios?
- RQ4Can the scheduler effectively co-schedule processes to prevent cache-based side-channel leakage while maintaining performance?
- RQ5To what extent can the system mitigate degradation of service caused by cache-based attacks?
Key findings
- Biscuit achieves an F-score of 1.0 in detecting Prime+Probe, Flush+Reload, and Flush+Flush attacks on OpenSSL cryptographic workloads.
- For a vision application suite, Biscuit detects degradation-of-service attacks with an F-score of 0.9375.
- In normal (no-attack) scenarios, Biscuit incurs a maximum overhead of 6%, making it suitable for production deployment.
- During active attacks, the overhead increases to a maximum of 11%, which remains acceptable for most workloads.
- Biscuit reduces service degradation by up to 40% in some benchmarks during attack scenarios, demonstrating effective mitigation.
- The use of compiler-inserted beacons enables zero false positives by accurately modeling expected cache misses based on loop bounds and runtime values.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.