lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <654a8058-a699-469d-9997-45090d817f4e@cornelisnetworks.com>
Date: Thu, 8 May 2025 10:03:47 -0400
From: Dennis Dalessandro <dennis.dalessandro@...nelisnetworks.com>
To: Qiu-ji Chen <chenqiuji666@...il.com>, jgg@...pe.ca, leon@...nel.org
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
 baijiaju1990@...il.com
Subject: Re: [BUG] IB/rdmavt: Potential deadlocks in function
 rvt_ruc_loopback()

On 5/8/25 4:31 AM, Qiu-ji Chen wrote:
> Hello maintainers,
> 
> I would like to report a potential lock ordering issue in
> drivers/infiniband/sw/rdmavt/qp.c in the IB/rdmavt driver. This may
> lead to deadlocks under certain conditions.
> 
> The function rvt_ruc_loopback() acquires locks in a conflicting order:
> 
> 1. First takes &sqp->s_lock
> 2. Then takes &sqp->r_lock
> 
> This contradicts the established pattern in functions like
> rvt_rc_timeout() and rvt_modify_qp(), which typically:
> 
> 1. Acquire &sqp->r_lock first
> 2. Then take &sqp->s_lock
> 
> This reversed locking order creates potential deadlock scenarios when
> these code paths execute concurrently.
> 
> The issue was introduced in version 4.20 and persists through current releases.
> 
> This issue was identified through static analysis. While I've verified
> the locking patterns through code review, I'm not sufficiently
> familiar with the driver's internals to propose a safe fix.
> 
> Thank you for your attention to this matter.
> 
> Best regards,
> Qiu-Ji Chen

Hi Qui-Ji,

Thanks for the heads up. We are looking into it. Will get a fix out soon.

-Denny

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ