Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2024-53058 — kernel

🔴 CVSS 9.4 — Critical ✅ No Known Exploit NVD
9.4
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data

In the Linux kernel, the following vulnerability has been resolved:

net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data

In case the non-paged data of a SKB carries protocol header and protocol

payload to be transmitted on a certain platform that the DMA AXI address

width is configured to 40-bit/48-bit, or the size of the non-paged data

is bigger than TSO_MAX_BUFF_SIZE on a certain platform that the DMA AXI

address width is configured to 32-bit, then this SKB requires at least

two DMA transmit descriptors to serve it.

For example, three descriptors are allocated to split one DMA buffer

mapped from one piece of non-paged data:

dma_desc[N + 0],

dma_desc[N + 1],

dma_desc[N + 2].

Then three elements of tx_q->tx_skbuff_dma[] will be allocated to hold

extra information to be reused in stmmac_tx_clean():

tx_q->tx_skbuff_dma[N + 0],

tx_q->tx_skbuff_dma[N + 1],

tx_q->tx_skbuff_dma[N + 2].

Now we focus on tx_q->tx_skbuff_dma[entry].buf, which is the DMA buffer

address returned by DMA mapping call. stmmac_tx_clean() will try to

unmap the DMA buffer _ONLY_IF_ tx_q->tx_skbuff_dma[entry].buf

is a valid buffer address.

The expected behavior that saves DMA buffer address of this non-paged

data to tx_q->tx_skbuff_dma[entry].buf is:

tx_q->tx_skbuff_dma[N + 0].buf = NULL;

tx_q->tx_skbuff_dma[N + 1].buf = NULL;

tx_q->tx_skbuff_dma[N + 2].buf = dma_map_single();

Unfortunately, the current code misbehaves like this:

tx_q->tx_skbuff_dma[N + 0].buf = dma_map_single();

tx_q->tx_skbuff_dma[N + 1].buf = NULL;

tx_q->tx_skbuff_dma[N + 2].buf = NULL;

On the stmmac_tx_clean() side, when dma_desc[N + 0] is closed by the

DMA engine, tx_q->tx_skbuff_dma[N + 0].buf is a valid buffer address

obviously, then the DMA buffer will be unmapped immediately.

There may be a rare case that the DMA engine does not finish the

pending dma_desc[N + 1], dma_desc[N + 2] yet. Now things will go

horribly wrong, DMA is going to access a unmapped/unreferenced memory

region, corrupted data will be transmited or iommu fault will be

triggered :(

In contrast, the for-loop that maps SKB fragments behaves perfectly

as expected, and that is how the driver should do for both non-paged

data and paged frags actually.

This patch corrects DMA map/unmap sequences by fixing the array index

for tx_q->tx_skbuff_dma[entry].buf when assigning DMA buffer address.

Tested and verified on DWXGMAC CORE 3.20a

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity low, availability high.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: High — total loss, or loss the attacker controls.

Affected software

CVE-2024-53058 is recorded against 2 packages.

  • kernel (from 6.7.0 up to 6.11.7)
  • linux-kernel

Timeline and source

Published on 19 November 2024 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
lists.debian.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

Other advisories for this package

kernel has other advisories on record. If you are patching this one, these are worth checking on the same host:

CVE-2024-53058 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity Critical
CVSS Score 9.4
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2024-11-19
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.7.0 6.11.7
linux-kernel — —

Similar Threats

Exploit Protection

Are you running kernel?

CVE-2024-53058 carries CVSS 9.4 Critical rating. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2024-53058 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2024
✓