{"id":"CVE-2026-143349","state":"PUBLISHED","title":"net/mlx5: macsec: free struct mlx5_fs_id after an RCU grace period","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: macsec: free struct mlx5_fs_id after an RCU grace period\n\nmacsec_fs_id_del() removes a struct mlx5_fs_id from its rhashtable with\nrhashtable_remove_fast() and then frees it with kfree() right away.\n\nThe TX (SCI) table is read locklessly from the transmit path:\nmlx5e_macsec_handle_tx_skb() and mlx5e_macsec_tx_build_eseg() call\nmlx5_macsec_fs_get_fs_id_from_hashtable(), which does\nrhashtable_lookup() under rcu_read_lock() and then reads\nmlx5_fs_id->id. A transmit that looked the entry up just before it was\nremoved reads freed memory.\n\nBefore commit d4ece08f4b1d (\"net/mlx5: Maintain fs_id xarray per MACsec\ndevice inside macsec steering\") the SCI table held struct\nmlx5e_macsec_sa directly, and mlx5e_macsec_del_txsa() freed it with\nkfree_rcu_mightsleep(). That commit moved the table into macsec_fs.c\nwith the new struct mlx5_fs_id, but frees it with a plain kfree().\n\nAdd an rcu_head to struct mlx5_fs_id and free it with kfree_rcu().\n\nThe same issue was flagged by the Sashiko AI review as a pre-existing\nproblem while reviewing the HW-GRO for PSP series.","publishedAt":"2026-12-03T09:22:07.069Z","updatedAt":"2026-12-03T09:22:07.069Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"898a1815ed0be1b3a8996170dbe32ae791621100","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"035e45b333c90606ecbbe4b47c1d5d473541ea88","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"b02eb2580484d027f34d4c8ec060d9c6d922de0c","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"902407bc588575af0ceae5de4f635fe1e024f258","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","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/lib/macsec_fs.c"]}],"references":["https://git.kernel.org/stable/c/898a1815ed0be1b3a8996170dbe32ae791621100","https://git.kernel.org/stable/c/035e45b333c90606ecbbe4b47c1d5d473541ea88","https://git.kernel.org/stable/c/b02eb2580484d027f34d4c8ec060d9c6d922de0c","https://git.kernel.org/stable/c/902407bc588575af0ceae5de4f635fe1e024f258"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143349.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143349","state":"PUBLISHED","datePublished":"2026-12-03T09:22:07.069Z","dateUpdated":"2026-12-03T09:22:07.069Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.368Z"},"containers":{"cna":{"title":"net/mlx5: macsec: free struct mlx5_fs_id after an RCU grace period","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: macsec: free struct mlx5_fs_id after an RCU grace period\n\nmacsec_fs_id_del() removes a struct mlx5_fs_id from its rhashtable with\nrhashtable_remove_fast() and then frees it with kfree() right away.\n\nThe TX (SCI) table is read locklessly from the transmit path:\nmlx5e_macsec_handle_tx_skb() and mlx5e_macsec_tx_build_eseg() call\nmlx5_macsec_fs_get_fs_id_from_hashtable(), which does\nrhashtable_lookup() under rcu_read_lock() and then reads\nmlx5_fs_id->id. A transmit that looked the entry up just before it was\nremoved reads freed memory.\n\nBefore commit d4ece08f4b1d (\"net/mlx5: Maintain fs_id xarray per MACsec\ndevice inside macsec steering\") the SCI table held struct\nmlx5e_macsec_sa directly, and mlx5e_macsec_del_txsa() freed it with\nkfree_rcu_mightsleep(). That commit moved the table into macsec_fs.c\nwith the new struct mlx5_fs_id, but frees it with a plain kfree().\n\nAdd an rcu_head to struct mlx5_fs_id and free it with kfree_rcu().\n\nThe same issue was flagged by the Sashiko AI review as a pre-existing\nproblem while reviewing the HW-GRO for PSP series."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"898a1815ed0be1b3a8996170dbe32ae791621100","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"035e45b333c90606ecbbe4b47c1d5d473541ea88","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"b02eb2580484d027f34d4c8ec060d9c6d922de0c","versionType":"git"},{"version":"d4ece08f4b1d29471cc4c0eb0c87427600a77acd","status":"affected","lessThan":"902407bc588575af0ceae5de4f635fe1e024f258","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/lib/macsec_fs.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","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/lib/macsec_fs.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/898a1815ed0be1b3a8996170dbe32ae791621100"},{"url":"https://git.kernel.org/stable/c/035e45b333c90606ecbbe4b47c1d5d473541ea88"},{"url":"https://git.kernel.org/stable/c/b02eb2580484d027f34d4c8ec060d9c6d922de0c"},{"url":"https://git.kernel.org/stable/c/902407bc588575af0ceae5de4f635fe1e024f258"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:07.069Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}