CVE-2024-50210 posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()

Medium 5.5 Published Updated

A locking imbalance in the Linux kernel posix-clock subsystem can lead to a deadlock, causing a denial of service.

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

CVE-2024-50210 is a medium-severity vulnerability in Linux kernel, published on 8 Nov 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:

posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()

If get_clock_desc() succeeds, it calls fget() for the clockid's fd, and get the clk->rwsem read lock, so the error path should release the lock to make the lock balance and fput the clockid's fd to make the refcount balance and release the fd related resource.

However the below commit left the error path locked behind resulting in unbalanced locking. Check timespec64_valid_strict() before get_clock_desc() to fix it, because the "ts" is not changed after that.

[[email protected]: fixed commit message typo]

Weakness: CWE-667

Which versions are affected by CVE-2024-50210?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50210?

Apply the vendor's patch.

Is CVE-2024-50210 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-50210, DEBIAN-CVE-2024-50210, GHSA-975c-w82q-mxhv, UBUNTU-CVE-2024-50210.

Is CVE-2024-50210 in your software?

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

Check your SBOMs for free