lkml.org 
[lkml]   [2018]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH] vsprintf: Make "null" pointer dereference more robust
    On Thu, Mar 8, 2018 at 6:18 AM, Petr Mladek <pmladek@suse.com> wrote:
    > On Wed 2018-03-07 10:34:17, Linus Torvalds wrote:
    >>
    >> Guess what happens now to any crash report if it uses %p and there is
    >> anything wrong with the VM?
    >
    > This patch does _not_ affect plain %p, %px, and %pK!

    Umm. Look again. It _does_ affect plain %p.

    You're correct that it doesn't affect %px and %pK, since those never
    printed out (null) in the first place.

    > It affects %s and %p* modifiers that need to read data from the
    > given address.

    _If_ that was what the patch did, it would be fine.

    But it isn't.

    It not only affects %p, but it also affects %pS and friends (sSfFB),
    that do not access the location (well, on some architectures those
    might, to dereference a function descriptor, but then they will check
    the address range).

    So that patch really is completely broken for the reasons I outlined.

    Now, if it was fixed to what you apparently *intended* to do, then
    that would be ok.

    Linus

    \
     
     \ /
      Last update: 2018-03-08 17:45    [W:2.400 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site