Vulnerability · Published Nov 9, 2024 · Assigned by Linux
CVE-2024-50261macsec: Fix use-after-free while sending the offloading packet
High 7.8
In plain English
A high-severity use-after-free in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.119-1 | DEBIAN-CVE-2024-50261 |
| Debian:12 | linux | 6.1.119-1 | DSA-5818-1 |
| Debian:13 | linux | 6.11.7-1 | DEBIAN-CVE-2024-50261 |
| Debian:14 | linux | 6.11.7-1 | DEBIAN-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux | 6.8.0-58.60 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1027.29 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1027.29~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1027.32 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | 6.11.0-1012.12~24.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1027.32~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | 6.8.0-1014.15 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1028.30 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | 6.11.0-1011.11~24.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1028.30~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1023.27 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1010.12 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-58.60~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1024.24 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1024.24~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-58.60.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-58.60.1~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1026.29 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | 6.11.0-1007.7 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1026.29~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1026.29.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1008.8 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | 6.11.0-1015.15 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | 6.8.0-1026.26 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1024.25 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1024.25~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1028.32 | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-riscv | 6.8.0-58.60.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-58.60.1~22.04.1 | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2024-50261 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1017.18 | UBUNTU-CVE-2024-50261 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 0a28bfd4971fd570d1f3e4653b21415becefc92c – before 872932cf75cf859804370a265dd58118129386fa0a28bfd4971fd570d1f3e4653b21415becefc92c – before 9f5ae743dbe9a2458540a7d35fff0f990df025cf0a28bfd4971fd570d1f3e4653b21415becefc92c – before 4614640f1d5c93c22272117dc256e9940ccac8e80a28bfd4971fd570d1f3e4653b21415becefc92c – before f1e54d11b210b53d418ff1476c6b58a2f434dfc0 |
| Linux | Linux | 6.1 |
Weakness: CWE-416 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://git.kernel.org/stable/c/872932cf75cf859804370a265dd58118129386fa
- https://git.kernel.org/stable/c/9f5ae743dbe9a2458540a7d35fff0f990df025cf
- https://git.kernel.org/stable/c/4614640f1d5c93c22272117dc256e9940ccac8e8
- https://git.kernel.org/stable/c/f1e54d11b210b53d418ff1476c6b58a2f434dfc0
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html