{"id":"CVE-2023-52667","state":"PUBLISHED","title":"net/mlx5e: fix a potential double-free in fs_any_create_groups","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: fix a potential double-free in fs_any_create_groups\n\nWhen kcalloc() for ft->g succeeds but kvzalloc() for in fails,\nfs_any_create_groups() will free ft->g. However, its caller\nfs_any_create_table() will free ft->g again through calling\nmlx5e_destroy_flow_table(), which will lead to a double-free.\nFix this by setting ft->g to NULL in fs_any_create_groups().","publishedAt":"2024-05-17T14:01:48.454Z","updatedAt":"2026-08-05T09:10:56.489Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"72a729868592752b5a294d27453da264106983b1","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"b2fa86b2aceb4bc9ada51cea90f61546d7512cbe","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"2897c981ee63e1be5e530b1042484626a10b26d8","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"65a4ade8a6d205979292e88beeb6a626ddbd4779","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"aef855df7e1bbd5aa4484851561211500b22707e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.76","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","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/fs_tt_redirect.c"]}],"references":["https://git.kernel.org/stable/c/72a729868592752b5a294d27453da264106983b1","https://git.kernel.org/stable/c/b2fa86b2aceb4bc9ada51cea90f61546d7512cbe","https://git.kernel.org/stable/c/2897c981ee63e1be5e530b1042484626a10b26d8","https://git.kernel.org/stable/c/65a4ade8a6d205979292e88beeb6a626ddbd4779","https://git.kernel.org/stable/c/aef855df7e1bbd5aa4484851561211500b22707e"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/52xxx/CVE-2023-52667.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-52667","state":"PUBLISHED","datePublished":"2024-05-17T14:01:48.454Z","dateUpdated":"2026-08-05T09:10:56.489Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-07T14:49:46.885Z"},"containers":{"cna":{"title":"net/mlx5e: fix a potential double-free in fs_any_create_groups","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: fix a potential double-free in fs_any_create_groups\n\nWhen kcalloc() for ft->g succeeds but kvzalloc() for in fails,\nfs_any_create_groups() will free ft->g. However, its caller\nfs_any_create_table() will free ft->g again through calling\nmlx5e_destroy_flow_table(), which will lead to a double-free.\nFix this by setting ft->g to NULL in fs_any_create_groups()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"72a729868592752b5a294d27453da264106983b1","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"b2fa86b2aceb4bc9ada51cea90f61546d7512cbe","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"2897c981ee63e1be5e530b1042484626a10b26d8","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"65a4ade8a6d205979292e88beeb6a626ddbd4779","versionType":"git"},{"version":"0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6","status":"affected","lessThan":"aef855df7e1bbd5aa4484851561211500b22707e","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en/fs_tt_redirect.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.13","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.13","versionType":"semver"},{"version":"5.15.149","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.76","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.15","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.3","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8","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/fs_tt_redirect.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/72a729868592752b5a294d27453da264106983b1"},{"url":"https://git.kernel.org/stable/c/b2fa86b2aceb4bc9ada51cea90f61546d7512cbe"},{"url":"https://git.kernel.org/stable/c/2897c981ee63e1be5e530b1042484626a10b26d8"},{"url":"https://git.kernel.org/stable/c/65a4ade8a6d205979292e88beeb6a626ddbd4779"},{"url":"https://git.kernel.org/stable/c/aef855df7e1bbd5aa4484851561211500b22707e"}],"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 double-free is reached only through local mlx5e PTP RX flow-steering setup (SIOCSHWTSTAMP/ethtool private-flag paths → mlx5e_ptp_rx_set_fs → mlx5e_fs_tt_redirect_any_create → fs_any_create_groups), not via remotely received packets or peer protocol data.\nAC:L - The bug fires when kcalloc(ft->g) succeeds and the subsequent kvzalloc(in) fails; a local attacker can drive that GFP_KERNEL failure via memory pressure, after which the double-free in mlx5e_destroy_flow_table() is fully deterministic with no race outside attacker control.\nPR:L - An unprivileged local account can supply the memory-pressure half of the condition while ordinary admin/PTP hwstamp or channel reopen activity hits the path; alternatively, CAP_NET_ADMIN checked via ns_capable(net->user_ns) on an mlx5 VF in a tenant netns is Low, not init-ns root.\nUI:N - No separate victim action is required; the attacker induces the failing allocation (and/or issues the hwstamp/ethtool configuration themselves), and the faulty cleanup runs automatically in fs_any_create_table()'s error path.\nS:U - Impact is confined to host-kernel slab/mlx5e state under a single security authority; the defect does not cross a VM, IOMMU, or sandbox boundary.\nC:H - ft->g is a 16-byte (2-pointer) kmalloc object; under the same memory pressure that triggers the bug it can be reallocated between the two kfree()s, so freelist aliasing from the double-free yields an arbitrary kernel read/disclosure primitive.\nI:H - Double-free freelist corruption lets attacker-controlled data overwrite a live kmalloc-16 object and/or redirect subsequent allocations, providing a write and control-flow hijack primitive suitable for privilege escalation.\nA:H - The second kfree() of the already-freed pointer trips SLUB double-free detection or corrupts the freelist, causing a kernel BUG/oops/panic and denying service on the host or NIC bring-up path."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:10:56.489Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"5.15.149"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.1.76"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.6.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.7.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.13","versionEndExcluding":"6.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/72a729868592752b5a294d27453da264106983b1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/b2fa86b2aceb4bc9ada51cea90f61546d7512cbe","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2897c981ee63e1be5e530b1042484626a10b26d8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/65a4ade8a6d205979292e88beeb6a626ddbd4779","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/aef855df7e1bbd5aa4484851561211500b22707e","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:11:34.566Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-52667","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:42:12.540016Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:32:50.865Z"}}]}}}