漏洞标题
bpf:处理BPF_CORE_TYPE_ID_LOCAL畸形重定位的漏洞
漏洞描述信息
在Linux内核中,已解决了以下漏洞:
bpf:正确处理格式错误的BPF_CORE_TYPE_ID_LOCAL重定位
当遇到引用不存在的BTF类型的格式错误的BPF_CORE_TYPE_ID_LOCAL重定位记录时,函数bpf_core_calc_relo_insn会导致空指针引用。
通过在调用堆栈中添加适当的检查来修复此问题,因为格式错误的重定位记录可以从用户空间传递。
最简单的复现程序如下:
r0 = 0
exit
带有单个重定位记录:
.insn_off = 0, /*修复第一条指令*/
.type_id = 100500, /*该类型ID不存在*/
.access_str_off = 6, /*字符串"0"的偏移量*/
.kind = BPF_CORE_TYPE_ID_LOCAL,
请参阅链接中的原始复现程序或下一个提交中的测试用例。
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
漏洞类别
空指针解引用
漏洞标题
bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved:
bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos
In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL
referencing a non-existing BTF type, function bpf_core_calc_relo_insn
would cause a null pointer deference.
Fix this by adding a proper check upper in call stack, as malformed
relocation records could be passed from user space.
Simplest reproducer is a program:
r0 = 0
exit
With a single relocation record:
.insn_off = 0, /* patch first instruction */
.type_id = 100500, /* this type id does not exist */
.access_str_off = 6, /* offset of string "0" */
.kind = BPF_CORE_TYPE_ID_LOCAL,
See the link for original reproducer or next commit for a test case.
CVSS信息
N/A
漏洞类别
N/A
漏洞标题
Linux kernel 安全漏洞
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于bpf程序中对错误的BPF_CORE_TYPE_ID_LOCAL重定位处理不当。
CVSS信息
N/A
漏洞类别
其他