CVE-2021-47170 USB: usbfs: Don't WARN about excessively large memory allocations

Medium 5.5 Published Updated

A local attacker can trigger kernel warnings via large USB transfers, potentially causing log spam or resource exhaustion, requiring a kernel patch.

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-2021-47170?

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

USB: usbfs: Don't WARN about excessively large memory allocations

Syzbot found that the kernel generates a WARNing if the user tries to submit a bulk transfer through usbfs with a buffer that is way too large. This isn't a bug in the kernel; it's merely an invalid request from the user and the usbfs code does handle it correctly.

In theory the same thing can happen with async transfers, or with the packet descriptor table for isochronous transfers.

To prevent the MM subsystem from complaining about these bad allocation requests, add the __GFP_NOWARN flag to the kmalloc calls for these buffers.

Weakness: CWE-770

Which versions are affected by CVE-2021-47170?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47170?

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-2021-47170 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47170, GHSA-c673-578f-v4xm, UBUNTU-CVE-2021-47170.

Is CVE-2021-47170 in your software?

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

Check your SBOMs for free