CVE-2024-40940

Kernel memory corruption via repeated pointer deletion

Published Jul 12, 2024 · Updated May 11, 2026

Double-free in the mlx5 driver in affected Linux kernel releases from 5.19 allows local users to corrupt memory via failed flow-rule creation. mlx5_lag_create_port_sel_table() reuses an error-tainted rules pointer during cleanup and deletes it repeatedly instead of deleting each previously created rule. Reachability requires the mlx5 LAG port-selection path and a flow-rule creation failure; the resulting corruption can crash the kernel or overwrite kernel-controlled data.

CVSS severity7.8
High
EPSS probability0.26%
Next 30 days · Sep 16, 2026
Known exploitationUnconfirmed
Based on sourced intelligence
Hinoki checkNot available
Coverage for this vulnerability

See if you're affected

Explore vulnerability checks for your environment with Hinoki.

Book a demo

Summary

What happened

Double-free in the mlx5 driver in affected Linux kernel releases from 5.19 allows local users to corrupt memory via failed flow-rule creation. mlx5_lag_create_port_sel_table() reuses an error-tainted rules pointer during cleanup and deletes it repeatedly instead of deleting each previously created rule. Reachability requires the mlx5 LAG port-selection path and a flow-rule creation failure; the resulting corruption can crash the kernel or overwrite kernel-controlled data.

The record

CVE
CVE-2024-40940
Published
Jul 12, 2024
Updated
May 11, 2026
Vendor
The Linux Kernel Organization
Product
Linux
Classifications
CWE-415, T1068
Attack vector
local
Privileges
authenticated

Timeline

How it unfolded

  1. Jul 12, 2024CVE publishedPublication date reported by the CVE source.
  2. May 11, 2026Record updatedLatest update available in the CVE record.

Exploitability

Present is not the same as exploitable

Compare your product and version with the public record. A matching version still requires validation against your environment.

Is a vulnerable build present?

Compare these published version ranges with your installed build and any vendor patches.

  1. Affected versionversion=352899f384d4aefa77ede6310d08c1b515612a8f <229bedbf62b13af5aba6525ad10b62ad38d9ccb5
  2. Affected versionversion=352899f384d4aefa77ede6310d08c1b515612a8f <531eab2da27dd42d68dfb841d82e987f4a6738b8
  3. Affected versionversion=352899f384d4aefa77ede6310d08c1b515612a8f <a03a3fa12769e25f4385bee587afe1445aee7f7a
  4. Affected versionversion=352899f384d4aefa77ede6310d08c1b515612a8f <d857df86837ac1c30592e8a068204d16feac9930
  5. Affected versionversion=5.19

What conditions does exploitation require?

Attack vectorlocal
Required privilegesauthenticated

What is affected?

The Linux Kernel Organization · Linuxversion=352899f384d4aefa77ede6310d08c1b515612a8f <229bedbf62b13af5aba6525ad10b62ad38d9ccb5; version=352899f384d4aefa77ede6310d08c1b515612a8f <531eab2da27dd42d68dfb841d82e987f4a6738b8; version=352899f384d4aefa77ede6310d08c1b515612a8f <a03a3fa12769e25f4385bee587afe1445aee7f7a; version=352899f384d4aefa77ede6310d08c1b515612a8f <d857df86837ac1c30592e8a068204d16feac9930; version=5.19

Published CVSS scores

7.8CanonicalCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CVSS describes severity. EPSS estimates exploitation probability.

Attacks

What attackers are doing with it

Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.

Daily unique IPsNo honeypot observations are available for this CVE in the selected window.

No observations available

Sep 9, 2026Sep 15, 2026
Latest reporting daySep 15, 2026
Latest daily unique IPsUnavailable
Prior 30-day averageUnavailable
SourceShadowserver honeypots (KEV)
Vectorlocal
Privilegesauthenticated
Known exploitationUnconfirmed
Public exploitUnconfirmed

Weakness, pattern, technique

CWE-415Double Free
T1068Exploitation for Privilege Escalation

Public exploit references

No public exploit references are available in this record.

Labels summarize the accepted research assessment. They do not indicate a test against your environment.

Technologies

Your stack

See the directory against your own environment.

Your stack

Check the software in your environment

Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.

Book a demo