From owner-freebsd-security@FreeBSD.ORG Sun Apr 14 12:19:06 2013 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2CF4163C for ; Sun, 14 Apr 2013 12:19:06 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by mx1.freebsd.org (Postfix) with ESMTP id AD832D93 for ; Sun, 14 Apr 2013 12:19:05 +0000 (UTC) Received: by mail-lb0-f177.google.com with SMTP id r10so3810066lbi.36 for ; Sun, 14 Apr 2013 05:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=rw8J/uSOBU3RpJhs/M5+PH13jBVvmps8chURR6fMU8o=; b=nT65GM64bo5V7/dJSu+JKGnULlabsPnXB40ENTpJYTgn7KHwjZXsSQSHNEESTPCPVa EXbPrimmdhr5bQ6qnZ4leIlqicAMJAOGs2meKiUiXZOM/A2Ykez0YyMhztdkkycqwa1X Dk72P+zOHlw8Bf7PJG/NtBwtjE0WF995rxS7U6rjHhZ9YFpNN0fzW1TbIIpItlszSJPv vU+a9RUz0oPmfaUBOsa3FEutX6RI7QT7CPEBwiIsZfHHIpS8chJ3bZpHo/uuiJMUf4NP 3sp3qrPgBQt6jD1HBxYZuG/f5xzSfg1aaExsQRqB8rINp/MjunFHzSZkB2TYkRJVULNK 8W6Q== MIME-Version: 1.0 X-Received: by 10.152.6.229 with SMTP id e5mr8654421laa.6.1365941944207; Sun, 14 Apr 2013 05:19:04 -0700 (PDT) Received: by 10.112.198.201 with HTTP; Sun, 14 Apr 2013 05:19:04 -0700 (PDT) In-Reply-To: <000A44DA-4A24-48C8-A4B2-EE9473A03C38@petur.eu> References: <5169F961.7030407@erdgeist.org> <000A44DA-4A24-48C8-A4B2-EE9473A03C38@petur.eu> Date: Sun, 14 Apr 2013 13:19:04 +0100 Message-ID: Subject: Re: File descriptors From: Tom Evans To: =?UTF-8?Q?P=C3=A9tur_Ingi_Egilsson?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Apr 2013 12:19:06 -0000 On Sun, Apr 14, 2013 at 9:48 AM, P=C3=A9tur Ingi Egilsson = wrote: > The general understanding by users, be it right or wrong, is that wheneve= r a files' permission is changed, then the effect is immediate everywhere i= n the system. > This wrong metal model _could_ result in malicious access to a file. > > I merely wanted to bring the issue to your attention. > > - p=C3=A9tur > As des said earlier, this model is essential for doing things in a secure manner. An analogy would be sockets, if you drop privileges after binding to a privileged socket, should you lose access to the socket? Of course not. The only thing that is relevant is whether you had permission to open the file/bind the socket at the point you did it. After that, the fd/socket is all yours, regardless. Cheers Tom