{"id":"CVE-2024-53120","state":"PUBLISHED","title":"net/mlx5e: CT: Fix null-ptr-deref in add rule err flow","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: CT: Fix null-ptr-deref in add rule err flow\n\nIn error flow of mlx5_tc_ct_entry_add_rule(), in case ct_rule_add()\ncallback returns error, zone_rule->attr is used uninitiated. Fix it to\nuse attr which has the needed pointer value.\n\nKernel log:\n BUG: kernel NULL pointer dereference, address: 0000000000000110\n RIP: 0010:mlx5_tc_ct_entry_add_rule+0x2b1/0x2f0 [mlx5_core]\n…\n Call Trace:\n  <TASK>\n  ? __die+0x20/0x70\n  ? page_fault_oops+0x150/0x3e0\n  ? exc_page_fault+0x74/0x140\n  ? asm_exc_page_fault+0x22/0x30\n  ? mlx5_tc_ct_entry_add_rule+0x2b1/0x2f0 [mlx5_core]\n  ? mlx5_tc_ct_entry_add_rule+0x1d5/0x2f0 [mlx5_core]\n  mlx5_tc_ct_block_flow_offload+0xc6a/0xf90 [mlx5_core]\n  ? nf_flow_offload_tuple+0xd8/0x190 [nf_flow_table]\n  nf_flow_offload_tuple+0xd8/0x190 [nf_flow_table]\n  flow_offload_work_handler+0x142/0x320 [nf_flow_table]\n  ? finish_task_switch.isra.0+0x15b/0x2b0\n  process_one_work+0x16c/0x320\n  worker_thread+0x28c/0x3a0\n  ? __pfx_worker_thread+0x10/0x10\n  kthread+0xb8/0xf0\n  ? __pfx_kthread+0x10/0x10\n  ret_from_fork+0x2d/0x50\n  ? __pfx_kthread+0x10/0x10\n  ret_from_fork_asm+0x1a/0x30\n  </TASK>","publishedAt":"2024-12-02T13:44:51.098Z","updatedAt":"2026-08-05T11:43:50.881Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"882f392d9e3649557e71efd78ae20c86039ffb7c","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"0c7c70ff8b696cfedba350411dca736361ef9a0f","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"06dc488a593020bd2f006798557d2a32104d8359","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"6030f8bd7902e9e276a0edc09bf11979e4e2bc2e","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"e99c6873229fe0482e7ceb7d5600e32d623ed9d9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.119","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.63","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.10","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c"]}],"references":["https://git.kernel.org/stable/c/882f392d9e3649557e71efd78ae20c86039ffb7c","https://git.kernel.org/stable/c/0c7c70ff8b696cfedba350411dca736361ef9a0f","https://git.kernel.org/stable/c/06dc488a593020bd2f006798557d2a32104d8359","https://git.kernel.org/stable/c/6030f8bd7902e9e276a0edc09bf11979e4e2bc2e","https://git.kernel.org/stable/c/e99c6873229fe0482e7ceb7d5600e32d623ed9d9","https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:04.920Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/53xxx/CVE-2024-53120.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-53120","state":"PUBLISHED","datePublished":"2024-12-02T13:44:51.098Z","dateUpdated":"2026-08-05T11:43:50.881Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-11-19T17:17:24.994Z"},"containers":{"cna":{"title":"net/mlx5e: CT: Fix null-ptr-deref in add rule err flow","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: CT: Fix null-ptr-deref in add rule err flow\n\nIn error flow of mlx5_tc_ct_entry_add_rule(), in case ct_rule_add()\ncallback returns error, zone_rule->attr is used uninitiated. Fix it to\nuse attr which has the needed pointer value.\n\nKernel log:\n BUG: kernel NULL pointer dereference, address: 0000000000000110\n RIP: 0010:mlx5_tc_ct_entry_add_rule+0x2b1/0x2f0 [mlx5_core]\n…\n Call Trace:\n  <TASK>\n  ? __die+0x20/0x70\n  ? page_fault_oops+0x150/0x3e0\n  ? exc_page_fault+0x74/0x140\n  ? asm_exc_page_fault+0x22/0x30\n  ? mlx5_tc_ct_entry_add_rule+0x2b1/0x2f0 [mlx5_core]\n  ? mlx5_tc_ct_entry_add_rule+0x1d5/0x2f0 [mlx5_core]\n  mlx5_tc_ct_block_flow_offload+0xc6a/0xf90 [mlx5_core]\n  ? nf_flow_offload_tuple+0xd8/0x190 [nf_flow_table]\n  nf_flow_offload_tuple+0xd8/0x190 [nf_flow_table]\n  flow_offload_work_handler+0x142/0x320 [nf_flow_table]\n  ? finish_task_switch.isra.0+0x15b/0x2b0\n  process_one_work+0x16c/0x320\n  worker_thread+0x28c/0x3a0\n  ? __pfx_worker_thread+0x10/0x10\n  kthread+0xb8/0xf0\n  ? __pfx_kthread+0x10/0x10\n  ret_from_fork+0x2d/0x50\n  ? __pfx_kthread+0x10/0x10\n  ret_from_fork_asm+0x1a/0x30\n  </TASK>"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"882f392d9e3649557e71efd78ae20c86039ffb7c","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"0c7c70ff8b696cfedba350411dca736361ef9a0f","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"06dc488a593020bd2f006798557d2a32104d8359","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"6030f8bd7902e9e276a0edc09bf11979e4e2bc2e","versionType":"git"},{"version":"7fac5c2eced36f335ee19ff316bd3182fbeda823","status":"affected","lessThan":"e99c6873229fe0482e7ceb7d5600e32d623ed9d9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.174","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.119","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.63","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.11.10","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/882f392d9e3649557e71efd78ae20c86039ffb7c"},{"url":"https://git.kernel.org/stable/c/0c7c70ff8b696cfedba350411dca736361ef9a0f"},{"url":"https://git.kernel.org/stable/c/06dc488a593020bd2f006798557d2a32104d8359"},{"url":"https://git.kernel.org/stable/c/6030f8bd7902e9e276a0edc09bf11979e4e2bc2e"},{"url":"https://git.kernel.org/stable/c/e99c6873229fe0482e7ceb7d5600e32d623ed9d9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is driven entirely by received network packets — conntrack entries created by remote peers' connections are handed to `mlx5_tc_ct_block_flow_offload()` via the nf_flow_table offload workqueue, with no local action required. A remote attacker sending traffic through an mlx5 NIC configured for act_ct hardware offload reaches the failing add path directly.\nAC:L - The attacker controls the trigger: opening a large number of NAT'd connections exhausts the finite hardware CT/steering table so `ct_rule_add()` returns an error, and crafted traffic (tunneled or non-TCP/UDP/GRE flows) can also fail `mlx5_ct_fs_smfs_ct_validate_flow_rule()` deterministically. Every NAT'd entry takes the `mh == NULL` branch, so any such failure crashes.\nPR:N - No credentials or account on the target are needed — only the ability to send packets that traverse the offloaded connection-tracking datapath. The CT-offload configuration is a deployment precondition set by the administrator, not a privilege the attacker must hold.\nUI:N - The offload work is queued automatically by the conntrack/flow-table machinery when connections become established; no victim action is involved.\nS:U - The fault and its consequences are confined to the host kernel that owns the mlx5 device; no security authority boundary such as a VM or IOMMU domain is crossed.\nC:N - The defect is a read of a fixed offset from a NULL pointer, which faults immediately; no kernel memory contents are returned to or observable by the attacker.\nI:N - No attacker-controlled data is written and no control-flow hijack primitive is produced — the dereferenced pointer is unconditionally NULL, not attacker-influenced, so `mmap_min_addr` prevents any write or execution primitive.\nA:H - The dereference produces a kernel oops in the flow-offload worker (a full panic with `panic_on_oops`), killing the workqueue thread and breaking the CT offload path; it can be re-triggered by continued connection flooding, and hardware modify-header and label-mapping resources are leaked on each occurrence."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:43:50.881Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.15.174"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.6.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.11.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.12"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T22:29:26.030Z"}}]}}}