CVE-2024-43835 virtio_net: Fix napi_skb_cache_put warning

Medium 5.5 Published Updated

A bug in the Linux kernel's virtio_net driver causes a warning and potential instability when handling network packets outside of NAPI context.

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

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

virtio_net: Fix napi_skb_cache_put warning

After the commit bdacf3e34945 ("net: Use nested-BH locking for napi_alloc_cache.") was merged, the following warning began to appear:

WARNING: CPU: 5 PID: 1 at net/core/skbuff.c:1451 napi_skb_cache_put+0x82/0x4b0

__warn+0x12f/0x340 napi_skb_cache_put+0x82/0x4b0 napi_skb_cache_put+0x82/0x4b0 report_bug+0x165/0x370 handle_bug+0x3d/0x80 exc_invalid_op+0x1a/0x50 asm_exc_invalid_op+0x1a/0x20 __free_old_xmit+0x1c8/0x510 napi_skb_cache_put+0x82/0x4b0 __free_old_xmit+0x1c8/0x510 __free_old_xmit+0x1c8/0x510 __pfx___free_old_xmit+0x10/0x10

The issue arises because virtio is assuming it's running in NAPI context even when it's not, such as in the netpoll case.

To resolve this, modify virtnet_poll_tx() to only set NAPI when budget is available. Same for virtnet_poll_cleantx(), which always assumed that it was in a NAPI context.

Which versions are affected by CVE-2024-43835?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-43835?

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-43835 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-51969, AZL-51995, BELL-CVE-2024-43835, DEBIAN-CVE-2024-43835, GHSA-vgj5-hqjj-6hcj, UBUNTU-CVE-2024-43835.

Is CVE-2024-43835 in your software?

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

Check your SBOMs for free