CVE-2024-26669

CVE Details

Release Date:2024-04-02

Description


In the Linux kernel, the following vulnerability has been resolved:\nnet/sched: flower: Fix chain template offload\nWhen a qdisc is deleted from a net device the stack instructs the\nunderlying driver to remove its flow offload callback from the\nassociated filter block using the 'FLOW_BLOCK_UNBIND' command. The stack\nthen continues to replay the removal of the filters in the block for\nthis driver by iterating over the chains in the block and invoking the\n'reoffload' operation of the classifier being used. In turn, the\nclassifier in its 'reoffload' operation prepares and emits a\n'FLOW_CLS_DESTROY' command for each filter.\nHowever, the stack does not do the same for chain templates and the\nunderlying driver never receives a 'FLOW_CLS_TMPLT_DESTROY' command when\na qdisc is deleted. This results in a memory leak [1] which can be\nreproduced using [2].\nFix by introducing a 'tmplt_reoffload' operation and have the stack\ninvoke it with the appropriate arguments as part of the replay.\nImplement the operation in the sole classifier that supports chain\ntemplates (flower) by emitting the 'FLOW_CLS_TMPLT_{CREATE,DESTROY}'\ncommand based on whether a flow offload callback is being bound to a\nfilter block or being unbound from one.\nAs far as I can tell, the issue happens since cited commit which\nreordered tcf_block_offload_unbind() before tcf_block_flush_all_chains()\nin __tcf_block_put(). The order cannot be reversed as the filter block\nis expected to be freed after flushing all the chains.\n[1]\nunreferenced object 0xffff888107e28800 (size 2048):\ncomm 'tc', pid 1079, jiffies 4294958525 (age 3074.287s)\nhex dump (first 32 bytes):\nb1 a6 7c 11 81 88 ff ff e0 5b b3 10 81 88 ff ff ..|......[......\n01 00 00 00 00 00 00 00 e0 aa b0 84 ff ff ff ff ................\nbacktrace:\n[] __kmem_cache_alloc_node+0x1e8/0x320\n[] __kmalloc+0x4e/0x90\n[] mlxsw_sp_acl_ruleset_get+0x34d/0x7a0\n[] mlxsw_sp_flower_tmplt_create+0x145/0x180\n[] mlxsw_sp_flow_block_cb+0x1ea/0x280\n[] tc_setup_cb_call+0x183/0x340\n[] fl_tmplt_create+0x3da/0x4c0\n[] tc_ctl_chain+0xa15/0x1170\n[] rtnetlink_rcv_msg+0x3cc/0xed0\n[] netlink_rcv_skb+0x170/0x440\n[] netlink_unicast+0x540/0x820\n[] netlink_sendmsg+0x8d8/0xda0\n[] ____sys_sendmsg+0x30f/0xa80\n[] ___sys_sendmsg+0x13a/0x1e0\n[] __sys_sendmsg+0x11c/0x1f0\n[] do_syscall_64+0x40/0xe0\nunreferenced object 0xffff88816d2c0400 (size 1024):\ncomm 'tc', pid 1079, jiffies 4294958525 (age 3074.287s)\nhex dump (first 32 bytes):\n40 00 00 00 00 00 00 00 57 f6 38 be 00 00 00 00 @.......W.8.....\n10 04 2c 6d 81 88 ff ff 10 04 2c 6d 81 88 ff ff ..,m......,m....\nbacktrace:\n[] __kmem_cache_alloc_node+0x1e8/0x320\n[] __kmalloc_node+0x51/0x90\n[] kvmalloc_node+0xa6/0x1f0\n[] bucket_table_alloc.isra.0+0x83/0x460\n[] rhashtable_init+0x43b/0x7c0\n[] mlxsw_sp_acl_ruleset_get+0x428/0x7a0\n[] mlxsw_sp_flower_tmplt_create+0x145/0x180\n[] mlxsw_sp_flow_block_cb+0x1ea/0x280\n[] tc_setup_cb_call+0x183/0x340\n[] fl_tmplt_create+0x3da/0x4c0\n[] tc_ctl_chain+0xa15/0x1170\n[] rtnetlink_rcv_msg+0x3cc/0xed0\n[] netlink_rcv_skb+0x170/0x440\n[] netlink_unicast+0x540/0x820\n[] netlink_sendmsg+0x8d8/0xda0\n[] ____sys_sendmsg+0x30f/0xa80\n[2]\n# tc qdisc add dev swp1 clsact\n# tc chain add dev swp1 ingress proto ip chain 1 flower dst_ip 0.0.0.0/32\n# tc qdisc del dev\n---truncated---

See more information about CVE-2024-26669 from MITRE CVE dictionary and NIST NVD


CVSS Scoring


NOTE: The following CVSS v3.1 metrics and score provided are preliminary and subject to review.

Base Score: 7.1 CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Attack Vector: Local network Attack Complexity: Low
Privileges Required: Low User Interaction: None
Scope: Unchanged Confidentiality Impact: High
Integrity Impact: None Availability Impact: High

Errata information


PlatformErrataRelease Date
Oracle Linux version 8 (kernel)ELSA-2024-51012024-08-08
Oracle Linux version 9 (kernel)ELSA-2024-93152024-11-14


This page is generated automatically and has not been checked for errors or omissions. For clarification or corrections:

software.hardware.complete