Recent versions of VirtualBox (7.1.18, 7.2.8) can cause a system crash during package upgrades, VMs may fail to start

Note that the issue described here is a VirtualBox bug, it is not a Kicksecure bug.

If you use virtualbox-installer-cli to install VirtualBox, you will get a recent version of VirtualBox from Oracle’s repository. VirtualBox 7.1.18 and VirtualBox 7.2.6 (the two latest versions at the time of this writing) both have a bug that results in a kernel oops when the vboxdrv kernel module is loaded if a particular hardening setting (kernel.kptr_restrict=2) is enabled. This setting is enabled by default in Kicksecure.

What this means in concrete terms is:

  • If you try to install Debian package software updates (i.e. using apt, upgrade-nonroot, or the “Install Updates” button in the System Maintenance Panel), your system will crash and reboot in the middle of the upgrade process. Attempting to finish the failed upgrade will result in another crash and reboot. This is because panic-on-oops is also enabled by default in Kicksecure.
  • The system should boot into user mode without crashing, however you will be unable to start any VirtualBox VMs.

Until a proper fix is available, there are workarounds you can use.

  1. Change kernel configuration.
    A. If you don’t need VMs to work and just need the upgrade to finish without crashing, you can disable panic-on-oops. To do this, boot into PERSISTENT Mode | SYSMAINT Session1, then click the “Toggle Panic-on-Oops” button under “System Administration”. This will prevent system crashes, but VirtualBox will still be unusable.
    B. If you do need VMs to work, boot into PERSISTENT Mode | SYSMAINT Session1, click “Open Terminal” in the “Misc” section, then run echo 'kernel.kptr_restrict=1' | sudo tee /usr/lib/sysctl.d/991_user.conf. Then reboot into PERSISTENT Mode | SYSMAINT Session again2. This will loosen the hardening setting that causes VirtualBox to crash.
  2. In the System Maintenance Panel, click “Open Terminal” in the “Misc” section, then run sudo dpkg --configure -a && sudo apt --fix-broken install to finish the failed software update.

Note that both options A and B above result in lessened security. Which one you should pick will depend on your needs and threat model, or you may elect to simply uninstall VirtualBox entirely.

The full details of the issue are in this bug report:


1 If you are using Unrestricted Admin Mode, open the System Maintenance Panel from the start menu instead.

2 If you are using Unrestricted Admin Mode, reboot into PERSISTENT Mode | USER Session here, then open the System Maintenance Panel from the start menu.

2 Likes

Another workaround: If you have an old version (e.g. 7.2.6) and haven’t upgraded yet, you can sudo apt-mark hold virtualbox-7.1 virtualbox-7.2 until this is resolved. It lets you run full upgrades (with GUI or CLI) without upgrading virtualbox.

Based on the response on the bug report, this may get fixed in the next version or so though.

1 Like