Tel:400-888-8888

Bamboo Blinds

本文摘要:陈诉编号:B6-2020-110302陈诉泉源:360-CERT陈诉作者:360-CERT更新日期:2020-11-030x01 毛病配景2020年11月01日, 360CERT监测到外洋宁静研究人员simon 通过fuzz 在Linux 内核的ebpf模块中发现一个越界读写的毛病,可导致权限提升,CVE编号: CVE-2020-27194。该毛病是由于eBPF验证法式中举行or操作时未正确盘算寄存器规模,进而引发越界读取和写入。

云开平台登录

陈诉编号:B6-2020-110302陈诉泉源:360-CERT陈诉作者:360-CERT更新日期:2020-11-030x01 毛病配景2020年11月01日, 360CERT监测到外洋宁静研究人员simon 通过fuzz 在Linux 内核的ebpf模块中发现一个越界读写的毛病,可导致权限提升,CVE编号: CVE-2020-27194。该毛病是由于eBPF验证法式中举行or操作时未正确盘算寄存器规模,进而引发越界读取和写入。该毛病存在于5.8.x 内核分支,现在有部门刊行版使用了此分支,如Fedora 33 和 Ubuntu 20.10。

云开平台登录

2020年11月03日,360CERT对该毛病举行了详细分析,并完成毛病使用。0x02 风险品级360CERT对该毛病的评定效果如下0x03 影响版本影响 5.8.x 版本及以上的Linux 内核分支影响应用该分支的刊行版:Fedora 33 、Ubuntu 20.100x04 情况搭建(1)下载源码git clone https://github.com/torvalds/linux.gitgit checkout 5b9fbeb75b6a98955f628e205ac26689bcb1383e~15b9fbeb75b6a98955f628e205ac26689bcb1383e 为修复毛病的补丁,我们将分支切换到前一个补丁(2)编译内核make defaultmake menuconfigmake -j8关闭随机化,开启调试信息和ebpf选项Processor type and features ---> [ ] Randomize the address of the kernel image (KASLR) Kernel hacking ---> Compile-time checks and compiler options ---> [*] Compile the kernel with debug infoGeneral setup ---> [*] Enable bpf() system call 0x05 毛病分析5.1 eBPF 先容eBPF是extended Berkeley Packet Filter的缩写。起初是用于捕捉和过滤特定规则的网络数据包,现在也被用在防火墙,宁静,内核调试与性能分析等领域。

eBPF法式的运行历程如下:在用户空间生产eBPF“字节码”,然后将“字节码”加载进内核中的“虚拟机”中,然后举行一些列检查,通过则能够在内核中执行这些“字节码”。类似Java与JVM虚拟机,可是这里的虚拟机是在内核中的。bpf法式的执行流程如下图:5.2 毛病成因毛病点在scalar_min_max_or()函数:static void scalar32_min_max_or(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg){ bool src_known = tnum_subreg_is_const(src_reg->var_off); bool dst_known = tnum_subreg_is_const(dst_reg->var_off); struct tnum var32_off = tnum_subreg(dst_reg->var_off); s32 smin_val = src_reg->smin_value; u32 umin_val = src_reg->umin_value; /* Assuming scalar64_min_max_or will be called so it is safe * to skip updating register for known case. */ if (src_known && dst_known) return; /* We get our maximum from the var_off, and our minimum is the * maximum of the operands' minima */ dst_reg->u32_min_value = max(dst_reg->u32_min_value, umin_val); dst_reg->u32_max_value = var32_off.value | var32_off.mask; if (dst_reg->s32_min_value < 0 || smin_val < 0) { /* Lose signed bounds when ORing negative numbers, * ain't nobody got time for that. */ dst_reg->s32_min_value = S32_MIN; dst_reg->s32_max_value = S32_MAX;。

云开平台登录


本文关键词:云开平台登录,CVE-2020-27194,eBPF,提权,陈诉,编号,B6-2020-110302

本文来源:云开平台登录-www.zhimin888.com

Copyright © 2021 Copyright weaving dreams    ICP prepared No. ********