Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725AbbHJCnU (ORCPT ); Sun, 9 Aug 2015 22:43:20 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:33995 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752216AbbHJCnS (ORCPT ); Sun, 9 Aug 2015 22:43:18 -0400 MIME-Version: 1.0 From: Andy Lutomirski Date: Sun, 9 Aug 2015 19:42:58 -0700 Message-ID: Subject: kdbus_proc_permission (Re: [GIT PULL] kdbus updates for Greg) To: "linux-kernel@vger.kernel.org" , David Herrmann , Greg KH 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: 1378 Lines: 33 I spotted this: +/** + * kdbus_proc_permission() - check /proc permissions on target pid + * @pid_ns: namespace we operate in + * @cred: credentials of requestor + * @target: target process + * + * This checks whether a process with credentials @cred can access information + * of @target in the namespace @pid_ns. This tries to follow /proc permissions, + * but is slightly more restrictive. + * + * Return: The /proc access level (KDBUS_META_PROC_*) is returned. + */ +static unsigned int kdbus_proc_permission(const struct pid_namespace *pid_ns, + const struct cred *cred, + struct pid *target) That code ended up in a pull request, although AFAICT it was never in any patch email sent to me or to any public mailing list. I suspect it was at least partially a response to one of my old reviews. I haven't checked the context in which it's used, but in order for kdbus_proc_permission to do what it claims to do, it appears to be missing calls to security_inode_permission and security_file_permission. --Andy -- 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/