Skip to content

Fix crash when hiding message in details splash mode

If plymouth is in detailed mode, when hide message request arrives, it crashes in function ply_boot_splash_hide_message.

There is a check if state->boot_splash != NULL in function on_display_message, but no such check in function on_hide_message, which may lead to crash. This change adds such check.

Backtrace of crash for slightly patched plymouth 0.9.5:

#0  0x00007ffff7e09891 in raise () from /lib64/libc.so.6
#1  0x00007ffff7df3536 in abort () from /lib64/libc.so.6
#2  0x00007ffff7df341f in ?? () from /lib64/libc.so.6
#3  0x00007ffff7e02212 in __assert_fail () from /lib64/libc.so.6
#4  0x00007ffff7f9bf64 in ply_boot_splash_hide_message (splash=0x0, message=0x55555556cd70 "fsck: device /dev/sdb1, pass 1, 0.0% complete...") at ply-boot-splash.c:605
#5  0x000055555555b872 in on_hide_message (state=0x7fffffffdd00, message=0x55555556cd70 "fsck: device /dev/sdb1, pass 1, 0.0% complete...") at main.c:591
#6  0x0000555555559d8a in ply_boot_connection_on_request (connection=0x55555556cea0) at ply-boot-server.c:618
#7  0x00007ffff7fab676 in ply_event_loop_handle_met_status_for_source (loop=0x5555555643e0, source=0x55555556c490, status=PLY_EVENT_LOOP_FD_STATUS_HAS_DATA) at ply-event-loop.c:1040
#8  0x00007ffff7fabf44 in ply_event_loop_process_pending_events (loop=0x5555555643e0) at ply-event-loop.c:1279
#9  0x00007ffff7fac02d in ply_event_loop_run (loop=0x5555555643e0) at ply-event-loop.c:1310
#10 0x000055555555e77d in main (argc=2, argv=0x7fffffffdec8) at main.c:2287

Merge request reports