Geert Uytterhoeven 6ce4b7e01f UPSTREAM: lib/vsprintf: Hash printed address for netdev bits fallback
The handler for "%pN" falls back to printing the raw pointer value when
using a different format than the (sole supported) special format
"%pNF", potentially leaking sensitive information regarding the kernel
layout in memory.

Avoid this leak by printing the hashed address instead.
Note that there are no in-tree users of the fallback.

Bug: 78533979
Fixes: ad67b74d2469d9b8 ("printk: hash addresses printed with %p")
Link: http://lkml.kernel.org/r/20181011084249.4520-4-geert+renesas@glider.be
To: "Tobin C . Harding" <me@tobin.cc>
To: Andrew Morton <akpm@linux-foundation.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
(cherry picked from commit 431bca24308c5a82575571023a7128a881f716b2)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0e42ce10466947489359b33aad5413589e619dcf
2022-06-28 17:39:11 +00:00
..
2017-08-15 09:02:08 -07:00
2017-06-09 11:52:07 +02:00
2019-04-20 09:15:07 +02:00
2018-12-08 13:03:35 +01:00
2020-05-28 12:17:10 +02:00
2020-11-05 11:06:58 +01:00
2017-08-15 09:02:07 -07:00