From nobody Thu Feb 22 21:56:01 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tgn5Y6DXHz5BVSm for ; Thu, 22 Feb 2024 21:56:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tgn5Y49vdz47Xk for ; Thu, 22 Feb 2024 21:56:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708638961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cCvfvCgfXifi59P7IzbOTPAT8lZpd0w0uz87U1z3LP4=; b=ZPWWAlBUeezVNLzDOaNorp2UIKB5/8I8LPeTGxrK+A1g/2qXlTNettJwOdiYV7PqJ4woVM VEzxrt1BXs3+f9L2IF1AD6bzOBnIvCrKy1rQ4xWmcla6LaQxHKGxtJEoHYlRZX17E+F9G/ sEA4ZuSYiSMxRgRLwOqxFq3zhvs1Ilnkmt+W0ppilW5IBCJ+qshx8Iu5TIbeDYZLYuHjzP RymOyUtJh+BI0p1nLjnNKsSmcpmAQ9plwUX9djNojziT8vnkBna71LBLTmdT1QmwhOXMMd DkZEArJF4VRiHTLEFZh2hNu1NuKpcIsbzm6fBHM/zXjGjCDJNGQBE1xMM5j0Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708638961; a=rsa-sha256; cv=none; b=LeplMXxyA3Got4ijQVc1wpuS8gH22dm+tEqZhBxz9re5JeBxcxmYZ/P74RoTeBw5AEUqK4 j7oEdFvT7VszgYzB7TkW8RXcOBcMtlunAYTQhmuWuxSWEaciKN/olSdN+FDRJc4jPzDKvl sLaxdSWzErKraMDHZXxo0hr58AmxQz223nMzJZst4wgLI4Hc0YM378bcKkOhw+VBuzZFNT xCCYZ4ON8BoIM7jut8tIEA7xoTPcIhTcq/6GyAdMa4VlXxK6aQu9drfSNS/CUhxTffyv3H /A+QwiowxCR9+epMg8f/iqW2Uov/baSVA0VL71nVyIJO0UpCvY23P5dqbUEFFg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tgn5Y2wrYzpv0 for ; Thu, 22 Feb 2024 21:56:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 41MLu1G5053618 for ; Thu, 22 Feb 2024 21:56:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 41MLu1lw053617 for bugs@FreeBSD.org; Thu, 22 Feb 2024 21:56:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277228] Device permissions security hole with partitioning (/dev/geom.ctl) Date: Thu, 22 Feb 2024 21:56:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: vince.bsd@hightek.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277228 Bug ID: 277228 Summary: Device permissions security hole with partitioning (/dev/geom.ctl) Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: vince.bsd@hightek.org Any user belonging to the 'operator' group has the power to completely dele= te and re-create partition tables on all unmounted drive devices on the entire system, just because the devices belong to that group, even if there is no = read or write access to the devices by the group. It is very counter intuitive and unexpected to see devices that have no wri= te access and even no read access, yet be able to do something as critical as delete the entire partition table by just belonging to the group, which cre= ates a significant security hole in FreeBSD that even the most seasoned systems administrator can easily and unexpectedly fall into.=20=20 If I want, for example, to give certain users the ability to partition and write thumb drives, there is no way to do this by setting up a group and wr= ite permission on the flash drive devices (/dev/da*). It requires me make them belong to the same group as /dev/geom.ctl which allows partitioning of every device on the system. Here are the default permissions for geom.ctl. crw-r----- 1 root operator 0xa Nov 16 11:50 /dev/geom.ctl Here are the default permissions for the devices. crw-r----- 1 root operator 0x53 Nov 16 11:50 /dev/ada0 crw-r----- 1 root operator 0x55 Nov 16 11:50 /dev/ada0p1 ... This is not limited, of course, to the operator group. I can change the gr= oup on the drive devices to any other group that I am a member of and even remo= ve read permission for the group on the drives and can still delete the partit= ion table. There is a more detailed discussion on the issue in the forum at https://forums.freebsd.org/threads/gpart-device-permissions-security-hole-d= ev-geom-ctl.92397 Title: gpart device permissions security hole (/dev/geom.ctl) PS: Hopefully this will post in a readable format. Preview is broken in bo= th firefox and chrome (just shows a blank window) and I discovered it apparent= ly has been for several years. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250699 --=20 You are receiving this mail because: You are the assignee for the bug.=