From nobody Tue Aug 30 04:46:09 2022 X-Original-To: testing@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 4MGvry0B0Yz4bX5Z for ; Tue, 30 Aug 2022 04:46:10 +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 4MGvrx4Pxqz3GlS for ; Tue, 30 Aug 2022 04:46:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4MGvrx3Lv2zgKB for ; Tue, 30 Aug 2022 04:46:09 +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 27U4k9FV075871 for ; Tue, 30 Aug 2022 04:46:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27U4k9mU075870 for testing@FreeBSD.org; Tue, 30 Aug 2022 04:46:09 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: testing@FreeBSD.org Subject: [Bug 266112] Capsicum extended attributes test failing on ZFS Date: Tue, 30 Aug 2022 04:46:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: tests X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: sigsys@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: testing@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: Testing List-Archive: https://lists.freebsd.org/archives/freebsd-testing List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-testing@freebsd.org X-BeenThere: freebsd-testing@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661834769; 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=NcKgG5QlEQsMW6JaRV0UJFhgZikQRVR+u0VeuqSFcE8=; b=yOzyiLamm4aH4U8Ovu0kUotk1LY/dXu8vbX1QuuMMpd6qxgBh/2xZEsrESdkfsz8bI0q3M uPJKUCbw+EvCYZSdq0z2NVwicNgKcXGKLkBwsavmuO+D9HwrdEinPYqIt3V+Tp7I3RNPmj KKjUpJfo+fFFkCBgAIMuuY2+zjddJCQWSIaQPa8KIJFY/UZ333jOf0d4i+QWeyjn4k/VRB is5qD0jEABgGmMEbhKciMAorn0R0JjRPBTrok5IO5BAhCrnRM0U8pt8UGs/pQsv/91MQJR RSq4229AeO5BUPKNiDCfQCyr+32QDl8AWk+Z655eahh2/25+oeWnZ7VwUm2YOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661834769; a=rsa-sha256; cv=none; b=uTgsTTORFwJifQ2aPE4+G/KpUoALT2YzI/LwbYUDSU+yY11+Os5PfOpCSGQlu/Q22D+G5n uqVF9upeWeX8+u6JGBcl9n0g2XBaDceDkBhZ7PZ2e1GQhbY3wJLpDMv3L15gtqf5wKX/Bn pIKtr47yhoIKrkikC3mxJ+FbSoVtys77gWSxid1N1xewRxW/LDpd/G0yIX/GhjkILnlj9Q dk6s23ljKyJxnhFMjM3phb3rfsdvvzpma+aG8iSLA36z0lfugZwxL7tHh0y/Za4hf0SCAa OjumCzTtIoojxS42u81xyRU0dWqlXrWtwYJfsbYJfxxuivLRD3m1LcqTbO42JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266112 Bug ID: 266112 Summary: Capsicum extended attributes test failing on ZFS Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: tests Assignee: testing@FreeBSD.org Reporter: sigsys@gmail.com sys/capsicum/functional:test_unprivileged (internal test Capability.ExtendedAttributesIfAvailableForked) fails when running with a Z= FS /tmp since OpenZFS started rejecting attribute names with certain prefixes. It uses compatibility wrappers for the Linux syscalls. They're only ever called with "user.*" attribute names, and they always assume that the user namespace is to be used, but they don't bother stripping the prefix from the name passed the FreeBSD syscalls. diff --git i/contrib/capsicum-test/syscalls.h w/contrib/capsicum-test/syscalls.h index 592a1677e1f1..3ea8803c2f64 100644 --- i/contrib/capsicum-test/syscalls.h +++ w/contrib/capsicum-test/syscalls.h @@ -47,16 +47,29 @@ inline int bogus_mount_() { /* Mappings for extended attribute functions */ #include +#include +static const char *fbsd_extattr_skip_prefix(const char *p) { + if (*p++ =3D=3D 'u' && *p++ =3D=3D 's' && *p++ =3D=3D 'e' && *p++ =3D=3D= 'r' && *p++ =3D=3D '.') + return p; + errno =3D EINVAL; + return NULL; +} inline ssize_t flistxattr_(int fd, char *list, size_t size) { return extattr_list_fd(fd, EXTATTR_NAMESPACE_USER, list, size); } inline ssize_t fgetxattr_(int fd, const char *name, void *value, size_t si= ze) { + if (!(name =3D fbsd_extattr_skip_prefix(name))) + return -1; return extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } inline int fsetxattr_(int fd, const char *name, const void *value, size_t size, int) { + if (!(name =3D fbsd_extattr_skip_prefix(name))) + return -1; return extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, name, value, size); } inline int fremovexattr_(int fd, const char *name) { + if (!(name =3D fbsd_extattr_skip_prefix(name))) + return -1; return extattr_delete_fd(fd, EXTATTR_NAMESPACE_USER, name); } --=20 You are receiving this mail because: You are the assignee for the bug.=