Sync+Sync: A Covert Channel Built on fsync with Storage

Qisheng Jiang,Chundong Wang
2024-06-19
Abstract:Scientists have built a variety of covert channels for secretive information transmission with CPU cache and main memory. In this paper, we turn to a lower level in the memory hierarchy, i.e., persistent storage. Most programs store intermediate or eventual results in the form of files and some of them call fsync to synchronously persist a file with storage device for orderly persistence. Our quantitative study shows that one program would undergo significantly longer response time for fsync call if the other program is concurrently calling fsync, although they do not share any data. We further find that, concurrent fsync calls contend at multiple levels of storage stack due to sharing software structures (e.g., Ext4's journal) and hardware resources (e.g., disk's I/O dispatch queue). We accordingly build a covert channel named Sync+Sync. Sync+Sync delivers a transmission bandwidth of 20,000 bits per second at an error rate of about 0.40% with an ordinary solid-state drive. Sync+Sync can be conducted in cross-disk partition, cross-file system, cross-container, cross-virtual machine, and even cross-disk drive fashions, without sharing data between programs. Next, we launch side-channel attacks with Sync+Sync and manage to precisely detect operations of a victim database (e.g., insert/update and B-Tree node split). We also leverage Sync+Sync to distinguish applications and websites with high accuracy by detecting and analyzing their fsync frequencies and flushed data volumes. These attacks are useful to support further fine-grained information leakage.
Cryptography and Security,Operating Systems
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to explore how to use the `fsync` system call to establish a new covert channel on persistent storage devices (such as solid-state drives) for secret information transmission. Specifically, the paper addresses the following key issues: 1. **Discovering and constructing a new covert channel**: - The paper reveals a time-based covert channel established through the `fsync` system call at the persistent storage layer, named "Sync+Sync." - This covert channel does not require the sender and receiver to share any data; it only needs to run on the same storage device to achieve communication. 2. **Quantitative performance evaluation**: - Through experimental validation, the Sync+Sync covert channel can achieve a data transmission bandwidth of 20,000 bits per second with an error rate of approximately 0.40%. - Additionally, Sync+Sync is effective in various scenarios, including cross-partition, cross-file system, cross-container, and cross-virtual machine environments. 3. **Side-channel attacks**: - Using Sync+Sync to implement side-channel attacks can accurately detect database operations (such as inserts, updates, and B-tree node splits). - By analyzing the frequency and data volume of `fsync` calls from different applications and websites, it can distinguish between different applications and websites with high precision. - It can also perform keyboard input attacks to identify sensitive information entered by users. 4. **Concealment and defense**: - Due to the ubiquity and necessity of `fsync`, it is difficult for attackers to be detected. - Defending against Sync+Sync attacks is not easy, as existing technologies (such as fast commit) still have vulnerabilities. In summary, this paper mainly explores how to use the `fsync` system call to establish a covert communication channel at the persistent storage layer and demonstrates its effectiveness in practical applications and its potential security threats.