# CVE-2024-53138: net/mlx5e: kTLS, Fix incorrect page refcounting

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 1.00% (percentile 62, 2026-11-26)
- **Published:** 2024-12-04T14:20:43.395Z
- **Modified:** 2026-10-15T22:18:00.253Z

## Who should check

- Anyone running Linux \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< a0ddb20a748b122ea86003485f7992fa5e84cc95; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< ffad2ac8c859c1c1a981fe9c4f7ff925db684a43; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< c7b97f9e794d8e2bbaa50e1d6c230196fd214b5e; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 69fbd07f17b0fdaf8970bc705f5bf115c297839d; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 93a14620b97c911489a5b008782f3d9b0c4aeff4; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 2723e8b2cbd486cb96e5a61b22473f7fd62e18df; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< dd6e972cc5890d91d6749bb48e3912721c4e4b25
- Anyone running Linux 5.4

## Description

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

net/mlx5e: kTLS, Fix incorrect page refcounting

The kTLS tx handling code is using a mix of get\_page() and
page\_ref\_inc() APIs to increment the page reference. But on the release
path (mlx5e\_ktls\_tx\_handle\_resync\_dump\_comp()), only put\_page() is used.

This is an issue when using pages from large folios: the get\_page()
references are stored on the folio page while the page\_ref\_inc()
references are stored directly in the given page. On release the folio
page will be dereferenced too many times.

This was found while doing kTLS testing with sendfile() + ZC when the
served file was read from NFS on a kernel with NFS large folios support
(commit 49b29a573da8 ("nfs: add support for large folios")).

## Affected and fixed versions

- Linux: \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< a0ddb20a748b122ea86003485f7992fa5e84cc95; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< ffad2ac8c859c1c1a981fe9c4f7ff925db684a43; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< c7b97f9e794d8e2bbaa50e1d6c230196fd214b5e; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 69fbd07f17b0fdaf8970bc705f5bf115c297839d; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 93a14620b97c911489a5b008782f3d9b0c4aeff4; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 2723e8b2cbd486cb96e5a61b22473f7fd62e18df; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< dd6e972cc5890d91d6749bb48e3912721c4e4b25 (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-53138. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53138.md
Affected: Linux >= 84d1bb2b139e0184b1754aa1b5776186b475fce8, < a0ddb20a748b122ea86003485f7992fa5e84cc95; >= 84d1bb2b139e0184b1754aa1b5776186b475fce8, < ffad2ac8c859c1c1a981fe9c4f7ff925db684a43; >= 84d1bb2b139e0184b1754aa1b5776186b475fce8, < c7b97f9e794d8e2bbaa50e1d6c230196fd214b5e; >= 84d1bb2b139e0184b1754aa…
Fixed in: Linux 69fbd07f17b0fdaf8970bc705f5bf115c297839d, Linux 93a14620b97c911489a5b008782f3d9b0c4aeff4, Linux 2723e8b2cbd486cb96e5a61b22473f7fd62e18df

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-53138 being exploited?

There is no confirmed exploitation: CVE-2024-53138 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.00% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-53138?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2024-53138?

Linux \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< a0ddb20a748b122ea86003485f7992fa5e84cc95; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< ffad2ac8c859c1c1a981fe9c4f7ff925db684a43; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< c7b97f9e794d8e2bbaa50e1d6c230196fd214b5e; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 69fbd07f17b0fdaf8970bc705f5bf115c297839d; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 93a14620b97c911489a5b008782f3d9b0c4aeff4; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< 2723e8b2cbd486cb96e5a61b22473f7fd62e18df; \>= 84d1bb2b139e0184b1754aa1b5776186b475fce8, \< dd6e972cc5890d91d6749bb48e3912721c4e4b25; Linux 5.4.

### Is there a fix for CVE-2024-53138?

Yes. Fixed in Linux 69fbd07f17b0fdaf8970bc705f5bf115c297839d, Linux 93a14620b97c911489a5b008782f3d9b0c4aeff4, Linux 2723e8b2cbd486cb96e5a61b22473f7fd62e18df. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-53138?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/69fbd07f17b0fdaf8970bc705f5bf115c297839d>
- patch: <https://git.kernel.org/stable/c/93a14620b97c911489a5b008782f3d9b0c4aeff4>
- patch: <https://git.kernel.org/stable/c/2723e8b2cbd486cb96e5a61b22473f7fd62e18df>
- patch: <https://git.kernel.org/stable/c/dd6e972cc5890d91d6749bb48e3912721c4e4b25>
- other: <https://git.kernel.org/stable/c/a0ddb20a748b122ea86003485f7992fa5e84cc95>
- other: <https://git.kernel.org/stable/c/ffad2ac8c859c1c1a981fe9c4f7ff925db684a43>
- other: <https://git.kernel.org/stable/c/c7b97f9e794d8e2bbaa50e1d6c230196fd214b5e>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-53138>

HTML: <https://flawdb.com/CVE-2024-53138> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-53138>
