kernel panic during boot with an initramfs image that was rebuilt when an IMA rules mandate signature verification
Issue
- Reboot fails with below error after running
ima-setupand rebuilding initramfs.
[ 2.231837] Run /init as init process
/init: error while loading shared libraries: libsystemd-core-252.so: cannot open shared object file: No such file or directory
[ 2.233049] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[ 2.236867] CPU: 2 PID: 1 Comm: init Not tainted 5.14.0-477.el9.x86_64 #1
[ 2.238224] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20240214-7.fc40 02/14/2024
[ 2.240281] Call Trace:
[ 2.240842] <TASK>
[ 2.243812] dump_stack_lvl+0x34/0x48
[ 2.244566] panic+0x107/0x2bb
[ 2.245168] do_exit.cold+0x15/0x15
[ 2.245930] do_group_exit+0x2d/0x90
[ 2.246599] __x64_sys_exit_group+0x14/0x20
[ 2.247395] do_syscall_64+0x5c/0xf0
[ 2.247962] ? exit_to_user_mode_prepare+0xef/0x100
[ 2.248862] ? syscall_exit_to_user_mode+0x19/0x40
[ 2.249890] ? do_syscall_64+0x6b/0xf0
[ 2.250649] ? __check_object_size.part.0+0x47/0xd0
[ 2.251649] ? __pfx_file_free_rcu+0x10/0x10
[ 2.252583] ? exit_to_user_mode_loop+0xc1/0x130
[ 2.256583] ? exit_to_user_mode_prepare+0xb9/0x100
[ 2.257645] ? syscall_exit_to_user_mode+0x19/0x40
[ 2.258627] ? clear_bhb_loop+0x25/0x80
[ 2.259290] ? clear_bhb_loop+0x25/0x80
[ 2.260393] ? clear_bhb_loop+0x25/0x80
[ 2.261171] ? clear_bhb_loop+0x25/0x80
[ 2.261951] ? clear_bhb_loop+0x25/0x80
[ 2.262742] entry_SYSCALL_64_after_hwframe+0x73/0x7b
[ 2.263651] RIP: 0033:0x7f9481938025
[ 2.266389] Code: f7 d8 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 f3 0f 1e fa ba e7 00 00 00 eb 06 0f 1f 44 00 00 f4 89 d0 0f 05 <48> 3d 00 f0 ff ff 76 f3 f7 d8 89 05 ab 41 01 00 eb e9 66 0f 1f 84
[ 2.270489] RSP: 002b:00007ffe7b5910c8 EFLAGS: 00000246
[ 2.271599] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f9481938025
[ 2.273419] RDX: 00000000000000e7 RSI: 00007ffe7b590c90 RDI: 000000000000007f
[ 2.274863] RBP: 00007ffe7b591b40 R08: 0000000000000020 R09: 0000000000000000
[ 2.278479] R10: 00000000ffffffff R11: 0000000000000246 R12: 00007f9481942798
[ 2.279882] R13: 00007f948191208f R14: 00007f94819120b0 R15: 0000000000000000
[ 2.281303] </TASK>
[ 3.922177] Shutting down cpus with NMI
[ 3.923042] Kernel Offset: 0x1c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 3.945134] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 ]---
Environment
- Red Hat Enterprise Linux 9.5
- IMA
- dracut <=
dracut-057-53.git20240104.el9.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.