{"api_version":"1","generated_at":"2026-12-04T05:37:26+00:00","cve":"CVE-2026-143258","urls":{"html":"https://cve.report/CVE-2026-143258","api":"https://cve.report/api/cve/CVE-2026-143258.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-143258","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-143258"},"summary":{"title":"net/mlx5e: TC, Fix double free of branch in failure","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-12-03 10:18:05","updated_at":"2026-12-04 04:17:45"},"problem_types":[],"metrics":[{"version":"3.1","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"7.8","severity":"HIGH","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","data":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://git.kernel.org/stable/c/4dfba871c220c3581dada988f6ba57104163111c","name":"https://git.kernel.org/stable/c/4dfba871c220c3581dada988f6ba57104163111c","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/46296baedd20ca100cdc2260415d02a65596e76d","name":"https://git.kernel.org/stable/c/46296baedd20ca100cdc2260415d02a65596e76d","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/014272105371b140affcee740039cb5f6dc63baa","name":"https://git.kernel.org/stable/c/014272105371b140affcee740039cb5f6dc63baa","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/31f9b43a3bb3d2201eadd147440252d0912dab21","name":"https://git.kernel.org/stable/c/31f9b43a3bb3d2201eadd147440252d0912dab21","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-143258","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143258","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f86488cb4685bbb885057afa0b61bb8afc1d6bb1 4dfba871c220c3581dada988f6ba57104163111c git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f86488cb4685bbb885057afa0b61bb8afc1d6bb1 46296baedd20ca100cdc2260415d02a65596e76d git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f86488cb4685bbb885057afa0b61bb8afc1d6bb1 014272105371b140affcee740039cb5f6dc63baa git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected f86488cb4685bbb885057afa0b61bb8afc1d6bb1 31f9b43a3bb3d2201eadd147440252d0912dab21 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.2","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.120 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.66 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.7 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"143258","cve":"CVE-2026-143258","epss":"0.002090000","percentile":"0.116650000","score_date":"2026-12-03","updated_at":"2026-12-04 00:14:18"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"4dfba871c220c3581dada988f6ba57104163111c","status":"affected","version":"f86488cb4685bbb885057afa0b61bb8afc1d6bb1","versionType":"git"},{"lessThan":"46296baedd20ca100cdc2260415d02a65596e76d","status":"affected","version":"f86488cb4685bbb885057afa0b61bb8afc1d6bb1","versionType":"git"},{"lessThan":"014272105371b140affcee740039cb5f6dc63baa","status":"affected","version":"f86488cb4685bbb885057afa0b61bb8afc1d6bb1","versionType":"git"},{"lessThan":"31f9b43a3bb3d2201eadd147440252d0912dab21","status":"affected","version":"f86488cb4685bbb885057afa0b61bb8afc1d6bb1","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_tc.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.2"},{"lessThan":"6.2","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.120","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.66","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.7","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.120","versionStartIncluding":"6.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.66","versionStartIncluding":"6.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.7","versionStartIncluding":"6.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc3","versionStartIncluding":"6.2","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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":{"baseScore":7.8,"baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"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."}]}],"providerMetadata":{"dateUpdated":"2026-12-04T03:31:54.691Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-143258","datePublished":"2026-12-03T09:21:04.667Z","dateReserved":"2026-12-03T03:10:28.363Z","dateUpdated":"2026-12-04T03:31:54.691Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-12-03 10:18:05","lastModifiedDate":"2026-12-04 04:17:45","problem_types":[],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"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","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"143258","Ordinal":"1","Title":"net/mlx5e: TC, Fix double free of branch in failure","CVE":"CVE-2026-143258","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"143258","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"net/mlx5e: TC, Fix double free of branch in failure"}]}}}