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: <20240413210411.441424-1-ojeda@kernel.org>
Date: Sat, 13 Apr 2024 23:04:10 +0200
From: Miguel Ojeda <ojeda@...nel.org>
To: davidgow@...gle.com
Cc: brendan.higgins@...ux.dev,
	dan.carpenter@...aro.org,
	keescook@...omium.org,
	kunit-dev@...glegroups.com,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	linux@...ck-us.net,
	lkft@...aro.org,
	mic@...ikod.net,
	naresh.kamboju@...aro.org,
	rmoar@...gle.com,
	skhan@...uxfoundation.org,
	will@...nel.org,
	Miguel Ojeda <ojeda@...nel.org>
Subject: Re: [PATCH] kunit: Fix race condition in try-catch completion

On Thu, Apr 11, 2024 at 10:59 PM David Gow <davidgow@...gle.com> wrote:
>
> KUnit's try-catch infrastructure now uses vfork_done, which is always
> set to a valid completion when a kthread is created, but which is set to
> NULL once the thread terminates. This creates a race condition, where
> the kthread exits before we can wait on it.
>
> Keep a copy of vfork_done, which is taken before we wake_up_process()
> and so valid, and wait on that instead.
>
> Fixes: 4de2a8e4cca4 ("kunit: Handle test faults")
> Reported-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Closes: https://lore.kernel.org/lkml/20240410102710.35911-1-naresh.kamboju@linaro.org/
> Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Acked-by: Mickaël Salaün <mic@...ikod.net>
> Signed-off-by: David Gow <davidgow@...gle.com>

I noticed it with the Rust tests too, and indeed this fixed it:

Tested-by: Miguel Ojeda <ojeda@...nel.org>

Thanks!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ