Files
vuln-cve/data/2023/54xxx/CVE-2023-54074.json
T

159 lines
10 KiB
JSON

{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2023-54074",
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"state": "PUBLISHED",
"assignerShortName": "Linux",
"dateReserved": "2025-12-24T12:21:05.093Z",
"datePublished": "2025-12-24T12:23:16.920Z",
"dateUpdated": "2026-08-05T09:16:58.648Z"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux",
"dateUpdated": "2026-08-05T09:16:58.648Z"
},
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: Use correct encap attribute during invalidation\n\nWith introduction of post action infrastructure most of the users of encap\nattribute had been modified in order to obtain the correct attribute by\ncalling mlx5e_tc_get_encap_attr() helper instead of assuming encap action\nis always on default attribute. However, the cited commit didn't modify\nmlx5e_invalidate_encap() which prevents it from destroying correct modify\nheader action which leads to a warning [0]. Fix the issue by using correct\nattribute.\n\n[0]:\n\nFeb 21 09:47:35 c-237-177-40-045 kernel: WARNING: CPU: 17 PID: 654 at drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:684 mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core]\nFeb 21 09:47:35 c-237-177-40-045 kernel: RIP: 0010:mlx5e_tc_attach_mod_hdr+0x1cc/0x230 [mlx5_core]\nFeb 21 09:47:35 c-237-177-40-045 kernel: Call Trace:\nFeb 21 09:47:35 c-237-177-40-045 kernel: <TASK>\nFeb 21 09:47:35 c-237-177-40-045 kernel: mlx5e_tc_fib_event_work+0x8e3/0x1f60 [mlx5_core]\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? mlx5e_take_all_encap_flows+0xe0/0xe0 [mlx5_core]\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? lock_downgrade+0x6d0/0x6d0\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x273/0x3f0\nFeb 21 09:47:35 c-237-177-40-045 kernel: process_one_work+0x7c2/0x1310\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? lockdep_hardirqs_on_prepare+0x3f0/0x3f0\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? pwq_dec_nr_in_flight+0x230/0x230\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? rwlock_bug.part.0+0x90/0x90\nFeb 21 09:47:35 c-237-177-40-045 kernel: worker_thread+0x59d/0xec0\nFeb 21 09:47:35 c-237-177-40-045 kernel: ? __kthread_parkme+0xd9/0x1d0"
}
],
"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 vulnerable path requires locally installed offloaded tc flower rules on an mlx5 representor in switchdev mode, and is driven by local FIB/route notifier events rather than by processing attacker-supplied packets. There is no remote packet-parsing path into `mlx5e_invalidate_encap()`.\nAC:L - No race or unpredictable state is involved — any flow whose encap action sits on a post-action attribute (encap combined with CT/sample, the standard OVS-offload configuration) deterministically takes the wrong-attribute path on every route invalidation. Route flaps that trigger it are freely repeatable.\nPR:L - Installing the offloaded tc flower encap+CT rules and changing routes requires CAP_NET_ADMIN, which per kernel CNA convention is scored as low privilege rather than full root. No further authentication gate exists past that point.\nUI:N - Once the offloaded flows exist, the bug fires automatically from the FIB notifier workqueue on a route replace or delete. No victim action is needed.\nS:U - The corruption and crash are confined to the kernel's own security authority; although incorrect eswitch steering rules can affect VF traffic separation, the vulnerable and impacted components share the same kernel privilege domain.\nC:H - The real encap attribute retains `MLX5_ESW_DEST_ENCAP_VALID` with a dangling pointer to the freed `pkt_reformat` object, and that stale pointer is consumed by `esw_setup_vport_dest()`/`mlx5_cmd_set_fte()` — a use-after-free read of reallocated heap contents that can also cause packets to be encapsulated/steered with stale headers, leaking data across vports.\nI:H - The use-after-free plus the overwritten `attr->mh` and cleared `modify_hdr` let attacker-controlled reallocated heap contents drive hardware flow-steering programming, and rules are reinstalled without their intended header rewrite, corrupting eswitch forwarding state.\nA:H - The path yields a `WARN_ON()` splat (fatal under panic_on_warn), a NULL pointer dereference of `modify_hdr->id` during reoffload, and an unbounded per-flap leak of mod-header handles and firmware contexts that eventually breaks all rule offload."
}
]
}
],
"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_tun_encap.c"
],
"versions": [
{
"version": "8300f225268be9ee2c0daf5a3f23929fcdcbf213",
"lessThan": "00959a1bad58e4b6c14a2729f84d354255073609",
"status": "affected",
"versionType": "git"
},
{
"version": "8300f225268be9ee2c0daf5a3f23929fcdcbf213",
"lessThan": "b8b4292fdd8818ab43b943b6717811651f51e39f",
"status": "affected",
"versionType": "git"
},
{
"version": "8300f225268be9ee2c0daf5a3f23929fcdcbf213",
"lessThan": "be071cdb167fc3e25fe81922166b3d499d23e8ac",
"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_tun_encap.c"
],
"versions": [
{
"version": "5.18",
"status": "affected"
},
{
"version": "0",
"lessThan": "5.18",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.1.31",
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.3.5",
"lessThanOrEqual": "6.3.*",
"status": "unaffected",
"versionType": "semver"
},
{
"version": "6.4",
"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": "5.18",
"versionEndExcluding": "6.1.31"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.18",
"versionEndExcluding": "6.3.5"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionStartIncluding": "5.18",
"versionEndExcluding": "6.4"
}
]
}
]
}
],
"references": [
{
"url": "https://git.kernel.org/stable/c/00959a1bad58e4b6c14a2729f84d354255073609"
},
{
"url": "https://git.kernel.org/stable/c/b8b4292fdd8818ab43b943b6717811651f51e39f"
},
{
"url": "https://git.kernel.org/stable/c/be071cdb167fc3e25fe81922166b3d499d23e8ac"
}
],
"title": "net/mlx5e: Use correct encap attribute during invalidation",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
}
}