From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763472AbcINOEm (ORCPT ); Wed, 14 Sep 2016 10:04:42 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:46950 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762287AbcINOEl (ORCPT ); Wed, 14 Sep 2016 10:04:41 -0400 Date: Wed, 14 Sep 2016 15:04:16 +0100 From: One Thousand Gnomes To: Jiri Slaby Cc: Kees Cook , Greg Kroah-Hartman , kernel-hardening@lists.openwall.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pty: make ptmx file ops read-only after init Message-ID: <20160914150416.2d938c60@lxorguk.ukuu.org.uk> In-Reply-To: <43f1953c-d8a3-647f-20eb-bec4898e1b8e@suse.cz> References: <20160908223558.GA11742@www.outflux.net> <43f1953c-d8a3-647f-20eb-bec4898e1b8e@suse.cz> Organization: Intel Corporation X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 14 Sep 2016 09:59:42 +0200 Jiri Slaby wrote: > On 09/09/2016, 12:35 AM, Kees Cook wrote: > > The ptmx_fops structure is only changed during init, so mark it as such. > > Right, but I am missing what is the benefit? You would have to elaborate > here... The pages end up marked read only even to the kernel (and in future could even be marked read only forever when in kvm if we get suitable virtual machine extensions). That makes it much harder to patch those vectors when making security attacks.