Bug 5321 - dracut 包处理国密算法签名的内核模块会崩溃
Summary: dracut 包处理国密算法签名的内核模块会崩溃
Status: RESOLVED DUPLICATE of bug 5298
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: general/others (show other bugs) general/others
Version: unspecified
Hardware: All Linux
: P2-High S2-major
Target Milestone: ---
Assignee: tj
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-26 15:44 UTC by 陈晨
Modified: 2023-05-29 12:03 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 陈晨 2023-05-26 15:44:02 UTC
dracut 包中的一些二进制程序(例如 /usr/lib/dracut/dracut-install)处理国密算法签名的内核模块会崩溃,导致内核 rpm post script 无法正常执行,安装该内核后无法正常生成 initramfs,导致发行版没有能力默认集成使用了国密算法签名内核模块的内核。

内核版本:
# uname -srm
Linux 5.10.134-14.an8.x86_64 x86_64

dracut 版本:
# rpm -q dracut
dracut-049-202.git20220511.an8_6.x86_64

密钥生成(生成 ca.key 和 ca.cert):
https://openanolis.github.io/whitebook-shangmi/kernel_ima.html#ima-%E5%95%86%E5%AF%86%E5%8C%96%E5%AE%9E%E8%B7%B5

模块签名(sign-file 使用了该内核 rpmbuild 后生成的 sign-file):
https://openanolis.github.io/whitebook-shangmi/kernel_modsign.html#%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E7%AD%BE%E5%90%8D%E5%9B%BD%E5%AF%86%E5%AE%9E%E8%B7%B5

执行以下内容的脚本(特别是调用 /bin/kernel-install)生成 initramfs 时会崩溃:
$ rpm -q --scripts kernel-core
Comment 1 陈晨 2023-05-26 17:47:52 UTC
kmod 版本:
# rpm -q kmod
kmod-25-19.0.2.an8.x86_64
Comment 2 陈晨 2023-05-29 12:03:47 UTC
原因是 kmod-libs 没有升级

*** This bug has been marked as a duplicate of bug 5298 ***