TL;DR
This paper tackles the significant performance overhead of the Linux Audit system, a crucial tool for system diagnostics and forensics. They introduce KCAL, a novel in-kernel caching and log-reduction system that significantly slashes runtime and storage costs by preventing redundant audit events from being generated in the first place.
What Problem Does This Paper Address?
Understanding system behavior, especially for debugging and forensic analysis, relies heavily on audit logging. The Linux Audit system is a widely adopted solution for this, capturing kernel events to reconstruct system activity. However, real-world deployments reveal that the Linux Audit system suffers from substantial performance issues, primarily high runtime overhead and massive storage requirements. The authors pinpoint the root cause: the generation and processing of a huge volume of redundant events within the audit logs. Existing solutions often tackle this by reducing logs after they're generated, which doesn't fully address the initial overhead. This paper aims to solve this by preventing redundant logs from being created at all.
Methods
The core of KCAL is an in-kernel, cache-based log-reduction system. It employs a multi-layer caching scheme distributed across various kernel data structures. The key idea is to cache important dependencies and events, and then use these caches to detect and suppress redundant events on the fly.
Here's a breakdown of their approach:
- In-Kernel Caching: KCAL integrates caches directly into kernel data structures for processes and objects (like files).
- Process-Level Caches: Two layers of dependency caches are maintained for each process:
- Unit Dependency Cache: Tracks dependencies within a single execution unit (a logical grouping of related system calls for a specific task). This helps remove in-unit redundancy.
- Process Dependency Cache: Aggregates unique dependencies across all units within a process, addressing cross-unit redundancy.
- Object-Level Caches: Each object (e.g., a file) has a cache that stores syscall events operating on it, along with timestamps. This is crucial for handling temporary files, where events might be redundant if the file is not shared or used beyond its immediate purpose.
- Redundancy Detection: When a new syscall event occurs, KCAL checks if it introduces new causal information. If the event's dependencies are already captured in the caches, it's considered redundant and discarded. Only events that reveal new system objects, subjects, or dependencies are retained.
- Cost-Effective Design: The caches are designed to keep kernel memory consumption low, aiming to avoid perturbing normal kernel functionality.
- Transfer Channel Optimization: KCAL replaces the Netlink channel (used by the standard Linux Audit system) with shared memory for transferring logs to user space, which offers significantly better performance.
Datasets
Not explicitly discussed as "datasets" in the traditional machine learning sense. The evaluation uses real-world workloads and applications, including:
- Server Programs: Apache, ProFTPd.
- Client Programs: Firefox, Vim, Sendmail, MC, Bash, Pine, Yafc, Transmission, W3M, MiniHTTP.
- Workloads: One-month real-world workloads on 20 virtual machines.
- Forensic Analysis Cases: The paper reproduces attack cases used in previous research for verification.
The paper does not introduce new benchmarks but rather uses existing applications and workloads to evaluate KCAL's performance and effectiveness against the standard Linux Audit system and a state-of-the-art user-space log reduction technique (ProTracer).
Key Insights and Ideas
- Redundancy is the Bottleneck: The paper strongly demonstrates that the sheer volume of redundant events is the primary culprit behind the Linux Audit system's performance issues, not just the logging mechanism itself.
- Prevent, Don't Just Reduce: The core innovation is shifting from post-hoc log reduction to preventing redundant logs from being generated in the first place by leveraging kernel-level caching. This is a fundamental shift in approach.
- Kernel-Level Caching is Key: Integrating caches directly into kernel data structures allows for early detection and suppression of redundant events, minimizing overhead before data even reaches user space.
- Multi-Layered Caching for Granularity: The distinction between unit-level and process-level caches, along with object-level caches for temporary files, provides a sophisticated mechanism to capture and prune different types of redundancy effectively.
- Shared Memory for Efficiency: Replacing Netlink with shared memory for kernel-to-user-space communication is a significant optimization that directly addresses a major component of the audit system's overhead.
Key Results
KCAL achieves remarkable improvements:
- Runtime Overhead Reduction: Reduced from over 40% to around 15% for some workloads.
- Space Consumption Reduction: Achieved an average reduction of 90% in log file size.
- CPU Consumption: KCAL uses an average of 4% CPU, a stark contrast to state-of-the-art user-space log reduction techniques (like ProTracer) that can consume over 95% CPU.
- Log Size: For a machine that generated nearly 1TB of logs in 30 days with the original audit system, KCAL reduced this to less than 120GB. For some applications, log sizes were reduced to as low as 6GB.
- Forensic Analysis Accuracy: KCAL's reduced logs produce the same causal graphs as the original logs, ensuring information completeness for forensic analysis. It also significantly speeds up analysis time compared to the standard audit log.
Limitations and Future Work
- Kernel Modification: KCAL modifies Linux kernel data structures. Porting to new kernel versions requires human effort, although the authors found it manageable for a minor kernel version change. They suggest that using stand-alone hash tables could mitigate this by avoiding direct kernel data structure modification.
- Dependency on Execution Partitioning: KCAL relies on existing execution partitioning techniques (like BEEP or MPI) for effective cross-unit redundancy removal. Without this support, the reduction effectiveness is impacted.
- Cache Eviction: While cache eviction doesn't affect information completeness, it can lead to some redundancy not being removed. The study shows that even small cache sizes are effective for many programs, but larger caches can improve reduction rates for complex scenarios.
- Future Work: The paper doesn't explicitly detail future work, but the implementation details and the discussion on kernel modifications suggest potential areas for further research, such as more robust cross-kernel version compatibility or exploring alternative partitioning schemes.
Summary updated