All of lore.kernel.org
 help / color / mirror / Atom feed
* [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options
@ 2017-10-01  0:06 Tobin C. Harding
  2017-10-01  0:06 ` [kernel-hardening] [RFC V2 1/6] lib: vsprintf: additional kernel pointer filtering options Tobin C. Harding
                   ` (9 more replies)
  0 siblings, 10 replies; 80+ messages in thread
From: Tobin C. Harding @ 2017-10-01  0:06 UTC (permalink / raw)
  To: Greg KH, Petr Mladek, Joe Perches, Ian Campbell, Sergey Senozhatsky
  Cc: Tobin C. Harding, kernel-hardening, linux-kernel,
	Catalin Marinas, Will Deacon, Steven Rostedt, William Roberts,
	Chris Fries, Dave Weinstein

Version 2 of Greg's patch series with changes made as suggested by comments to V1.

Applies on top of Linus' current development tree

a8c964eacb21288b2dbfa9d80cee5968a3b8fb21

V1 cover letter:

Here's a short patch series from Chris Fries and Dave Weinstein that
implements some new restrictions when printing out kernel pointers, as
well as the ability to whitelist kernel pointers where needed.

These patches are based on work from William Roberts, and also are
inspired by grsecurity's %pP to specifically whitelist a kernel pointer,
where it is always needed, like the last patch in the series shows, in
the UIO drivers (UIO requires that you know the address, it's a hardware
address, nothing wrong with seeing that...)

I haven't done much to this patch series, only forward porting it from
an older kernel release (4.4) and a few minor tweaks. [snip]

V1 -> V2:

* Renamed function kptr_restrict_always_cleanse_pointers() to
  kptr_restrict_cleanse_kernel_pointers() (as suggested by Petr Mladek).

* Re-ordered switch statement (within pointer()) to place default at the end
  of the statement (as suggested by Petr Mladek).

* Updated Documentation/printk-formats.txt (as suggested by Joe Perches).

* Updated Documentation/sysctl/kernel.txt (as suggested by Petr Mladek).

Suggestion by Ian Campbell to add comments on the threat model being mitigated
by use of %pa vs %paP etc is not implemented because I do not know the threat
model (I'm only the janitor). Happy to add them if someone writes them.

thanks,
Tobin.

Tobin C. Harding (6):
  lib: vsprintf: additional kernel pointer filtering options
  lib: vsprintf: whitelist stack traces
  lib: vsprintf: physical address kernel pointer filtering options
  lib: vsprintf: default kptr_restrict to the maximum value
  lib: vsprintf: add "%paP", "%papP", and "%padP" specifiers
  drivers: uio: un-restrict sysfs pointers for UIO

 Documentation/printk-formats.txt |  27 ++++++++--
 Documentation/sysctl/kernel.txt  |   9 ++++
 arch/arm64/kernel/traps.c        |   4 +-
 drivers/uio/uio.c                |   4 +-
 kernel/printk/printk.c           |   2 +-
 kernel/sysctl.c                  |   2 +-
 lib/vsprintf.c                   | 114 +++++++++++++++++++++++++++++----------
 scripts/checkpatch.pl            |   2 +-
 8 files changed, 124 insertions(+), 40 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-10-13 22:48 UTC | newest]

Thread overview: 80+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-01  0:06 [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options Tobin C. Harding
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 1/6] lib: vsprintf: additional kernel pointer filtering options Tobin C. Harding
2017-10-04  8:55   ` Greg KH
2017-10-04 13:08     ` Steven Rostedt
2017-10-04 13:26       ` Greg KH
2017-10-04 13:29         ` Steven Rostedt
2017-10-04 13:54           ` Greg KH
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 2/6] lib: vsprintf: whitelist stack traces Tobin C. Harding
2017-10-02 10:42   ` Will Deacon
2017-10-02 21:49     ` Tobin C. Harding
2017-10-04  8:56     ` Greg KH
2017-10-04  8:58       ` Will Deacon
2017-10-04  9:02         ` Greg KH
2017-10-04 10:42           ` Tobin C. Harding
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 3/6] lib: vsprintf: physical address kernel pointer filtering options Tobin C. Harding
2017-10-04  8:58   ` Greg KH
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 4/6] lib: vsprintf: default kptr_restrict to the maximum value Tobin C. Harding
2017-10-04  8:55   ` Greg KH
2017-10-04 16:42   ` Kees Cook
2017-10-04 16:42     ` Kees Cook
2017-10-04 16:48     ` Roberts, William C
2017-10-04 16:48       ` Roberts, William C
2017-10-04 17:08     ` Linus Torvalds
2017-10-04 17:08       ` Linus Torvalds
2017-10-04 17:28       ` Linus Torvalds
2017-10-04 17:28         ` Linus Torvalds
2017-10-04 19:13         ` Jann Horn
2017-10-04 19:13           ` Jann Horn
2017-10-04 19:23           ` Linus Torvalds
2017-10-04 19:23             ` Linus Torvalds
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 5/6] lib: vsprintf: add "%paP", "%papP", and "%padP" specifiers Tobin C. Harding
2017-10-04  8:58   ` Greg KH
2017-10-01  0:06 ` [kernel-hardening] [RFC V2 6/6] drivers: uio: un-restrict sysfs pointers for UIO Tobin C. Harding
2017-10-04  8:58   ` Greg KH
2017-10-01  0:11 ` [kernel-hardening] [RFC V2 0/6] add more kernel pointer filter options Tobin C. Harding
2017-10-04  8:57   ` Greg KH
2017-10-04 10:45     ` Tobin C. Harding
2017-10-04  8:58 ` Greg KH
2017-10-04 10:50   ` Tobin C. Harding
2017-10-04 12:42     ` Greg KH
2017-10-04 13:28       ` Steven Rostedt
2017-10-04 13:28         ` Steven Rostedt
2017-10-04 13:31         ` Steven Rostedt
2017-10-04 16:17   ` Roberts, William C
2017-10-04 16:17     ` Roberts, William C
2017-10-04 15:41 ` Linus Torvalds
2017-10-04 15:41   ` Linus Torvalds
2017-10-04 16:22   ` Boris Lukashev
2017-10-04 16:22     ` Boris Lukashev
2017-10-04 16:29     ` Linus Torvalds
2017-10-04 16:29       ` Linus Torvalds
2017-10-04 16:54       ` Steven Rostedt
2017-10-04 16:54         ` Steven Rostedt
2017-10-04 18:58   ` Jordan Glover
2017-10-04 19:19     ` Linus Torvalds
2017-10-04 21:58       ` Roberts, William C
2017-10-04 23:21         ` Daniel Micay
2017-10-04 23:52         ` Linus Torvalds
2017-10-05  0:09           ` Linus Torvalds
2017-10-05 13:55             ` Bjorn Helgaas
2017-10-05  0:29           ` Daniel Micay
2017-10-05  0:35             ` Kees Cook
2017-10-06  8:33               ` Djalal Harouni
2017-10-05  2:19           ` Tobin C. Harding
2017-10-05  3:10             ` Linus Torvalds
2017-10-05  3:15               ` Kees Cook
2017-10-05 15:12               ` Roberts, William C
2017-10-05 16:19                 ` Linus Torvalds
2017-10-05 17:10                   ` Dave Weinstein
2017-10-07 23:44                   ` Theodore Ts'o
2017-10-08  0:08                     ` Linus Torvalds
2017-10-13 16:32                       ` Roberts, William C
2017-10-13 18:11                         ` Linus Torvalds
2017-10-13 19:34                           ` Kees Cook
2017-10-13 20:22                             ` Linus Torvalds
2017-10-13 20:47                               ` Kees Cook
2017-10-13 21:45                                 ` Linus Torvalds
2017-10-13 22:48                                 ` Theodore Ts'o
2017-10-13 16:14             ` Roberts, William C
2017-10-04 16:32 ` Ian Campbell

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.