CVE-2025-21871 tee: optee: Fix supplicant wait loop

Medium 5.5 Published Updated

A flaw in the Linux kernel OP-TEE driver allows a hung or crashed user-space daemon to cause a system hang, requiring a hard reboot.

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-21871?

CVE-2025-21871 is a medium-severity denial of service vulnerability in Linux kernel, published on 27 Mar 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:

tee: optee: Fix supplicant wait loop

OP-TEE supplicant is a user-space daemon and it's possible for it be hung or crashed or killed in the middle of processing an OP-TEE RPC call. It becomes more complicated when there is incorrect shutdown ordering of the supplicant process vs the OP-TEE client application which can eventually lead to system hang-up waiting for the closure of the client application.

Allow the client process waiting in kernel for supplicant response to be killed rather than indefinitely waiting in an unkillable state. Also, a normal uninterruptible wait should not have resulted in the hung-task watchdog getting triggered, but the endless loop would.

This fixes issues observed during system reboot/shutdown when supplicant got hung for some reason or gets crashed/killed which lead to client getting hung in an unkillable state. It in turn lead to system being in hung up state requiring hard power off/on to recover.

Weakness: CWE-835

Which versions are affected by CVE-2025-21871?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21871?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-21871 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21871, DEBIAN-CVE-2025-21871, GHSA-gggq-j347-r3w6, ROOT-OS-UBUNTU-2404-CVE-2025-21871, UBUNTU-CVE-2025-21871.

Is CVE-2025-21871 in your software?

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

Check your SBOMs for free