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: <87y1acrt5s.wl-tiwai@suse.de>
Date: Thu, 21 Mar 2024 07:33:03 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Edward Adam Davis <eadavis@...com>
Cc: syzbot+18840ef96e57b83b7fea@...kaller.appspotmail.com,
	linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org,
	perex@...ex.cz,
	syzkaller-bugs@...glegroups.com,
	tiwai@...e.com
Subject: Re: [PATCH] ALSA: timer: fix deadlock in _snd_pcm_stream_lock_irqsave

On Thu, 21 Mar 2024 03:22:24 +0100,
Edward Adam Davis wrote:
> 
> [Syzbot reported]
> swapper/2/0 just changed the state of lock:
> ffff88802a304110 (&group->lock#2){..-.}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0xa0/0xd0 sound/core/pcm_native.c:170
> but this lock took another, SOFTIRQ-unsafe lock in the past:
>  (&timer->lock){+.+.}-{2:2}
> 
> 
> and interrupts could create inverse lock ordering between them.
> 
> 
> other info that might help us debug this:
>  Possible interrupt unsafe locking scenario:
> 
>        CPU0                    CPU1
>        ----                    ----
>   lock(&timer->lock);
>                                local_irq_disable();
>                                lock(&group->lock#2);
>                                lock(&timer->lock);
>   <Interrupt>
>     lock(&group->lock#2);
> 
>  *** DEADLOCK ***
> [Fix]
> Ensure that the context interrupt state is the same before and after using the
> timer->lock.
> 
> Fixes: beb45974dd49 ("ALSA: timer: Use guard() for locking")
> Reported-and-tested-by: syzbot+18840ef96e57b83b7fea@...kaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@...com>

This was already fixed in Linus tree commit
587d67fd929ad89801bcc429675bda90d53f6592.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ