{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143258",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.363Z",
        "datePublished": "2026-12-03T09:21:04.667Z",
        "dateUpdated": "2026-12-04T03:31:54.691Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-04T03:31:54.691Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: TC, Fix double free of branch in failure\n\nWhen allocating the false branch fails in parse_branch_ctrl(), the\nalready allocated true branch is freed but attr->branch_true is left\npointing to it. The caller parse_tc_actions() fails the flow, and\nfree_flow_post_acts(), mlx5_free_flow_attr_actions() which calls again\nfree_branch_attr() on attr->branch_true.\n\nClear the pointer after freeing it.\n\nThis bug is theoretical and was compile tested only."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The attacker-controlled notexceed and exceed act_ids arrive in RTM_NEWTFILTER, are copied by tcf_police_offload_act_setup() into flow_action_entry.police, and reach parse_branch_ctrl() via tc_new_tfilter(), mlx5e_rep_setup_tc_cb(), mlx5e_configure_flower(), and parse_tc_fdb_actions().\nAC:L - The attacker sets both police branches to FLOW_ACTION_JUMP with a non-zero extval. alloc_branch_attr() stores that extval from the true branch and then rejects the false branch as a nested jump (-EOPNOTSUPP) on every such filter, once tc_act_can_offload_police() has passed because mlx5e_get_flow_meters() is non-NULL in switchdev.\nPR:L - rtnetlink_rcv_msg() requires netlink_net_capable(CAP_NET_ADMIN) for RTM_NEWTFILTER, checking the socket netns user namespace. mlx5e_rep_setup_tc_cb() adds no init_user_ns check, so CAP_NET_ADMIN in a user namespace that owns the mlx5 switchdev representor is sufficient.\nUI:N - The attacker sends the flower police filter in one RTM_NEWTFILTER; parse_branch_ctrl() fails and mlx5e_tc_del_fdb_flow() double-frees inside that same call.\nS:U - The freed object is a branch mlx5_flow_attr allocated by mlx5_alloc_flow_attr() and released by free_branch_attr() inside the host mlx5 driver. The corruption stays in that kernel security authority.\nC:H - parse_branch_ctrl() free_branch_attr()s the true branch and, before the fix, leaves attr->branch_true set. mlx5e_tc_del_fdb_flow() then mlx5_free_flow_attr_actions() calls free_branch_attr() again, which reads action, parse_attr, and branch pointers from the freed object. Slab reuse of that mlx5_flow_attr yields a kernel read primitive.\nI:H - The second free_branch_attr() kvfree()s the branch's parse_attr and kfree()s the mlx5_flow_attr a second time. If the slab slot was reallocated, those frees release attacker-controlled pointers and corrupt freelist metadata, giving a write and control-flow primitive.\nA:H - The double kfree of the branch mlx5_flow_attr in free_branch_attr(), invoked from mlx5e_tc_del_fdb_flow() on the nested-jump error path, corrupts the slab freelist and oopses the kernel."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"
                    ],
                    "versions": [
                        {
                            "version": "f86488cb4685bbb885057afa0b61bb8afc1d6bb1",
                            "lessThan": "4dfba871c220c3581dada988f6ba57104163111c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f86488cb4685bbb885057afa0b61bb8afc1d6bb1",
                            "lessThan": "46296baedd20ca100cdc2260415d02a65596e76d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f86488cb4685bbb885057afa0b61bb8afc1d6bb1",
                            "lessThan": "014272105371b140affcee740039cb5f6dc63baa",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f86488cb4685bbb885057afa0b61bb8afc1d6bb1",
                            "lessThan": "31f9b43a3bb3d2201eadd147440252d0912dab21",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"
                    ],
                    "versions": [
                        {
                            "version": "6.2",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.2",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.120",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc3",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2",
                                    "versionEndExcluding": "6.12.120"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.2",
                                    "versionEndExcluding": "7.4-rc3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/4dfba871c220c3581dada988f6ba57104163111c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/46296baedd20ca100cdc2260415d02a65596e76d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/014272105371b140affcee740039cb5f6dc63baa"
                },
                {
                    "url": "https://git.kernel.org/stable/c/31f9b43a3bb3d2201eadd147440252d0912dab21"
                }
            ],
            "title": "net/mlx5e: TC, Fix double free of branch in failure",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}