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: <CAHk-=wjEd-gZ1g52kgi_g8gq-QCF2E01TkQd5Hmj4W5aThLw3A@mail.gmail.com>
Date:   Tue, 18 Feb 2020 11:38:42 -0800
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Adam Borowski <kilobyte@...band.pl>
Cc:     Ilya Dryomov <idryomov@...il.com>,
        Kees Cook <keescook@...omium.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        "Tobin C . Harding" <me@...in.cc>
Subject: Re: [PATCH] vsprintf: don't obfuscate NULL and error pointers

On Tue, Feb 18, 2020 at 11:31 AM Adam Borowski <kilobyte@...band.pl> wrote:
>
> Either "0" or "NULL" (or "∅" if you allow cp437-subset Unicode ) wouldn't
> cause such confusion.

An all-uppercase "NULL" probably matches the error code printout
syntax better too, and is more clearly a pointer.

And with %pe you can't assume columnar output anyway (unless you
explicitly ask for some width), so the length of the output cannot
matter.

So yeah, I agree. To extend on Ilya's example:

                              ptr        error-ptr             NULL
  %p:            0000000001f8cc5b fffffffffffffff2 0000000000000000
  %pK, kptr = 0: 0000000001f8cc5b fffffffffffffff2 0000000000000000
  %px:           ffff888048c04020 fffffffffffffff2 0000000000000000
  %pK, kptr = 1: ffff888048c04020 fffffffffffffff2 0000000000000000
  %pK, kptr = 2: 0000000000000000 0000000000000000 0000000000000000
  %p:            0000000001f8cc5b -EFAULT NULL

would seem to be a sane output format. Hmm?

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ