English version →
カテゴリ
CVE-2023-53591

net/mlx5e: Fix deadlock in tc route query code

概要

net/mlx5e: Fix deadlock in tc route query code

原文の説明

取得元が公開している説明をそのまま載せています (多くは英語)。

In the Linux kernel, the following vulnerability has been resolved:

net/mlx5e: Fix deadlock in tc route query code

Cited commit causes ABBA deadlock[0] when peer flows are created while
holding the devcom rw semaphore. Due to peer flows offload implementation
the lock is taken much higher up the call chain and there is no obvious way
to easily fix the deadlock. Instead, since tc route query code needs the
peer eswitch structure only to perform a lookup in xarray and doesn't
perform any sleeping operations with it, refactor the code for lockless
execution in following ways:

  • RCUify the devcom 'data' pointer. When resetting the pointer
    synchronously wait for RCU grace period before returning. This is fine
    since devcom is currently only used for synchronization of
    pairing/unpairing of eswitches which is rare and already expensive as-is.

  • Wrap all usages of 'paired' boolean in {READ|WRITE}_ONCE(). The flag has
    already been used in some unlocked contexts without proper
    annotations (e.g. users of mlx5_devcom_is_paired() function), but it wasn't
    an issue since all relevant code paths checked it again after obtaining the
    devcom semaphore. Now it is also used by mlx5_devcom_get_peer_data_rcu() as
    "best effort" check to return NULL when devcom is being unpaired. Note that
    while RCU read lock doesn't prevent the unpaired flag from being changed
    concurrently it still guarantees that reader can continue to use 'data'.

  • Refactor mlx5e_tc_query_route_vport() function to use new
    mlx5…

出典: OSV.dev (Open Source Vulnerabilities) NVD OSV

影響パッケージ

Linux Kernel
[{"type":"ECOSYSTEM","events":[{"introduced":"5.15.0"},{"fixed":"5.15.115"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.31"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.3.5"}]}]

ディストリビューション別の修正状況

各ディストリビューションが公開している、この CVE の修正パッケージ

参照URL

当サイトでは、アクセス解析と広告の効果測定のために Cookie を使います。株式会社Game のサイト共通の設定です。 詳しく