CVE-2025-40211 ACPI: video: Fix use-after-free in acpi_video_switch_brightness()

Not scored Published Updated

A use-after-free in the Linux kernel ACPI video driver allows local attackers to execute arbitrary code or escalate privileges.

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-2025-40211?

CVE-2025-40211 is an use after free vulnerability in Linux, published on 21 Nov 2025. 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:

ACPI: video: Fix use-after-free in acpi_video_switch_brightness()

The switch_brightness_work delayed work accesses device->brightness and device->backlight, freed by acpi_video_dev_unregister_backlight() during device removal.

If the work executes after acpi_video_bus_unregister_backlight() frees these resources, it causes a use-after-free when acpi_video_switch_brightness() dereferences device->brightness or device->backlight.

Fix this by calling cancel_delayed_work_sync() for each device's switch_brightness_work in acpi_video_bus_remove_notify_handler() after removing the notify handler that queues the work. This ensures the work completes before the memory is freed.

[ rjw: Changelog edit ]

Which versions are affected by CVE-2025-40211?

How do I fix CVE-2025-40211?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-40211 being exploited?

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

Sources

Also known as AZL-70657, BELL-CVE-2025-40211, DEBIAN-CVE-2025-40211, GHSA-3xv8-84fj-hhg4, ROOT-OS-DEBIAN-11-CVE-2025-40211, ROOT-OS-DEBIAN-12-CVE-2025-40211 and 4 more.

Is CVE-2025-40211 in your software?

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

Check your SBOMs for free