# CVE-2024-50261: macsec: Fix use-after-free while sending the offloading packet

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; 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:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-11-09T10:15:14.259Z
- **Modified:** 2026-08-05T11:42:50.813Z

## Who should check

- Anyone running Linux \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 872932cf75cf859804370a265dd58118129386fa; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 9f5ae743dbe9a2458540a7d35fff0f990df025cf; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 4614640f1d5c93c22272117dc256e9940ccac8e8; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< f1e54d11b210b53d418ff1476c6b58a2f434dfc0
- Anyone running Linux 6.1

## Description

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

macsec: Fix use-after-free while sending the offloading packet

KASAN reports the following UAF. The metadata\_dst, which is used to
store the SCI value for macsec offload, is already freed by
metadata\_dst\_free() in macsec\_free\_netdev(), while driver still use it
for sending the packet.

To fix this issue, dst\_release() is used instead to release
metadata\_dst. So it is not freed instantly in macsec\_free\_netdev() if
still referenced by skb.

 BUG: KASAN: slab-use-after-free in mlx5e\_xmit+0x1e8f/0x4190 \[mlx5\_core\]
 Read of size 2 at addr ffff88813e42e038 by task kworker/7:2/714
 \[...\]
 Workqueue: mld mld\_ifc\_work
 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x51/0x60
  print\_report+0xc1/0x600
  kasan\_report+0xab/0xe0
  mlx5e\_xmit+0x1e8f/0x4190 \[mlx5\_core\]
  dev\_hard\_start\_xmit+0x120/0x530
  sch\_direct\_xmit+0x149/0x11e0
  \_\_qdisc\_run+0x3ad/0x1730
  \_\_dev\_queue\_xmit+0x1196/0x2ed0
  vlan\_dev\_hard\_start\_xmit+0x32e/0x510 \[8021q\]
  dev\_hard\_start\_xmit+0x120/0x530
  \_\_dev\_queue\_xmit+0x14a7/0x2ed0
  macsec\_start\_xmit+0x13e9/0x2340
  dev\_hard\_start\_xmit+0x120/0x530
  \_\_dev\_queue\_xmit+0x14a7/0x2ed0
  ip6\_finish\_output2+0x923/0x1a70
  ip6\_finish\_output+0x2d7/0x970
  ip6\_output+0x1ce/0x3a0
  NF\_HOOK.constprop.0+0x15f/0x190
  mld\_sendpack+0x59a/0xbd0
  mld\_ifc\_work+0x48a/0xa80
  process\_one\_work+0x5aa/0xe50
  worker\_thread+0x79c/0x1290
  kthread+0x28f/0x350
  ret\_from\_fork+0x2d/0x70
  ret\_from\_fork\_asm+0x11/0x20
  \</TASK\>

 Allocated by task 3922:
  kasan\_save\_stack+0x20/0x40
  kasan\_save\_track+0x10/0x30
  \_\_kasan\_kmalloc+0x77/0x90
  \_\_kmalloc\_noprof+0x188/0x400
  metadata\_dst\_alloc+0x1f/0x4e0
  macsec\_newlink+0x914/0x1410
  \_\_rtnl\_newlink+0xe08/0x15b0
  rtnl\_newlink+0x5f/0x90
  rtnetlink\_rcv\_msg+0x667/0xa80
  netlink\_rcv\_skb+0x12c/0x360
  netlink\_unicast+0x551/0x770
  netlink\_sendmsg+0x72d/0xbd0
  \_\_sock\_sendmsg+0xc5/0x190
  \_\_\_\_sys\_sendmsg+0x52e/0x6a0
  \_\_\_sys\_sendmsg+0xeb/0x170
  \_\_sys\_sendmsg+0xb5/0x140
  do\_syscall\_64+0x4c/0x100
  entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53

 Freed by task 4011:
  kasan\_save\_stack+0x20/0x40
  kasan\_save\_track+0x10/0x30
  kasan\_save\_free\_info+0x37/0x50
  poison\_slab\_object+0x10c/0x190
  \_\_kasan\_slab\_free+0x11/0x30
  kfree+0xe0/0x290
  macsec\_free\_netdev+0x3f/0x140
  netdev\_run\_todo+0x450/0xc70
  rtnetlink\_rcv\_msg+0x66f/0xa80
  netlink\_rcv\_skb+0x12c/0x360
  netlink\_unicast+0x551/0x770
  netlink\_sendmsg+0x72d/0xbd0
  \_\_sock\_sendmsg+0xc5/0x190
  \_\_\_\_sys\_sendmsg+0x52e/0x6a0
  \_\_\_sys\_sendmsg+0xeb/0x170
  \_\_sys\_sendmsg+0xb5/0x140
  do\_syscall\_64+0x4c/0x100
  entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53

## Affected and fixed versions

- Linux: \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 872932cf75cf859804370a265dd58118129386fa; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 9f5ae743dbe9a2458540a7d35fff0f990df025cf; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 4614640f1d5c93c22272117dc256e9940ccac8e8; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< f1e54d11b210b53d418ff1476c6b58a2f434dfc0 (cvelist)
- Linux: 6.1 (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-50261. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50261.md
Affected: Linux >= 0a28bfd4971fd570d1f3e4653b21415becefc92c, < 872932cf75cf859804370a265dd58118129386fa; >= 0a28bfd4971fd570d1f3e4653b21415becefc92c, < 9f5ae743dbe9a2458540a7d35fff0f990df025cf; >= 0a28bfd4971fd570d1f3e4653b21415becefc92c, < 4614640f1d5c93c22272117dc256e9940ccac8e8; >= 0a28bfd4971fd570d1f3e46…
Fixed in: Linux 872932cf75cf859804370a265dd58118129386fa, Linux 9f5ae743dbe9a2458540a7d35fff0f990df025cf, Linux 4614640f1d5c93c22272117dc256e9940ccac8e8

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-50261 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 872932cf75cf859804370a265dd58118129386fa; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 9f5ae743dbe9a2458540a7d35fff0f990df025cf; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< 4614640f1d5c93c22272117dc256e9940ccac8e8; \>= 0a28bfd4971fd570d1f3e4653b21415becefc92c, \< f1e54d11b210b53d418ff1476c6b58a2f434dfc0; Linux 6.1.

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

Yes. Fixed in Linux 872932cf75cf859804370a265dd58118129386fa, Linux 9f5ae743dbe9a2458540a7d35fff0f990df025cf, Linux 4614640f1d5c93c22272117dc256e9940ccac8e8. No fix listed yet: follow the vendor advisory.

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

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/872932cf75cf859804370a265dd58118129386fa>
- patch: <https://git.kernel.org/stable/c/9f5ae743dbe9a2458540a7d35fff0f990df025cf>
- patch: <https://git.kernel.org/stable/c/4614640f1d5c93c22272117dc256e9940ccac8e8>
- patch: <https://git.kernel.org/stable/c/f1e54d11b210b53d418ff1476c6b58a2f434dfc0>
- 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-50261>

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