Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932079Ab3DXVa4 (ORCPT ); Wed, 24 Apr 2013 17:30:56 -0400 Received: from mail-vc0-f176.google.com ([209.85.220.176]:44888 "EHLO mail-vc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757884Ab3DXVay (ORCPT ); Wed, 24 Apr 2013 17:30:54 -0400 MIME-Version: 1.0 In-Reply-To: References: <20130322145448.f44f9d10a36620c1c11535b7@linux-foundation.org> <20130322221444.GJ15821@hansolo.jdub.homelinux.org> <1256775981.281402.1364864751771.JavaMail.root@redhat.com> <20130409005050.GE18176@hansolo.jdub.homelinux.org> <20130409154820.GE32476@hansolo.jdub.homelinux.org> <20130424175835.GF15272@hansolo.jdub.homelinux.org> Date: Wed, 24 Apr 2013 14:30:53 -0700 X-Google-Sender-Auth: KJHQkUNMkUiDV0ZyJWef9R2q2yY Message-ID: Subject: Re: [PATCH v2] kmsg: Honor dmesg_restrict sysctl on /dev/kmsg From: Linus Torvalds To: Kees Cook Cc: Josh Boyer , Kay Sievers , Andrew Morton , Eric Paris , Christian Kujau , "# 3.4.x" , LKML , Karel Zak 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: 1242 Lines: 29 On Wed, Apr 24, 2013 at 1:35 PM, Kees Cook wrote: > > That said, I much prefer doing the privilege test at read time since > that means passing a file descriptor to another process doesn't mean > the new process can just continue reading. Bullshit. That's exactly the wrong kind of thinking. If you had privileges to open something, and you pass it off, it's *your* choice. In contrast, the "anybody can open, but some people can read/write" has several times resulted in real security issues. Notably the whole "open something, then fool a suid program to write its error message to it". This whole discussion has been f*cking moronic. The "security" arguments have been utter shite with clearly no thinking behind it, the feature is total crap (people need dmesg to do basic bug reporting), and I'm seriously considering just getting rid of this idiotic dmesg_restrict thing entirely. Your comment is the very epitome of bad security thinking. Linus -- 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/