Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6227925imm; Mon, 23 Jul 2018 13:57:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf6uLz0x0w8+Q9TnvYOkGI/YcQuH5RUhgoXQsj9ZroAbBatVeAogfbv7ImHvQOdIiFJWGc7 X-Received: by 2002:a62:1314:: with SMTP id b20-v6mr14882515pfj.230.1532379457498; Mon, 23 Jul 2018 13:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532379457; cv=none; d=google.com; s=arc-20160816; b=LUsdAE/Z/QjikXNM9EIbd8BNh87kM3ZpjD2oai9QGCfP3IayDiSK+jmANBxXM3XRVx 5a8IGYqxfzPDCfUN/BIhp7a/mc7n4L2mhGRkZB0dxX1wqEkMFcvooSOxGvjE3A0Mr0Fs sYP4eHdiHR/oAmreLt8liOJkIuM5Q8QxtgYhi1P1RuDoROgLw0rC7iGEI/fer4PrOsWQ Pb2MnnfNKnT8U69OLrEdmlGKhGR//ncn6jXK28M60uFtuwElAQVyFrCcHMsQALniA0JZ QICbAGohUdOpjPqkxJaedaOtZPzPKIjh69xZUKzYkOUXqEvlwwMlEqzGU3QYXLNtTnIL TWMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=DFNR+MXEf8GBimdMlEVfTWZarKaQ0YqvZlUwoqZTybQ=; b=F6ITtolpfCHBUIeI/pX0vrmX/rUM8uCfT9SwkJFuZQrQw0tEtUdcnna4t+m8JqPgdR SWhlLqN5vgFnVtrS1yQhERbaR4/MSYiYihgAKybN0hX7iazm4KzfpJhu4eGzQD/4POe1 uROGWno9xEtamTGZY/5M4/zG0VSSkpsu4Se4zppeXf6/8JL/eX7tok1UQb1McphvkBA6 UhLlbihWyNdW7GP4/uNruYtbk8a+vPeJcfYkyX7un6dzgHu4bOHucwFWJwDd75zrbBlc qHCjpJhE9AsC2L9zBZVYLlWwpSjGBCH8puBYdEtEebU6PAhHsKtl7gSWPHddecGr7Bfp 5CNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="naK+kL/U"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a36-v6si9095087pla.207.2018.07.23.13.57.22; Mon, 23 Jul 2018 13:57:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="naK+kL/U"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388139AbeGWV6m (ORCPT + 99 others); Mon, 23 Jul 2018 17:58:42 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:42104 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388068AbeGWV6m (ORCPT ); Mon, 23 Jul 2018 17:58:42 -0400 Received: by mail-oi0-f67.google.com with SMTP id n84-v6so3640052oib.9; Mon, 23 Jul 2018 13:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DFNR+MXEf8GBimdMlEVfTWZarKaQ0YqvZlUwoqZTybQ=; b=naK+kL/UllcIP3uk3ik7L/D3SEYhxqv4EXmjp9wAqGHnDkeNmQT7jt+dafldpbDRb7 hsLo0BbpM6xQYHPfbAfISdjBt92uReoUanHhWVjbtZt3E9SKbF956rbAxrJFI/7gbY1r 5vbvG2czcnTX8S2tudQLUsiJ7peEDBnT5f8jdX1Ip0XQgiduzs+e2keVLu+7sFE0043E vvHZ0KcWKIqGASxZzK0gMeERXkFuvHoyxNXRZEseM8qnCqxdabe8C++N8Xv9dfNrUf1l WUJygrTe1K+8OWuM4Op5S6pZsXlb/C5IThU8A9D/jxFi/vlSAQIrKwXP92hHKWXX5l3n BFaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DFNR+MXEf8GBimdMlEVfTWZarKaQ0YqvZlUwoqZTybQ=; b=L0YqCZK3WwLTCJhyeMjowIYMj3p/CBvGV9st0J3MBeaMkDEsejA22Vx/cvJPt2uQUl rumf3SlBeVfUJ1B69Qe1Iha1W6/bHquqarX/KlB5qGxCu8DJHita4qXPFsTz+QYBxsX3 9NZg8snk/X2u+LVhSIEzdUlfDWy6q4bJfxxnY18K3wQxDAYZMpjdI+4D3x1mNdh54a+I XCaaL7YH85eZJJchKefep0WEX1bWyrXjLPG1SorUGTO1VpgBXtlVaQ4cTy5dTpZHzIM5 VlTPhRw5uDiGaVKQhtMc6Fb9A8rSia4acUmJSofdCPdJv5ug64/EmGyjA/ApE1O8fnSj +c3g== X-Gm-Message-State: AOUpUlFUaZzVH0WRnkJLBKMwQ1q0g5BH7GytP8JxNAT25ihjEMDWAHxU oHY4+azh6lxCczv5K7phFUaYdVtcYH43/fwKwTtlUegqnrw= X-Received: by 2002:aca:3bc2:: with SMTP id i185-v6mr469263oia.156.1532379343007; Mon, 23 Jul 2018 13:55:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:75da:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 13:55:41 -0700 (PDT) In-Reply-To: References: <152788068212.768348.15192457501079586650.stgit@buzz> From: Michael Tirado Date: Mon, 23 Jul 2018 20:55:41 +0000 Message-ID: Subject: Re: [PATCH v6] pidns: introduce syscall translate_pid To: Nagarathnam Muthusamy Cc: Konstantin Khlebnikov , linux-api@vger.kernel.org, LKML , Jann Horn , Serge Hallyn , Prakash Sangappa , Oleg Nesterov , "Eric W. Biederman" , Andrew Morton , Andy Lutomirski , "Michael Kerrisk (man-pages)" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, I'm not seeing much activity on this so here's my $0.02 > Unix socket automatically translates pid attached to SCM_CREDENTIALS. > This requires CAP_SYS_ADMIN for sending arbitrary pids and entering > into pid namespace, this expose process and could be insecure. Perhaps it would be a good idea to add a sysctl switch that prevents credential spoofing over AF_UNIX \by default\ if that is the main concern, or is there another concern and I have read this wrong? I'm having trouble thinking of a legitimate use of SCM_CREDENTIALS spoofing that isn't in a debugging or troubleshooting context and would be more comfortable if it were not possible at all... Anyone know of a program that relies on this spoofing functionality? If you look at socket(7) under SO_PEERCRED there is a way to get credentials at time of connect() for an AF_UNIX SOCK_STREAM, or at time of socketpair() for a SOCK_DGRAM. I would like to think these credentials are reliable, but will probably require some extra daemon to proxy a dgram syslog socket.