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]
Message-ID: <CA+fCnZc7qVTmH2neiCn3T44+C-CCyxfCKNc0FP3F9Cu0oKtBRQ@mail.gmail.com>
Date: Tue, 27 Aug 2024 02:02:00 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alan Stern <stern@...land.harvard.edu>, Marcello Sylvester Bauer <sylv@...v.io>, 
	Dmitry Vyukov <dvyukov@...gle.com>, Aleksandr Nogikh <nogikh@...gle.com>, Marco Elver <elver@...gle.com>, 
	Alexander Potapenko <glider@...gle.com>, kasan-dev@...glegroups.com, 
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org, linux-usb@...r.kernel.org, 
	linux-kernel@...r.kernel.org, 
	syzbot+2388cdaeb6b10f0c13ac@...kaller.appspotmail.com, 
	syzbot+17ca2339e34a1d863aad@...kaller.appspotmail.com, stable@...r.kernel.org, 
	andrey.konovalov@...ux.dev
Subject: Re: [PATCH] usb: gadget: dummy_hcd: execute hrtimer callback in
 softirq context

On Mon, Jul 29, 2024 at 4:23 AM <andrey.konovalov@...ux.dev> wrote:
>
> From: Andrey Konovalov <andreyknvl@...il.com>
>
> Commit a7f3813e589f ("usb: gadget: dummy_hcd: Switch to hrtimer transfer
> scheduler") switched dummy_hcd to use hrtimer and made the timer's
> callback be executed in the hardirq context.
>
> With that change, __usb_hcd_giveback_urb now gets executed in the hardirq
> context, which causes problems for KCOV and KMSAN.
>
> One problem is that KCOV now is unable to collect coverage from
> the USB code that gets executed from the dummy_hcd's timer callback,
> as KCOV cannot collect coverage in the hardirq context.
>
> Another problem is that the dummy_hcd hrtimer might get triggered in the
> middle of a softirq with KCOV remote coverage collection enabled, and that
> causes a WARNING in KCOV, as reported by syzbot. (I sent a separate patch
> to shut down this WARNING, but that doesn't fix the other two issues.)
>
> Finally, KMSAN appears to ignore tracking memory copying operations
> that happen in the hardirq context, which causes false positive
> kernel-infoleaks, as reported by syzbot.
>
> Change the hrtimer in dummy_hcd to execute the callback in the softirq
> context.
>
> Reported-by: syzbot+2388cdaeb6b10f0c13ac@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=2388cdaeb6b10f0c13ac
> Reported-by: syzbot+17ca2339e34a1d863aad@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=17ca2339e34a1d863aad
> Fixes: a7f3813e589f ("usb: gadget: dummy_hcd: Switch to hrtimer transfer scheduler")
> Cc: stable@...r.kernel.org
> Signed-off-by: Andrey Konovalov <andreyknvl@...il.com>

Hi Greg,

Could you pick up either this or Marcello's patch
(https://lkml.org/lkml/2024/6/26/969)? In case they got lost.

Thank you!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ