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]
Date:   Wed, 24 Apr 2019 15:53:06 +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 v7 00/10] vsprintf: Prevent silent crashes and
 consolidate error handling

On Fri 2019-04-19 10:51:12, Sergey Senozhatsky wrote:
> On (04/17/19 13:53), Petr Mladek wrote:
> > Crash in vsprintf() might be silent when it happens under logbuf_lock
> > in vprintk_emit(). This patch set prevents most of the crashes by probing
> > the address. The check is done only by %s and some %p* specifiers that need
> > to dereference the address.
> >
> > Only the first byte of the address is checked to keep it simple. It should
> > be enough to catch most problems.
> >
> > The check is explicitly done in each function that does the dereference.
> > It helps to avoid the questionable strchr() of affected specifiers. This
> > change motivated me to do some preparation patches that consolidated
> > the error handling and cleaned the code a bit.
> 
> The patch set looks OK to me.
> 
> I got confused by 'pC?' error string, but once you start looking
> at it as a regex (? - zero or one occurrences) things look OK.
> Regex in dmesg/serial output might be something very new to people,
> stack traces, after all, is a rather common error reporting mechanism.
> So the previous "WARN_ON() + exact unrecognized fmt[N] char" was not
> totally awful or wrong (well, it was, before we introduced printk_safe()),
> but I don't have strong objections against that new regex thing.
> 
> FWIW,
> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>

Thanks a lot for review.

I have pushed the entire patchset into printk.git,
branch for-5.2-vsprintf-hardening to get some
test coverage via linux-next.

I still expect some feedback, especially from Andy
who seems to have a vacation these days.
I think that Andy wanted these changes rather sooner
than later, so I hope that he would be fine with it.
I could take it back in case of disagreement.

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ