Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742709 > unrolled thread

[kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

Started by"Tobin C. Harding" <me@tobin.cc>
First post2017-10-01 02:10 +0200
Last post2017-10-01 02:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value "Tobin C. Harding" <me@tobin.cc> - 2017-10-01 02:10 +0200

#1742709 — [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value

From"Tobin C. Harding" <me@tobin.cc>
Date2017-10-01 02:10 +0200
Subject[kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value
Message-ID<uvzZv-2ZT-7@gated-at.bofh.it>
Set the initial value of kptr_restrict to the maximum
setting rather than the minimum setting, to ensure that
early boot logging is not leaking information.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 lib/vsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 0271223..e009325 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -396,7 +396,7 @@ struct printf_spec {
 #define FIELD_WIDTH_MAX ((1 << 23) - 1)
 #define PRECISION_MAX ((1 << 15) - 1)
 
-int kptr_restrict __read_mostly;
+int kptr_restrict __read_mostly = 4; /* maximum setting */
 
 /*
  * return non-zero if we should cleanse pointers for %p and %pK specifiers.
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web