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: <20250410135114.1c8bc2987b9a968d92b3a55a@linux-foundation.org>
Date: Thu, 10 Apr 2025 13:51:14 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linus Torvalds
 <torvalds@...ux-foundation.org>, Greg Kroah-Hartman
 <gregkh@...uxfoundation.org>, Akinobu Mita <akinobu.mita@...il.com>, Peter
 Zijlstra <peterz@...radead.org>, Petr Mladek <pmladek@...e.com>, Dmitry
 Vyukov <dvyukov@...gle.com>, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH] panic: lib: Add TAINT for FAULT_INJECTION

On Thu, 10 Apr 2025 14:43:59 -0400 Steven Rostedt <rostedt@...dmis.org> wrote:

> From: Steven Rostedt <rostedt@...dmis.org>
> 
> There's been several times where syzbot reports a bug that was caused by a
> fault injection, but it doesn't report this fact in its email reports.
> The bug report could happen in code that wasn't involved with the fault
> injection due to the code that faulted not cleaning up things properly,
> leading to an unstable kernel, which in turn can trigger issues elsewhere
> that doesn't have a bug (much like a proprietary module could do).
> 
> It would be very useful if the syzbot report notified the developer that
> the test had injected faults into the kernel.
> 
> Introduce a new taint flag 'V' that gets set when a fault injection takes
> place. (Note, there's not many taint flags left, so 'V' looked as good as
> any other value).
> 
> This will let the syzbot see that the kernel had a fault injection during
> the test and can report that it happened when sending out its emails.
> 
> It may also be useful for other bug reports.

Seems sane.  Does any userspace tooling need an update for this?

> --- a/lib/fault-inject.c
> +++ b/lib/fault-inject.c
> @@ -176,6 +176,9 @@ bool should_fail_ex(struct fault_attr *attr, ssize_t size, int flags)
>  	if (atomic_read(&attr->times) != -1)
>  		atomic_dec_not_zero(&attr->times);
>  
> +	pr_notice_once("Tainting kernel with TAINT_FAULT_INJECTION\n");
> +	add_taint(TAINT_FAULT_INJECTION, LOCKDEP_STILL_OK);

	if (pr_notice_once("Tainting kernel with TAINT_FAULT_INJECTION\n"))
		add_taint(TAINT_FAULT_INJECTION, LOCKDEP_STILL_OK);

perhaps?

>  	return true;
>  }
>  
> -- 
> 2.47.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ