CVE-2024-46698 video/aperture: optionally match the device in sysfb_disable()

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel video aperture driver can cause a system crash when specific PCI device configurations are present.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-46698?

CVE-2024-46698 is a medium-severity vulnerability in Linux kernel, published on 13 Sep 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

video/aperture: optionally match the device in sysfb_disable()

In aperture_remove_conflicting_pci_devices(), we currently only call sysfb_disable() on vga class devices. This leads to the following problem when the pimary device is not VGA compatible:

1. A PCI device with a non-VGA class is the boot display 2. That device is probed first and it is not a VGA device so sysfb_disable() is not called, but the device resources are freed by aperture_detach_platform_device() 3. Non-primary GPU has a VGA class and it ends up calling sysfb_disable() 4. NULL pointer dereference via sysfb_disable() since the resources have already been freed by aperture_detach_platform_device() when it was called by the other device.

Fix this by passing a device pointer to sysfb_disable() and checking the device to determine if we should execute it or not.

v2: Fix build when CONFIG_SCREEN_INFO is not set v3: Move device check into the mutex Drop primary variable in aperture_remove_conflicting_pci_devices() Drop __init on pci sysfb_pci_dev_is_enabled()

Weakness: CWE-476

Which versions are affected by CVE-2024-46698?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-46698?

Apply the vendor's patch.

Is CVE-2024-46698 being exploited?

There is no known exploitation of CVE-2024-46698 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-49278, BELL-CVE-2024-46698, DEBIAN-CVE-2024-46698, GHSA-7f48-pc7q-83qh, ROOT-OS-DEBIAN-12-CVE-2024-46698, UBUNTU-CVE-2024-46698.

Is CVE-2024-46698 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free