6 Star 5 Fork 8

openEuler / security-facility

 / 详情

【IMA-bugs】kdump doesn't work in IMA appraisal enforce mode

已完成
缺陷
创建于  
2020-10-14 13:57

kdump service failed in IMA appraisal enforce mode, the error message in dmesg is (dmesg | grep appraise):

[ 2.999327] audit: type=1800 audit(1602644578.504:2): pid=145 uid=0 auid=4294967295 ses=4294967295 subjnel op=appraise_data cause=unknown comm="kworker/u8:0" name="/usr/bin/kmod" dev="rootfs" ino=10402 res=0
[ 15.514744] ima: impossible to appraise a kernel image without a file descriptor; try using kexec_file_ syscall.

The error message in kernel is (journalctl -u kdump):

Oct 14 11:03:07 localhost.localdomain systemd[1]: Starting Crash recovery kernel arming...
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: kexec_load failed: Permission denied
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: entry = 0xe22ab6b0 flags = 0xb70001
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: nr_segments = 5
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[0].buf = 0xffff9e8ef010
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[0].bufsz = 0x136ad40
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[0].mem = 0xdfe80000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[0].memsz = 0x15c1000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[1].buf = 0xffffa1a6f010
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[1].bufsz = 0xe682f3
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[1].mem = 0xe1441000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[1].memsz = 0xe69000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[2].buf = 0xaaaaed7e44d0
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[2].bufsz = 0x4f1
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[2].mem = 0xe22aa000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[2].memsz = 0x1000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[3].buf = 0xaaaaed7e4fc0
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[3].bufsz = 0x34a8
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[3].mem = 0xe22ab000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[3].memsz = 0x4000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[4].buf = 0xaaaaed7e2850
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[4].bufsz = 0x400
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[4].mem = 0xffdff000
Oct 14 11:03:11 localhost.localdomain kdumpctl[2493]: segment[4].memsz = 0x1000
Oct 14 11:03:11 localhost.localdomain kdumpctl[1928]: kexec: failed to load kdump kernel
Oct 14 11:03:11 localhost.localdomain kdumpctl[1928]: Starting kdump: [FAILED]
Oct 14 11:03:11 localhost.localdomain systemd[1]: kdump.service: Main process exited, code=exited, statu>
Oct 14 11:03:11 localhost.localdomain systemd[1]: kdump.service: Failed with result 'exit-code'.
Oct 14 11:03:11 localhost.localdomain systemd[1]: Failed to start Crash recovery kernel arming.

评论 (4)

anakinzhang 创建了缺陷
展开全部操作日志

Hey nettingsisyphus, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

anakinzhang 负责人设置为anakinzhang
anakinzhang 优先级设置为主要
anakinzhang 计划截止日期设置为2020-10-15
anakinzhang 计划开始日期设置为2020-10-14
anakinzhang 计划截止日期2020-10-15 修改为2020-10-16
anakinzhang 修改了描述
anakinzhang 任务状态待办的 修改为已确认

该问题原因在于kexec_file_load系统调用在openEuler 20.09不可用。

anakinzhang 优先级主要 修改为不指定
anakinzhang 修改了标题

IMA对kexec进行校验必须通过kexec_file_load系统调用,目前我们用的是kexec_load,kexec_file_load尚未在内核中使能,需要合入多个上游社区补丁,可能破坏kabi。
该issue将在21.03版本kabi允许变更时再改,当前暂不支持IMA的KEXEC_KERNEL_CHECK策略。

anakinzhang 任务状态已确认 修改为已挂起

该问题已在21.03版本得到修复,20.09已过维护周期,停止维护。

anakinzhang 任务状态已挂起 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936 6518579 anakintxzhang 1658304873
1
https://gitee.com/openeuler/security-facility.git
git@gitee.com:openeuler/security-facility.git
openeuler
security-facility
security-facility

搜索帮助