fbpx
维基百科

内核页表隔离

内核页表隔离Kernel page-table isolation,缩写KPTI,也简称PTI,旧称KAISER)是Linux内核中的一种强化英语Hardening (computing)技术,旨在更好地隔离用户空间与内核空间的内存来提高安全性,缓解现代x86 CPU中的“熔毁”硬件安全缺陷。[1][2]

前身

KPTI补丁基于KAISER,它是一个用于缓解不太重要问题的早期补丁,当时业界还未了解到Meltdown的存在。

如果没有KPTI,每当执行用户空间代码(应用程序)时,Linux会在其分頁表中保留整个内核内存的映射,并保护其访问。这样做的优点是当应用程序向内核发送系统调用或收到中斷时,内核页表始终存在,可以避免绝大多数上下文交換相关的开销(TLB刷新、页表交换等)。

2005年,Linux内核采用了位址空間配置隨機載入(KASLR)隐匿用户空间中的相关内核地址,增加了利用其他内核漏洞的难度[3][4]。尽管阻止了对这些内核映射的访问,但在此后发现,现有的英特尔x86处理器(截至2017年12月[5])还存在着多处可能泄露这些内存位置的旁路攻击,可能绕过KASLR。[2][6][7][8]AMD称其处理器不受这些攻击的影响,所以不需要KPTI作为缓解措施。[9][10][11][12][9][10][11]

Meltdown漏洞与KPTI

2018年1月,影响Intel x86处理器的熔毁漏洞被公布。KAISER补丁改为修复此问题,并更名为KPTI,因为新型攻击很类似,尽管更为严重。

实现

KPTI通过完全分离用户空间与内核空间页表来解决页表泄露。支持进程上下文标识符(PCID)特性的x86处理器可以用它来避免TLB刷新,但即便如此,它依然有很高的性能成本。据KAISER原作者称,其开销为0.28%[2];一名Linux开发者称大多数工作负载下测得约为5%,但即便有PCID优化,在某些情况下开销高达30%。[1]

KPTI在2018年早期被合并到Linux内核4.15版[13][14],并被反向移植到Linux内核4.14.11。Windows[15]macOS[16]也发布了类似的更新。

使用内核启动选项“pti=off”可以部分禁用内核页表隔离。依规定也可对已修复漏洞的新款处理器禁用内核页表隔离[13]

参见

参考文献

  1. ^ 1.0 1.1 Corbet, Jonathan. KAISER: hiding the kernel from user space. LWN.net. 15 November 2017 [2018-01-03]. (原始内容于2020-12-08). 
  2. ^ 2.0 2.1 2.2 Gruss, Daniel; Lipp, Moritz; Schwarz, Michael; Fellner, Richard; Maurice, Clémentine; Mangard, Stefan. KASLR is Dead: Long Live KASLR (PDF). Engineering Secure Software and Systems 2017. 24 June 2017 [2018-01-03]. (原始内容 (PDF)于2018-06-28). 
  3. ^ Dang, Alan. The NX Bit And ASLR - Behind Pwn2Own: Exclusive Interview With Charlie Miller. Tom's Hardware. 25 March 2009 [2017-12-29] (英语). 
  4. ^ Bhattacharjee, Abhishek; Lustig, Daniel. Architectural and Operating System Support for Virtual Memory. Morgan & Claypool Publishers. 29 September 2017: 56. ISBN 9781627059336 (英语). 
  5. ^ 腾讯科技. . 财经网. 2018-01-03 [2018-01-03]. (原始内容存档于2018-01-04) (中文(中国大陆)). 
  6. ^ Jang, Yeongjin; Lee, Sangho; Kim, Taesoo. Breaking Kernel Address Space Layout Randomization with Intel TSX (PDF). 2016 ACM SIGSAC Conference on Computer and Communications Security. CCS '16 (New York, NY, USA: ACM). 2016: 380–392 [2018-01-03]. ISBN 9781450341394. doi:10.1145/2976749.2978321. (原始内容 (PDF)于2020-09-21). 
  7. ^ Gruss, Daniel; Maurice, Clémentine; Fogh, Anders; Lipp, Moritz; Mangard, Stefan. Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR (PDF). 2016 ACM SIGSAC Conference on Computer and Communications Security. CCS '16 (New York, NY, USA: ACM). 2016: 368–379 [2018-01-03]. ISBN 9781450341394. doi:10.1145/2976749.2978356. (原始内容 (PDF)于2020-08-17). 
  8. ^ Hund, R.; Willems, C.; Holz, T. Practical Timing Side Channel Attacks against Kernel Space ASLR (PDF). 2013 IEEE Symposium on Security and Privacy. May 2013: 191–205 [2018-01-03]. doi:10.1109/sp.2013.23. (原始内容 (PDF)于2020-11-09). 
  9. ^ 9.0 9.1 Lendacky, Tom. Do not enable PTI on AMD processors. 26 December 2017 [2018-01-03]. (原始内容于2020-11-09). 
  10. ^ 10.0 10.1 Gleixner, Thomas. x86/cpu, x86/pti: Do not enable PTI on AMD processors. 3 January 2018 [2018-01-04]. (原始内容于2020-06-28). 
  11. ^ 11.0 11.1 An Update on AMD Processor Security. 4 January 2018 [2018-01-04]. (原始内容于2018-03-17). 
  12. ^ IT之家. AMD谈Intel芯片漏洞:我们没受影响. 凤凰资讯. 2018-01-04 [2018-01-04]. (原始内容于2018-01-05). 
  13. ^ 13.0 13.1 Corbet, Jonathan. Kernel page-table isolation merged. LWN.net. 20 December 2017 [2018-01-03]. (原始内容于2020-10-31). 
  14. ^ Larabel, Michael. KAISER Getting Ready To Better Protect The Linux Kernel. Phoronix. 27 November 2017 [2018-01-03]. (原始内容于2020-10-19). 
  15. ^ Alex Ionescu [@aionescu]. Windows 17035 Kernel ASLR/VA Isolation In Practice (推文). 14 November 2017 –通过Twitter. 
  16. ^ Apple has already partially implemented fix in macOS for 'KPTI' Intel CPU security flaw. AppleInsider. [2018-01-03]. (原始内容于2018-01-11) (美国英语). 

外部链接

  • 英特尔陷芯片安全问题漩涡_新浪网 (页面存档备份,存于互联网档案馆(简体中文)
  • KPTI documentation patch (页面存档备份,存于互联网档案馆(英文)

内核页表隔离, 此條目可参照英語維基百科相應條目来扩充, 若您熟悉来源语言和主题, 请协助参考外语维基百科扩充条目, 请勿直接提交机械翻译, 也不要翻译不可靠, 低品质内容, 依版权协议, 译文需在编辑摘要注明来源, 或于讨论页顶部标记, href, template, translated, page, html, title, template, translated, page, translated, page, 标签, 此條目需要精通或熟悉相关主题的编者参与及协助编辑, 請邀請適合的人士改善本条目, 更多. 此條目可参照英語維基百科相應條目来扩充 若您熟悉来源语言和主题 请协助参考外语维基百科扩充条目 请勿直接提交机械翻译 也不要翻译不可靠 低品质内容 依版权协议 译文需在编辑摘要注明来源 或于讨论页顶部标记 a href Template Translated page html title Template Translated page Translated page a 标签 此條目需要精通或熟悉相关主题的编者参与及协助编辑 請邀請適合的人士改善本条目 更多的細節與詳情請參见討論頁 内核页表隔离 Kernel page table isolation 缩写KPTI 也简称PTI 旧称KAISER 是Linux内核中的一种强化 英语 Hardening computing 技术 旨在更好地隔离用户空间与内核空间的内存来提高安全性 缓解现代x86 CPU中的 熔毁 硬件安全缺陷 1 2 目录 1 前身 2 Meltdown漏洞与KPTI 3 实现 4 参见 5 参考文献 6 外部链接前身 编辑KPTI补丁基于KAISER 它是一个用于缓解不太重要问题的早期补丁 当时业界还未了解到Meltdown的存在 如果没有KPTI 每当执行用户空间代码 应用程序 时 Linux会在其分頁表中保留整个内核内存的映射 并保护其访问 这样做的优点是当应用程序向内核发送系统调用或收到中斷时 内核页表始终存在 可以避免绝大多数上下文交換相关的开销 TLB刷新 页表交换等 2005年 Linux内核采用了位址空間配置隨機載入 KASLR 隐匿用户空间中的相关内核地址 增加了利用其他内核漏洞的难度 3 4 尽管阻止了对这些内核映射的访问 但在此后发现 现有的英特尔x86处理器 截至2017年12月 5 还存在着多处可能泄露这些内存位置的旁路攻击 可能绕过KASLR 2 6 7 8 AMD称其处理器不受这些攻击的影响 所以不需要KPTI作为缓解措施 9 10 11 12 9 10 11 Meltdown漏洞与KPTI 编辑2018年1月 影响Intel x86处理器的熔毁漏洞被公布 KAISER补丁改为修复此问题 并更名为KPTI 因为新型攻击很类似 尽管更为严重 实现 编辑KPTI通过完全分离用户空间与内核空间页表来解决页表泄露 支持进程上下文标识符 PCID 特性的x86处理器可以用它来避免TLB刷新 但即便如此 它依然有很高的性能成本 据KAISER原作者称 其开销为0 28 2 一名Linux开发者称大多数工作负载下测得约为5 但即便有PCID优化 在某些情况下开销高达30 1 KPTI在2018年早期被合并到Linux内核4 15版 13 14 并被反向移植到Linux内核4 14 11 Windows 15 和macOS 16 也发布了类似的更新 使用内核启动选项 pti off 可以部分禁用内核页表隔离 依规定也可对已修复漏洞的新款处理器禁用内核页表隔离 13 参见 编辑熔毁 安全漏洞 幽灵 安全漏洞 奔腾浮点除错误参考文献 编辑 1 0 1 1 Corbet Jonathan KAISER hiding the kernel from user space LWN net 15 November 2017 2018 01 03 原始内容存档于2020 12 08 2 0 2 1 2 2 Gruss Daniel Lipp Moritz Schwarz Michael Fellner Richard Maurice Clementine Mangard Stefan KASLR is Dead Long Live KASLR PDF Engineering Secure Software and Systems 2017 24 June 2017 2018 01 03 原始内容存档 PDF 于2018 06 28 Dang Alan The NX Bit And ASLR Behind Pwn2Own Exclusive Interview With Charlie Miller Tom s Hardware 25 March 2009 2017 12 29 英语 Bhattacharjee Abhishek Lustig Daniel Architectural and Operating System Support for Virtual Memory Morgan amp Claypool Publishers 29 September 2017 56 ISBN 9781627059336 英语 腾讯科技 英特尔CPU爆惊天漏洞 全球PC面临最高30 降速 财经网 2018 01 03 2018 01 03 原始内容存档于2018 01 04 中文 中国大陆 Jang Yeongjin Lee Sangho Kim Taesoo Breaking Kernel Address Space Layout Randomization with Intel TSX PDF 2016 ACM SIGSAC Conference on Computer and Communications Security CCS 16 New York NY USA ACM 2016 380 392 2018 01 03 ISBN 9781450341394 doi 10 1145 2976749 2978321 原始内容存档 PDF 于2020 09 21 Gruss Daniel Maurice Clementine Fogh Anders Lipp Moritz Mangard Stefan Prefetch Side Channel Attacks Bypassing SMAP and Kernel ASLR PDF 2016 ACM SIGSAC Conference on Computer and Communications Security CCS 16 New York NY USA ACM 2016 368 379 2018 01 03 ISBN 9781450341394 doi 10 1145 2976749 2978356 原始内容存档 PDF 于2020 08 17 Hund R Willems C Holz T Practical Timing Side Channel Attacks against Kernel Space ASLR PDF 2013 IEEE Symposium on Security and Privacy May 2013 191 205 2018 01 03 doi 10 1109 sp 2013 23 原始内容存档 PDF 于2020 11 09 9 0 9 1 Lendacky Tom Do not enable PTI on AMD processors 26 December 2017 2018 01 03 原始内容存档于2020 11 09 10 0 10 1 Gleixner Thomas x86 cpu x86 pti Do not enable PTI on AMD processors 3 January 2018 2018 01 04 原始内容存档于2020 06 28 11 0 11 1 An Update on AMD Processor Security 4 January 2018 2018 01 04 原始内容存档于2018 03 17 IT之家 AMD谈Intel芯片漏洞 我们没受影响 凤凰资讯 2018 01 04 2018 01 04 原始内容存档于2018 01 05 13 0 13 1 Corbet Jonathan Kernel page table isolation merged LWN net 20 December 2017 2018 01 03 原始内容存档于2020 10 31 Larabel Michael KAISER Getting Ready To Better Protect The Linux Kernel Phoronix 27 November 2017 2018 01 03 原始内容存档于2020 10 19 Alex Ionescu aionescu Windows 17035 Kernel ASLR VA Isolation In Practice 推文 14 November 2017 通过Twitter Apple has already partially implemented fix in macOS for KPTI Intel CPU security flaw AppleInsider 2018 01 03 原始内容存档于2018 01 11 美国英语 外部链接 编辑英特尔陷芯片安全问题漩涡 新浪网 页面存档备份 存于互联网档案馆 简体中文 KPTI documentation patch 页面存档备份 存于互联网档案馆 英文 取自 https zh wikipedia org w index php title 内核页表隔离 amp oldid 72307952, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。