CVE-2022-48742 rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink()

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's rtnetlink subsystem allows local 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-2022-48742?

CVE-2022-48742 is a high-severity use after free vulnerability in Linux kernel, published on 20 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:

rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink()

While looking at one unrelated syzbot bug, I found the replay logic in __rtnl_newlink() to potentially trigger use-after-free.

It is better to clear master_dev and m_ops inside the loop, in case we have to replay it.

Weakness: CWE-416

Which versions are affected by CVE-2022-48742?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-48742?

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-2022-48742 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-48742, GHSA-qg8q-9c83-3485, UBUNTU-CVE-2022-48742.

Is CVE-2022-48742 in your software?

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

Check your SBOMs for free