CVE-2024-36975 KEYS: trusted: Do not use WARN when encode fails

Medium 5.5 Published Updated

A flaw in the Linux kernel's trusted keys subsystem causes a system crash when ASN.1 encoding fails if panic_on_warn is enabled.

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

CVE-2024-36975 is a medium-severity denial of service vulnerability in Linux kernel, published on 18 Jun 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:

KEYS: trusted: Do not use WARN when encode fails

When asn1_encode_sequence() fails, WARN is not the correct solution.

1. asn1_encode_sequence() is not an internal function (located in lib/asn1_encode.c). 2. Location is known, which makes the stack trace useless. 3. Results a crash if panic_on_warn is set.

It is also noteworthy that the use of WARN is undocumented, and it should be avoided unless there is a carefully considered rationale to use it.

Replace WARN with pr_err, and print the return value instead, which is only useful piece of information.

Which versions are affected by CVE-2024-36975?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-36975?

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-2024-36975 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-36975, DEBIAN-CVE-2024-36975, GHSA-qghg-5qfp-w5r4, UBUNTU-CVE-2024-36975.

Is CVE-2024-36975 in your software?

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

Check your SBOMs for free