CVE-2024-43839 bna: adjust 'name' buf size of bna_tcb and bna_ccb structures

High 7.8 Published Updated

A buffer overflow in the Linux kernel bna driver allows attackers to cause memory corruption, potentially leading to code execution or system crashes.

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

CVE-2024-43839 is a high-severity memory corruption vulnerability in Debian Debian Linux, 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:

bna: adjust 'name' buf size of bna_tcb and bna_ccb structures

To have enough space to write all possible sprintf() args. Currently 'name' size is 16, but the first '%s' specifier may already need at least 16 characters, since 'bnad->netdev->name' is used there.

For '%d' specifiers, assume that they require: * 1 char for 'tx_id + tx_info->tcb[i]->id' sum, BNAD_MAX_TXQ_PER_TX is 8 * 2 chars for 'rx_id + rx_info->rx_ctrl[i].ccb->id', BNAD_MAX_RXP_PER_RX is 16

And replace sprintf with snprintf.

Detected using the static analysis tool - Svace.

Weakness: CWE-787

Which versions are affected by CVE-2024-43839?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-43839?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-43839 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-51983, BELL-CVE-2024-43839, DEBIAN-CVE-2024-43839, GHSA-gc28-phwf-f5ww, UBUNTU-CVE-2024-43839.

Is CVE-2024-43839 in your software?

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

Check your SBOMs for free