|
|
- Linux内核的create_elf_tables函数中存在一个整数溢出缺陷,能访问SUID可执行文件的低权限的本地用户可通过利用此缺陷进行权限提升。内核2.6.x/3.10.x/4.14.x 受影响。
- 由于利用该漏洞需要大量内存空间,32位的操作系统不受此漏洞影响。小于32GB内存的操作系统几乎不会受到此漏洞影响。
- RHEL 5 附带的内核不受此漏洞影响。
- 缓解措施:
- -- RHEL系操作系统
- 1) 将以下代码存为mitigation.stp
- function clamp_stack_rlim_cur:long ()
- %{
- struct rlimit *rlim = current->signal->rlim;
- unsigned long rlim_cur = READ_ONCE(rlim[RLIMIT_STACK].rlim_cur);
- unsigned long limit = _STK_LIM / 4 * 3;
- limit *= 4; // multiply it back up, to the scale used by rlim_cur
- if (rlim_cur > limit) {
- WRITE_ONCE(rlim[RLIMIT_STACK].rlim_cur, limit);
- STAP_RETURN(limit);
- } else
- STAP_RETURN(0);
- %}
- probe kernel.function("copy_strings").call
- {
- l = clamp_stack_rlim_cur()
- if (l)
- printf("lowered process %s(%d) STACK rlim_cur to %p\n",
- execname(), pid(), l)
- }
- probe begin {
- printf("CVE-2018-14634 mitigation loaded\n")
- }
- probe end {
- printf("CVE-2018-14634 mitigation unloaded\n")
- }
- 2) 安装systemtap, 使用systemtap运行上述文件
- sudo stap -g mitigation.stp
复制代码
|
|