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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Jun 2023 13:00:34 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Chengfeng Ye <dg573847474@...il.com>
Cc:     scott.branden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
        arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: bcm_vk: Fix potential deadlock on &vk->ctx_lock

On Wed, Jun 28, 2023 at 10:52:50AM +0000, Chengfeng Ye wrote:
> As &vk->ctx_lock is acquired by timer bcm_vk_hb_poll() under softirq
> context, other process context code should disable irq or bottom-half
> before acquire the same lock, otherwise deadlock could happen if the
> timer preempt the execution while the lock is held in process context
> on the same CPU.
> 
> Possible deadlock scenario
> bcm_vk_open()
>     -> bcm_vk_get_ctx()
>     -> spin_lock(&vk->ctx_lock)
>         <timer iterrupt>
>         -> bcm_vk_hb_poll()
>         -> bcm_vk_blk_drv_access()
>         -> spin_lock_irqsave(&vk->ctx_lock, flags) (deadlock here)
> 
> This flaw was found using an experimental static analysis tool we are
> developing for irq-related deadlock.
> 
> The tentative patch fix the potential deadlock by spin_lock_irqsave().

how was this tested?  As per the file,
Documentation/process/researcher-guidelines.rst, you have to show this.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ