{"id":"CVE-2026-143206","summary":"net/mlx5e: Block E-Switch mode changes during IPsec state creation","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: Block E-Switch mode changes during IPsec state creation\n\nmlx5e_xfrm_add_state() reads priv-\u003eipsec before blocking eswitch mode\nchanges. A concurrent profile change can free the saved IPsec context\nand cause use-after-free.\n\nThe temporary mode reservation was added in commit 22239eb258bc\n(\"net/mlx5e: Prevent tunnel reformat when tunnel mode not allowed\")\nafter saving priv-\u003eipsec but the race was actually enabled by the\n\"Fixes\" commit.\nExtend the reservation to cover obtaining the context as well.\n\nUse mlx5_eswitch_block_mode(mdev, false) for the temporary reservation,\nas policy creation does, to check operation ownership under mode_lock\nwithout rejecting existing eswitch users. This allows reusing existing\nIPsec tables while TC rules exist on VF representors.\n\nCheck the context only after taking the mode reservation, so a\nconcurrent mode change consistently returns -EBUSY and a missing context\nreturns -EOPNOTSUPP, preserving software fallback for crypto offload.\nKeep the atomic acquire-placeholder path exempt, since it creates no\nhardware state and cannot take sleeping locks.\n\nThis was found by Sashiko, during review of the last patch in the\nseries. No reproduction attempted, as it seems quite a tricky race to\nsuccessfully trigger.","modified":"2026-12-03T11:01:37.084371913Z","published":"2026-12-03T09:20:29.509Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143206.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/0d09de8e4f11391e8468219dbbc7af027e39e9b8"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fc72f3fd9d15a083330c626562201ab9a504c470"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143206.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143206"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"7a9fb35e8c3a67145fca262c304de65cb2f83abf"},{"fixed":"fc72f3fd9d15a083330c626562201ab9a504c470"},{"fixed":"0d09de8e4f11391e8468219dbbc7af027e39e9b8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143206.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.13.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143206.json"}}],"schema_version":"1.9.2"}