It seems like this is an issue with secure boot, I have the same problem and found the solution in this forum: https://ubuntuforums.org/showthread.php?t=2393436.
Try to reboot and disable Secure Boot, then reboot, and either reinstall
virtualbox-dkms or run
dpkg-reconfigure virtualbox-dkms. It should work now.
If you want secure boot to work still, you then need to re-enable secure boot and sign the modules following this guide: https://blog.ubuntu.com/2017/08/11/how-to-sign-things-for-secure-boot
This is unfortunate, because it means if you want secure boot enabled, then every time there is a kernel upgrade, you need to:
- Reboot and disable secure boot
- Reboot and re-enable secure boot
- Sign all the new modules
- Reboot one last time (or possibly just modprobe the modules)
That is a lot of fuss and rebooting, but it should at least work. Of course, you could also just leave secure boot disabled until you reboot into Windows.
There is a better way to do this that does not require multiple reboots. Apparently, what is happening is that the MOK module signing is waiting in the background for a root password. Check out this answer for more information: reconfiguration issues with dpkg