{"id":"CVE-2026-43468","aliases":["CVE-2026-43468"],"related":[],"kind":"vulnerability","state":"published","title":"net/mlx5: Fix deadlock between devlink lock and esw->wq","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix deadlock between devlink lock and esw->wq\n\nesw->work_queue executes esw_functions_changed_event_handler ->\nesw_vfs_changed_event_handler and acquires the devlink lock.\n\n.eswitch_mode_set (acquires devlink lock in devlink_nl_pre_doit) ->\nmlx5_devlink_eswitch_mode_set -> mlx5_eswitch_disable_locked ->\nmlx5_eswitch_event_handler_unregister -> flush_workqueue deadlocks\nwhen esw_vfs_changed_event_handler executes.\n\nFix that by no longer flushing the work to avoid the deadlock, and using\na generation counter to keep track of work relevance. This avoids an old\nhandler manipulating an esw that has undergone one or more mode changes:\n- the counter is incremented in mlx5_eswitch_event_handler_unregister.\n- the counter is read and passed to the ephemeral mlx5_host_work struct.\n- the work handler takes the devlink lock and bails out if the current\n  generation is different than the one it was scheduled to operate on.\n- mlx5_eswitch_cleanup does the final draining before destroying the wq.\n\nNo longer flushing the workqueue has the side effect of maybe no longer\ncancelling pending vport_change_handler work items, but that's ok since\nthose are disabled elsewhere:\n- mlx5_eswitch_disable_locked disables the vport eq notifier.\n- mlx5_esw_vport_disable disarms the HW EQ notification and marks\n  vport->enabled under state_lock to false to prevent pending vport\n  handler from doing anything.\n- mlx5_eswitch_cleanup destroys the workqueue and makes sure all events\n  are disabled/finished.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix deadlock between devlink lock and esw->wq\n\nesw->work_queue executes esw_functions_changed_event_handler ->\nesw_vfs_changed_event_handler and acquires the devlink lock.\n\n.eswitch_mode_set (acquires devlink lock in devlink_nl_pre_doit) ->\nmlx5_devlink_eswitch_mode_set -> mlx5_eswitch_disable_locked ->\nmlx5_eswitch_event_handler_unregister -> flush_workqueue deadlocks\nwhen esw_vfs_changed_event_handler executes.\n\nFix that by no longer flushing the work to avoid the deadlock, and using\na generation counter to keep track of work relevance. This avoids an old\nhandler manipulating an esw that has undergone one or more mode changes:\n- the counter is incremented in mlx5_eswitch_event_handler_unregister.\n- the counter is read and passed to the ephemeral mlx5_host_work struct.\n- the work handler takes the devlink lock and bails out if the current\n  generation is different than the one it was scheduled to operate on.\n- mlx5_eswitch_cleanup does the final draining before destroying the wq.\n\nNo longer flushing the workqueue has the side effect of maybe no longer\ncancelling pending vport_change_handler work items, but that's ok since\nthose are disabled elsewhere:\n- mlx5_eswitch_disable_locked disables the vport eq notifier.\n- mlx5_esw_vport_disable disarms the HW EQ notification and marks\n  vport->enabled under state_lock to false to prevent pending vport\n  handler from doing anything.\n- mlx5_eswitch_cleanup destroys the workqueue and makes sure all events\n  are disabled/finished.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnet/mlx5: Solucionar interbloqueo entre el bloqueo de devlink y esw  ->  wq\n\nesw  ->  work_queue ejecuta esw_functions_changed_event_handler   ->   esw_vfs_changed_event_handler y adquiere el bloqueo de devlink.\n\n.eswitch_mode_set (adquiere el bloqueo de devlink en devlink_nl_pre_doit)   ->   mlx5_devlink_eswitch_mode_set   ->   mlx5_eswitch_disable_locked   ->   mlx5_eswitch_event_handler_unregister   ->   flush_workqueue entra en interbloqueo cuando se ejecuta esw_vfs_changed_event_handler.\n\nSolucionar eso al ya no vaciar el trabajo para evitar el interbloqueo, y usando un contador de generación para mantener un registro de la relevancia del trabajo. Esto evita que un gestor antiguo manipule un esw que ha sufrido uno o más cambios de modo:\n- el contador se incrementa en mlx5_eswitch_event_handler_unregister.\n- el contador se lee y se pasa a la estructura efímera mlx5_host_work.\n- el gestor de trabajo toma el bloqueo de devlink y se retira si la generación actual es diferente a aquella para la que fue programado para operar.\n- mlx5_eswitch_cleanup realiza el vaciado final antes de destruir la wq.\n\nYa no vaciar la workqueue tiene el efecto secundario de quizás ya no cancelar los elementos de trabajo pendientes de vport_change_handler, pero eso está bien ya que esos están deshabilitados en otro lugar:\n- mlx5_eswitch_disable_locked deshabilita el notificador de eq de vport.\n- mlx5_esw_vport_disable desarma la notificación de EQ de HW y marca vport  ->  enabled bajo state_lock como falso para evitar que el gestor de vport pendiente haga algo.\n- mlx5_eswitch_cleanup destruye la workqueue y se asegura de que todos los eventos estén deshabilitados/finalizados.","source":"nvd"}],"published":"2026-05-08T14:22:28.889Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-667"],"affected":[{"ranges":[{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"0de867f6e34eae6907b367fd152c55e61cb98608","status":"affected"},{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"957d2a58f7f8ebcbdd0a85935e0d2675134b890d","status":"affected"},{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"3c7313cb41b1b427078440364d2f042c276a1c0b","status":"affected"},{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"4a7838bebc38374f74baaf88bf2cf8d439a92923","status":"affected"},{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"90e7e5d14d0bd25ffd019a3aa39d9f1c05fedbe1","status":"affected"},{"type":"git","introduced":"f1bc646c9a06f09aad5d8bacb87103b5573ee45e","fixed":"aed763abf0e905b4b8d747d1ba9e172961572f57","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.0","status":"unaffected"},{"type":"semver","introduced":"6.1.167","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.130","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.78","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.19","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.9","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.0","fixed":"6.1.167"},{"status":"affected","introduced":"6.2","fixed":"6.6.130"},{"status":"affected","introduced":"6.7","fixed":"6.12.78"},{"status":"affected","introduced":"6.13","fixed":"6.18.19"},{"status":"affected","introduced":"6.19","fixed":"6.19.9"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/0de867f6e34eae6907b367fd152c55e61cb98608","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/957d2a58f7f8ebcbdd0a85935e0d2675134b890d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3c7313cb41b1b427078440364d2f042c276a1c0b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4a7838bebc38374f74baaf88bf2cf8d439a92923","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/90e7e5d14d0bd25ffd019a3aa39d9f1c05fedbe1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aed763abf0e905b4b8d747d1ba9e172961572f57","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-06T15:39:31.294Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43468","url":"https://www.cve.org/CVERecord?id=CVE-2026-43468","licence":"CVE Terms of Use","modified":"2026-11-06T15:42:56.033Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43468","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43468","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:21.086Z","epss":{"score":0.00091,"percentile":0.00496,"date":"2026-12-02T12:00:21.000Z"}}