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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCO/Y8cM/n5YRRJJ@elver.google.com>
Date:   Wed, 10 Feb 2021 12:11:31 +0100
From:   Marco Elver <elver@...gle.com>
To:     Timur Tabi <timur@...nel.org>
Cc:     Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Matthew Wilcox <willy@...radead.org>,
        akpm@...ux-foundation.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        roman.fietze@...na.com, Kees Cook <keescook@...omium.org>,
        John Ogness <john.ogness@...utronix.de>,
        akinobu.mita@...il.com, glider@...gle.com,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Pavel Machek <pavel@....cz>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH 0/3][RESEND] add support for never printing hashed
 addresses

On Tue, Feb 09, 2021 at 11:18PM -0600, Timur Tabi wrote:
> [accidentally sent from the wrong email address, so resending]
> 
> [The list of email addresses on CC: is getting quite lengthy,
> so I hope I've included everyone.]
> 
> Although hashing addresses printed via printk does make the
> kernel more secure, it interferes with debugging, especially
> with some functions like print_hex_dump() which always uses
> hashed addresses.
> 
> To avoid having to choose between %p and %px, it's easier to
> add a kernel command line that treats all %p as %px.  This
> encourages developers to use %p more without making debugging
> more difficult.
> 
> Patches #1 and #2 upgrade the kselftest framework so that
> it can report on tests that were skipped outright.  This
> is needed for the test_printf module which will now skip
> %p hashing tests if hashing is disabled.
> 
> Patch #2 upgrades the printf library to check the command
> line.  It also updates test_printf().
> 
> Timur Tabi (3):
>   lib/test_printf: use KSTM_MODULE_GLOBALS macro
>   kselftest: add support for skipped tests
>   [v2] lib/vsprintf: make-printk-non-secret printks all addresses as
>     unhashed
> 
>  .../admin-guide/kernel-parameters.txt         | 15 +++++++
>  lib/test_printf.c                             | 12 +++++-
>  lib/vsprintf.c                                | 40 ++++++++++++++++++-
>  tools/testing/selftests/kselftest_module.h    | 18 ++++++---
>  4 files changed, 75 insertions(+), 10 deletions(-)

I wanted to test this for deciding if we can show sensitive info in
KFENCE reports, which works just fine now that debug_never_hash_pointers
is non-static. FWIW,

	Acked-by: Marco Elver <elver@...gle.com>

But unfortunately this series broke some other test:

| In file included from lib/test_bitmap.c:17:
| lib/test_bitmap.c: In function ‘test_bitmap_init’:
| lib/../tools/testing/selftests/kselftest_module.h:45:48: error: ‘skipped_tests’ undeclared (first use in this function); did you mean ‘failed_tests’?
|    45 |  return kstm_report(total_tests, failed_tests, skipped_tests); \
|       |                                                ^~~~~~~~~~~~~
| lib/test_bitmap.c:637:1: note: in expansion of macro ‘KSTM_MODULE_LOADERS’
|   637 | KSTM_MODULE_LOADERS(test_bitmap);
|       | ^~~~~~~~~~~~~~~~~~~
| lib/../tools/testing/selftests/kselftest_module.h:45:48: note: each undeclared identifier is reported only once for each function it appears in
|    45 |  return kstm_report(total_tests, failed_tests, skipped_tests); \
|       |                                                ^~~~~~~~~~~~~
| lib/test_bitmap.c:637:1: note: in expansion of macro ‘KSTM_MODULE_LOADERS’
|   637 | KSTM_MODULE_LOADERS(test_bitmap);
|       | ^~~~~~~~~~~~~~~~~~~
| lib/../tools/testing/selftests/kselftest_module.h:46:1: error: control reaches end of non-void function [-Werror=return-type]
|    46 | }       \
|       | ^
| lib/test_bitmap.c:637:1: note: in expansion of macro ‘KSTM_MODULE_LOADERS’
|   637 | KSTM_MODULE_LOADERS(test_bitmap);
|       | ^~~~~~~~~~~~~~~~~~~

My allyesconfig build suggests test_bitmap.c is the only one, so it
should probably be fixed up in this series.
 
Thanks,
-- Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ