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: <bac3fb0d-2810-496d-b3ef-26a7f208ec51@moroto.mountain>
Date: Mon, 22 Apr 2024 15:47:15 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jeongjun Park <aha310510@...il.com>
Cc: ajk@...nets.uni-bremen.de, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, linux-hams@...r.kernel.org,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	syzkaller-bugs@...glegroups.com,
	syzbot+8e03da5d64bc85098811@...kaller.appspotmail.com
Subject: Re: [PATCH] hams: Fix deadlock caused by unsafe-irq lock in sp_get()

On Fri, Apr 19, 2024 at 02:30:37AM +0900, Jeongjun Park wrote:
> 
> read_lock() present in sp_get() is interrupt-vulnerable, so the function needs to be modified.
> 
> 
> Reported-by: syzbot+8e03da5d64bc85098811@...kaller.appspotmail.com
> Signed-off-by: Jeongjun Park <aha310510@...il.com>
> ---
>  drivers/net/hamradio/6pack.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
> index 6ed38a3cdd73..f882682ff0c8 100644
> --- a/drivers/net/hamradio/6pack.c
> +++ b/drivers/net/hamradio/6pack.c
> @@ -372,12 +372,13 @@ static DEFINE_RWLOCK(disc_data_lock);
>  static struct sixpack *sp_get(struct tty_struct *tty)
>  {
>  	struct sixpack *sp;
> +	unsigned long flags;
>  
> -	read_lock(&disc_data_lock);
> +	flags = read_lock_irqsave(&disc_data_lock);

This doesn't compile.  At least build test your patches.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ