Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151AbcDFSyK (ORCPT ); Wed, 6 Apr 2016 14:54:10 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:36979 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753112AbcDFSyH (ORCPT ); Wed, 6 Apr 2016 14:54:07 -0400 MIME-Version: 1.0 In-Reply-To: References: <1459947782-5071-1-git-send-email-ed@abdsec.com> <5e5e7c7ced7bede343530ed1447d7453@abdsec.com> Date: Wed, 6 Apr 2016 11:53:59 -0700 X-Google-Sender-Auth: uWVR6eBwdbPYTnxEtP15LVgXud0 Message-ID: Subject: Re: [PATCH] KERNEL: resource: Fix bug on leakage in /proc/iomem file From: Kees Cook To: Christian Kujau Cc: Emrah Demir , Linus Torvalds , Dan Rosenberg , Dave Jones , Kernel Hardening , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 654 Lines: 18 On Wed, Apr 6, 2016 at 11:52 AM, Christian Kujau wrote: > On Wed, 6 Apr 2016, ed@abdsec.com wrote: >> First, I wrote your attached patch, but then I thought zeroing other >> /proc/iomem values would be better. So I changed it. > > On my systems, /proc/iomem, /proc/ioports and others get their > world-readable bits removed during bootup - I guess that would mitigate > this issue too? Yeah, I think that'd be sufficient (that's the first patch I suggested). It's not a strong as kptr_restrict since kptr_restrict has mode "2", but ... I think that's some diminishing returns... -Kees -- Kees Cook Chrome OS & Brillo Security