[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1397780183-24633-1-git-send-email-keescook@chromium.org>
Date: Thu, 17 Apr 2014 17:16:19 -0700
From: Kees Cook <keescook@...omium.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Kees Cook <keescook@...omium.org>,
David Howells <dhowells@...hat.com>,
Randy Dunlap <rdunlap@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...hat.com>, Mel Gorman <mgorman@...e.de>,
Li Zefan <lizefan@...wei.com>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Aaron Tomlin <atomlin@...hat.com>,
Dario Faggioli <raistlin@...ux.it>,
Andrew Shewmaker <agshew@...il.com>,
Andi Kleen <ak@...ux.intel.com>, Jens Axboe <axboe@...com>,
Wanpeng Li <liwanp@...ux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Pavel Emelyanov <xemul@...allels.com>,
Andrey Vagin <avagin@...nvz.org>,
Michael Ellerman <michael@...erman.id.au>
Subject: [PATCH v2 0/4] sysctl: fix incorrect write position handling
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists