A vulnerability was found in the Linux kernels floppy driver implementation. A local attacker with access to the floppy disk device file (/dev/fd0 through to /dev/fdN) can create a situation which can convince the kernel to divide by zero. It requires two consecutive ioctls to be issued the first to set the sector and rate values, the second would be the call to format the floppy disk to the appropriate values. This can cause the system to divide by zero and panic the host. No media (floppy) is required to be inserted for this attack to work correctly. Systems using QEMU will likely have the virtual floppy disk controller (FDC) enabled by default, Linux guests using this configuration will auto-load the floppy kernel module and likely be affected. External References: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.2.3 Upstream commit: https://github.com/torvalds/linux/commit/f3554aeb991214cbfafd17d55e2bfddb50282e32 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f3554aeb991214cbfafd17d55e2bfddb50282e32
Created kernel tracking bugs for this issue: Affects: fedora-all [bug 1734250]
This was fixed for Fedora with the 5.1.20 stable kernel update.
Mitigation: The kernel module named 'floppy' contains the affected code, this can be blacklisted using the standard blacklisting techniques or disabled in the systems BIOS. See https://access.redhat.com/solutions/41278 for how to blacklist a kernel module. Virtualized guest systems can also remove the system from the guests configuration to ensure that the module does not load.