All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Zero initialise kernel stack variables
@ 2018-02-27 11:15 P J P
  2018-02-27 11:15 ` [PATCH 1/1] Add an option to build kernel with -finit-local-vars P J P
  2018-02-27 19:28 ` [PATCH 0/1] Zero initialise kernel stack variables Kees Cook
  0 siblings, 2 replies; 14+ messages in thread
From: P J P @ 2018-02-27 11:15 UTC (permalink / raw)
  To: kernel-hardening; +Cc: Florian Weimer, P J P

From: P J P <pjp@fedoraproject.org>

Hello,

Please see:
  -> https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00615.html

This experimental patch by Florian Weimer(CC'd) adds an option
'-finit-local-vars' to gcc(1) compiler. When a program(or kernel)
is built using this option, its automatic(local) variables are
initialised with zero(0). This could significantly reduce the kernel
information leakage issues.

A dnf(8) repository of the latest gcc-7.3.1 package built with the above
patch and kernel-4.15.5 package built using '-finit-local-vars' option
on Fedora-27 is available below

  -> https://pjp.fedorapeople.org/init-vars/

This same kernel is running on my F27 test machine as I write this.
There is no slowness or notice-able performance impact as such.

The patch here adds a kbuild menu option to enable/disable '-finit-local-vars'
compiler flag while building the Linux kernel.

I'd appreciate your review and/or inputs to test this option further.

Thank you.
--
Prasad J Pandit / Red Hat Product Security Team (1):
  Add an option to build kernel with -finit-local-vars

 Makefile          | 4 ++++
 lib/Kconfig.debug | 8 ++++++++
 2 files changed, 12 insertions(+)

-- 
2.14.3

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-03-05 20:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 11:15 [PATCH 0/1] Zero initialise kernel stack variables P J P
2018-02-27 11:15 ` [PATCH 1/1] Add an option to build kernel with -finit-local-vars P J P
2018-02-27 19:22   ` Laura Abbott
2018-02-27 19:33     ` Kees Cook
2018-02-28  5:49     ` P J P
2018-02-27 19:28 ` [PATCH 0/1] Zero initialise kernel stack variables Kees Cook
2018-02-27 23:26   ` Laura Abbott
2018-02-27 23:38     ` Kees Cook
2018-02-28  6:22       ` P J P
2018-02-28  8:25       ` Florian Weimer
2018-02-28  6:04   ` P J P
2018-03-02 19:52   ` Nick Kralevich
2018-03-02 21:01     ` Casey Schaufler
2018-03-05 20:42       ` Kees Cook

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.