CVE-2024-58034 memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's Tegra20 EMC driver allows attackers to potentially 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-2024-58034?

CVE-2024-58034 is a high-severity use after free vulnerability in Linux kernel, published on 27 Feb 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:

memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()

As of_find_node_by_name() release the reference of the argument device node, tegra_emc_find_node_by_ram_code() releases some device nodes while still in use, resulting in possible UAFs. According to the bindings and the in-tree DTS files, the "emc-tables" node is always device's child node with the property "nvidia,use-ram-code", and the "lpddr2" node is a child of the "emc-tables" node. Thus utilize the for_each_child_of_node() macro and of_get_child_by_name() instead of of_find_node_by_name() to simplify the code.

This bug was found by an experimental verification tool that I am developing.

[krzysztof: applied v1, adjust the commit msg to incorporate v2 parts]

Weakness: CWE-416

Which versions are affected by CVE-2024-58034?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-58034?

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

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-58034, DEBIAN-CVE-2024-58034, GHSA-fhjf-w34g-fcvp, ROOT-OS-DEBIAN-11-CVE-2024-58034, ROOT-OS-UBUNTU-2404-CVE-2024-58034, UBUNTU-CVE-2024-58034.

Is CVE-2024-58034 in your software?

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

Check your SBOMs for free