CVE-2024-50261
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-50261 is a use-after-free vulnerability discovered in the Linux kernel's MACsec (Media Access Control Security) implementation. The vulnerability was identified in the handling of offloading packets, where the metadata_dst, used to store the SCI value for macsec offload, was being freed prematurely while still being used by the driver for packet transmission. The issue affects Linux kernel versions from 6.1 through 6.11.7, including various release candidates of version 6.12 (NVD).

Technical details

The vulnerability stems from a race condition in the macsecfreenetdev() function where metadatadstfree() is called to free the metadatadst structure while it's still being referenced by the network driver for packet transmission. This results in a use-after-free condition that KASAN (Kernel Address Sanitizer) detected during packet transmission in the mlx5exmit function. The issue was traced back to the original implementation introduced by commit 0a28bfd4971f which added MACsec skbmetadatadst Tx Data path support (Kernel Patch). The vulnerability has been assigned a CVSS v3.1 base score of 7.8 (High) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

The vulnerability could potentially lead to system crashes, privilege escalation, or information disclosure due to the use-after-free condition in the kernel's networking stack. The high CVSS score indicates that successful exploitation could result in complete compromise of system confidentiality, integrity, and availability (NVD).

Mitigation and workarounds

The vulnerability has been fixed by replacing metadatadstfree() with dstrelease() in the macsecfreenetdev() function. This ensures that the metadatadst structure is not freed immediately if it's still being referenced by an skb. The fix has been backported to affected stable kernel versions (Kernel Patch). Users should update to patched kernel versions: 6.1.116 or later for the 6.1 series, 6.6.60 or later for the 6.2-6.6 series, and 6.11.7 or later for the 6.7-6.11 series.

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40343MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-riscv
NoYesDec 09, 2025
CVE-2025-40342MEDIUM6.4
  • Linux KernelLinux Kernel
  • linux-azure-5.4
NoYesDec 09, 2025
CVE-2025-40341MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-debug-uki-virt-addons
NoYesDec 09, 2025
CVE-2025-40345N/AN/A
  • Linux KernelLinux Kernel
  • bpftool
NoYesDec 12, 2025
CVE-2025-40344N/AN/A
  • Linux KernelLinux Kernel
  • rtla
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management