【特性描述】
为了防止入侵者通过缓冲区溢出进行攻击,添加对栈随机化的支持。
【特性竞争力】
堆栈随机化是一项安全增强,它允许对系统调用发生时,内核使用的堆栈添加一个随机偏移。这给基于stack的攻击增加了难度,因为stack攻击通常要求stack有个固定的layout。现在每次系统调用,stack的layout都变化的话,攻击就无规律可寻了。
【硬件架构】
noarch
【特性约束】
NA
【涉及仓库】
OLK-5.10
【交付个人/团队】
HULK
官方公告信息:
https://lwn.net/Articles/849888/
主线合入补丁:
Kees Cook (6):
jump_label: Provide CONFIG-driven build state defaults
init_on_alloc: Optimize static branches
stack: Optionally randomize kernel stack offset each syscall
x86/entry: Enable random_kstack_offset support
arm64: entry: Enable random_kstack_offset support
lkdtm: Add REPORT_STACK for checking stack offsets
OLK-5.10合入补丁:
GONG, Ruiqi (1):
stack: Declare {randomize_,}kstack_offset to fix Sparse warnings
Kees Cook (4):
stack: Optionally randomize kernel stack offset each syscall
x86/entry: Enable random_kstack_offset support
arm64: entry: Enable random_kstack_offset support
lkdtm: Add REPORT_STACK for checking stack offsets
Marco Elver (1):
stack: Introduce CONFIG_RANDOMIZE_KSTACK_OFFSET
Nick Desaulniers (1):
stack: Replace "o" output with "r" input constraint
其中OLK-5.10相比主线:
jump_label: Provide CONFIG-driven build state defaults 已合入
init_on_alloc: Optimize static branches 优化代码,并且存在冲突,选择不合入
补丁简介:
stack: Optionally randomize kernel stack offset each syscall
编写randomize_kstack.h,实现系统调用地址随机化接口,供其他模块使用。
x86/entry: Enable random_kstack_offset support
在x86架构的系统调用路径上使用系统调用地址随机化接口实现对应的功能。
arm64: entry: Enable random_kstack_offset support
在arm64架构的系统调用路径上使用系统调用地址随机化接口实现对应的功能。
lkdtm: Add REPORT_STACK for checking stack offsets
在lkdtm中添加脚本来计算系统调用地址的偏移,以验证功能是否正常。
stack: Replace "o" output with "r" input constraint
原先的写法在 aarch64 的 LLVM 上存在问题,更换成更通用的写法,更正系统调用随机化中申请随机空间后的汇编指令,确保能够生成的空间在离开生命周期后仍存在,与预期保持一致。
stack: Introduce CONFIG_RANDOMIZE_KSTACK_OFFSET
引入CONFIG_RANDOMIZE_KSTACK_OFFSET用来控制是否启用系统调用随机化。
stack: Declare {randomize_,}kstack_offset to fix Sparse warnings
添加头文件以消除Sparse警告
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论