Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751733Ab0KNDFv (ORCPT ); Sat, 13 Nov 2010 22:05:51 -0500 Received: from smtp.outflux.net ([198.145.64.163]:38795 "EHLO smtp.outflux.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751320Ab0KNDFt (ORCPT ); Sat, 13 Nov 2010 22:05:49 -0500 Date: Sat, 13 Nov 2010 19:05:34 -0800 From: Kees Cook To: Linus Torvalds Cc: Dan Rosenberg , James Morris , Joe Perches , LKML , Ingo Molnar , Eugene Teo , Andrew Morton Subject: Re: [PATCH] Fix dmesg_restrict build failure with CONFIG_EMBEDDED=y and CONFIG_PRINTK=n Message-ID: <20101114030534.GH13854@outflux.net> References: <1289669176.16461.12.camel@Joe-Laptop> <1289672721.3090.349.camel@Dan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Canonical X-HELO: www.outflux.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1140 Lines: 27 On Sat, Nov 13, 2010 at 12:22:15PM -0800, Linus Torvalds wrote: > Hmm. No wonder I missed that. The security interface is totally > idiotic. If the intention is for /proc/kmsg security checks to be done > at open time, then dammit, that logic should _not_ be inside some > random security policy. I think the real problem is that this interface exists as both a syscall and a /proc file (sysklogd things use the /proc file). Dropping the from_file means that security policy cannot revalidate the policy (sometimes it might want to block the read, i.e. passing the open fd to another process that is not privileged). But since nothing is actually using from_file yet, I guess it's not a big deal. And note that I'm not defending any specific part of it; I'm just trying to point out what not be possible in the future if we drop from_file like this. -Kees -- Kees Cook Ubuntu Security Team -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/