mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] sysctl: fix incorrect write position handling
@ 2014-04-18  0:16 Kees Cook
  2014-04-18  0:16 ` [PATCH v2 1/4] sysctl: clean up char buffer arguments Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Kees Cook @ 2014-04-18  0:16 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Kees Cook, David Howells, Randy Dunlap,
	Ingo Molnar, Peter Zijlstra, Rik van Riel, Mel Gorman, Li Zefan,
	Dave Hansen, Aaron Tomlin, Dario Faggioli, Andrew Shewmaker,
	Andi Kleen, Jens Axboe, Wanpeng Li, Benjamin Herrenschmidt,
	Frederic Weisbecker, Pavel Emelyanov, Andrey Vagin,
	Michael Ellerman

When writing to a sysctl string, each write, regardless of VFS position,
began writing the string from the start. This meant the contents of
the last write to the sysctl controlled the string contents instead of
the first.

This misbehavior was featured in an exploit against Chrome OS. While it's
not in itself a vulnerability, it's a weirdness that isn't on the mind
of most auditors: "This filter looks correct, the first line written
would not be meaningful to sysctl" doesn't apply here, since the size
of the write and the contents of the final write are what matter when
writing to procfs.

For the paranoid, introduce CONFIG_PROC_SYSCTL_STRICT_WRITES to
change the behavior to track file position most strictly.

Thanks,

-Kees


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

end of thread, other threads:[~2014-04-22 18:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18  0:16 [PATCH v2 0/4] sysctl: fix incorrect write position handling Kees Cook
2014-04-18  0:16 ` [PATCH v2 1/4] sysctl: clean up char buffer arguments Kees Cook
2014-04-18  0:28   ` Andi Kleen
2014-04-18  6:24     ` Kees Cook
2014-04-18  0:16 ` [PATCH v2 2/4] sysctl: refactor sysctl string writing logic Kees Cook
2014-04-18  0:16 ` [PATCH v2 3/4] sysctl: allow for strict write position handling Kees Cook
2014-04-21 22:45   ` Andrew Morton
2014-04-22  4:52     ` Kees Cook
2014-04-22 18:11       ` Andrew Morton
2014-04-22 18:37         ` Kees Cook
2014-04-18  0:16 ` [PATCH v2 4/4] test: validate CONFIG_PROC_SYSCTL_STRICT_WRITES Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®