Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933306AbdDGB6a (ORCPT ); Thu, 6 Apr 2017 21:58:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43366 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbdDGB6V (ORCPT ); Thu, 6 Apr 2017 21:58:21 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0694066CAC Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jeyu@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0694066CAC Date: Thu, 6 Apr 2017 18:58:19 -0700 From: Jessica Yu To: Eddie Kovsky Cc: rusty@rustcorp.com.au, keescook@chromium.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH v5 1/2] module: verify address is read-only Message-ID: <20170407015819.djxqzd2e5i3dd2dt@jeyu> References: <20170406033550.32525-1-ewk@edkovsky.org> <20170406033550.32525-2-ewk@edkovsky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170406033550.32525-2-ewk@edkovsky.org> X-OS: Linux jeyu 4.11.0-rc2+ x86_64 User-Agent: NeoMutt/20161126 (1.7.1) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 07 Apr 2017 01:58:20 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 19 +++ Eddie Kovsky [05/04/17 21:35 -0600]: >Implement a mechanism to check if a module's address is in >the rodata or ro_after_init sections. It mimics the existing functions >that test if an address is inside a module's text section. > >Functions that take a module as an argument will be able to verify that the >module address is in a read-only section. The idea is to prevent structures >(including modules) that are not read-only from being passed to functions. > >This implements the first half of a suggestion made by Kees Cook for >the Kernel Self Protection Project: > > - provide mechanism to check for ro_after_init memory areas, and > reject structures not marked ro_after_init in vmbus_register() > >Suggested-by: Kees Cook >Signed-off-by: Eddie Kovsky Acked-by: Jessica Yu