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  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]
Date:   Fri, 27 Apr 2018 14:37:53 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        "Tobin C . Harding" <me@...in.cc>, Joe Perches <joe@...ches.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...e.cz>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 10/11] vsprintf: WARN() on invalid pointer access

On Thu 2018-04-26 10:28:05, Sergey Senozhatsky wrote:
> On (04/25/18 13:12), Petr Mladek wrote:
> [..]
> >   /*
> >    * This is not a fool-proof test. 99% of the time that this will fault is
> >    * due to a bad pointer, not one that crosses into bad memory. Just test
> > @@ -623,8 +626,12 @@ static const char *check_pointer_access(const void *ptr)
> >  	if (!ptr)
> >  		return "(null)";
> >  
> > -	if (probe_kernel_address(ptr, byte))
> > +	/* Prevent silent crashes when called in printk_safe context. */
> > +	if (probe_kernel_address(ptr, byte)) {
> > +		WARN(!panic_on_warn && !test_printf_pointer_access,
> > +		     "vsprintf: invalid pointer address\n");
> >  		return "(efault)";
> > +	}
> 
> Can we have a rate-limited print out here? Or may be even a WARN_ONCE()?
> Yes, printk()-s from check_pointer_access() are OK, printk_safe() helps us,
> but at the same time every single invalid pointer access printk()-message
> will log_store() WARN() extra entries. Theoretically, this can harm. What
> do you think?

I believe that these WARNs will be rare. After all they happen in situations
where the kernel crashed so far.

I suggest to keep it as is for now. We could always ratelimit it later if
needed.

Best Regards,
Petr

Powered by blists - more mailing lists