识别由于不良 RCU 同步导致的 Linux 内核不稳定性
Identifying Linux Kernel Instability Due to Poor RCU Synchronization
AI总结:
本文研究了 Linux 内核中因哈希表更新时省略 synchronize_rcu() 调用导致的 RCU 同步不当问题,发现其会引发内存碎片与 UAF 漏洞,并建议显式插入该调用以保障内核稳定与内存安全。
摘要:
Read-Copy-Update (RCU) 在 Linux 内核中被广泛用于管理对共享数据结构的并发访问。然而,在移除 RCU 保护的哈希表条目时,不当的同步可能导致悬垂指针、不一致的查询以及严重的释放后使用 (UAF) 漏洞。本文利用在 Intel ICE 网络驱动程序虚拟功能 (VF) 管理中发现的一个缺陷,调查了由于在哈希表更新期间省略显式 synchronize_rcu() 调用而引起的驱动级同步问题。以往的内核漏洞,例如 Reliable Datagram Sockets (RDS) 子系统中的错误,表明不当的 RCU 同步会直接导致内核崩溃。实验结果表明,在没有适当同步的情况下移除 VF 条目会留下短暂的陈旧条目,延迟内存回收,并在快速插入/删除工作负载下导致严重的内存碎片。RCU 哈希表广泛部署于网络、虚拟化和文件系统等 Linux 内核子系统中;不当的同步会导致内存碎片、内核不稳定和内存耗尽 (OOM) 状况。提出了缓解措施,建议显式插入 synchronize_rcu() 调用以确保及时且安全的内存回收。这些发现强化了 RCU 同步的既定最佳实践,突出了它们对于维护内核稳定性和内存安全的重要性。
英文摘要:
Read-Copy-Update (RCU) is widely used in the Linux kernel to manage concurrent access to shared data structures.However, improper synchronization when removing RCU protected hash table entries can lead to stale pointers, inconsistent lookups, and critical use after free (UAF) vulnerabilities. This paper investigates a driver-level synchronization issue arising from the omission of explicit synchronize_rcu() calls during hash table updates, using a discovered weakness in the Intel ICE network drivers Virtual Function (VF) management. Previous kernel vulnerabilities, such as a bug in the Reliable Datagram Sockets (RDS) subsystem, show how improper RCU synchronization can directly cause kernel crashes. Experimental results demonstrate that removing VF entries without proper synchronization leaves transient stale entries, delays memory reclamation, and results in significant memory fragmentation under rapid insert/delete workloads. RCU hash tables are widely deployed in Linux kernel subsystems such as networking, virtualization, and file systems; improper synchronization can cause memory fragmentation, kernel instability, and out-of-memory (OOM) conditions. Mitigations are proposed, recommending explicit insertion of synchronize_rcu() calls to ensure timely and safe memory reclamation. These findings reinforce established best practices for RCU synchronization, highlighting their importance for maintaining kernel stability and memory safety. Keywords: RCU, kernel synchronization, hash tables, ICE driver, memory fragmentation, use-after-free
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。