From nobody Sat Mar 23 15:57:33 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 4V23k62dMTz5FJRv for ; Sat, 23 Mar 2024 15:57:34 +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 4V23k55dqgz4jk0 for ; Sat, 23 Mar 2024 15:57:33 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711209453; a=rsa-sha256; cv=none; b=xGCRDvA3LQdqp7kiGTm3F8TwUA6+1kRV/H7BUkU2gmXL5xRM5oDvWmBoJiFJuuHiTUmTJw 4V48Y6pCGoJLEm6DbQ4m+TKgxklI2aAY3qqXc9vtiJwAwx6phlvFIyyg16KmO1F1j9ISv0 qJQGvnDM3k7nDJia5+4N6DShTAp7+eCf/vCXA6CgPViMhJhlWKJ00rFyuVrRK/Y0Ksyh8S 23REBt/rpME92SLeQsKqN1OmxIXMNLaifVgCFwIqNpZ6i6y0yEI6bugopyory86HxKxttu 5LYN8U81bH3STFepDk1R3qGNmL8lMu+14GU+pzvprsGjTM/5ebvnawu/UYkb4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711209453; 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=gAAJlkocvdD4TS90Z2N7lgT7shj+wdI1lo978oYaXEQ=; b=RQnFTCiF8YCqayBsxViyynY1YFTqONFDPH6PkRRi2p+6CLEFuqP5NMrPv1sRWscGM5rvWP 8v00Ax+FlWUoCpj8cT9FdytWbkilXH/mtylNx0hneIUC/Uyqa01AhvQIS+n7bzZoVqOjuv wjmlslUrbUTDjkO1Qds772OASrHWFJUdn+KTKs5fSBYXgLoGFSM0tx25ZKFtTup+Ne8iaB yDf78u6Cv4FgfG1ffGTdvLd5JEg5M+jecy0/ade3Ghai2YzQUQ0XLCnLlQU5CaiqMEbkw2 yaUk1+M4DV/A8upjox+xmqgbOCtexy1aHjuV55R7mns3nUj4smIlPPcFR5yVbQ== 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 4V23k557p6zv9P for ; Sat, 23 Mar 2024 15:57:33 +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 42NFvXLf055066 for ; Sat, 23 Mar 2024 15:57:33 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 42NFvXoZ055065 for bugs@FreeBSD.org; Sat, 23 Mar 2024 15:57:33 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 277908] Capsicum filesystem extended attribute support is broken Date: Sat, 23 Mar 2024 15:57:33 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: shawn.webb@hardenedbsd.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 attachments.mimetype attachments.created 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=3D277908 Bug ID: 277908 Summary: Capsicum filesystem extended attribute support is broken Product: Base System Version: 14.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: shawn.webb@hardenedbsd.org Attachment #249428 text/plain mime type: Created attachment 249428 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D249428&action= =3Dedit Example test case code The extattr_get_fd(2) syscall is broken for file descriptors with the CAP_EXTATTR_GET capability in a Capabilities-enabled process. Though I have= n't tried them, I suspect extattr_list_fd(2) and extattr_set_fd(2) is broken as well (assuming the file descriptor has the matching CAP_EXTATTR_* rights(4)= ). I've written a test case here: https://git.hardenedbsd.org/shawn.webb/broken-capsicum/-/tree/main/extattr?= ref_type=3Dheads Reproduction steps are as follows: 1. git clone https://git.hardenedbsd.org/shawn.webb/broken-capsicum.git 2. cd broken-capsicum/extattr 3. make 4. touch /tmp/testfile-01 4. (as root) setextattr system test-01 asdf /tmp/testfile-01 5. (as root) obj/extattr /tmp/testfile-01 A message will be printed out: "extattr_get_fd: Not permitted in capability mode" From reading the rights(4) manual page, the only thing needed for getting a filesystem extended attribute value in a capabilities-enabled process is th= at the file descriptor has the CAP_EXTATTR_GET capability. ZFS is being used on the systems I've tested. I don't know if UFS versus ZFS makes any difference. --=20 You are receiving this mail because: You are the assignee for the bug.=