Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r05mK-003FgX-VA for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Nov 2023 20:00:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r05mH-0016gf-5A for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Nov 2023 20:00:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r05mG-0016gX-Mt for pgsql-hackers@lists.postgresql.org; Mon, 06 Nov 2023 20:00:52 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r05m9-0053PA-Cn for pgsql-hackers@lists.postgresql.org; Mon, 06 Nov 2023 20:00:51 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32deb2809daso2921408f8f.3 for ; Mon, 06 Nov 2023 12:00:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1699300844; x=1699905644; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=HQ1CioZNpEkFYiaJLUPf+TBgUEX1Dax/USmv9hUYkH0=; b=kp7siEfksuet5DI5A3TWenVKCjLyHd0MYLd2/L1D1FOY8iVKXYrQfA8aQRT11Wy9Ti 69tlIkHb9Nx+iQGriQWrV9lIu0RpM5xa42qTYGyJfg9Fp26USie3Q5K4sjzSwijoE236 d6n02DaItzb2xw0J0PMdNldM5S6vyZdCx4ep2NlrbyX0sGgSTDnroCAroPIdizqH0ZdL rokKvzRY0Uv6MI6PFM2+gXOrj2UUfZwBUtYuru0BPr0gQPpcfB1M6F0zy+uCJ0MYMBeR PiVpnw0yCxUkzog1r+9+WL8c1xdDkfktgsUuCEv7BH5Pp8F1brnU4KcDlOVz8U2mHA5j F0xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699300844; x=1699905644; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=HQ1CioZNpEkFYiaJLUPf+TBgUEX1Dax/USmv9hUYkH0=; b=Xh8/raLoVEjy0s4ebbFiKBAivrWb+cF7NciY+fn0bLONSGHp+xlbt0+t1eUvuO34vW 52Fthu0RFpbnFaFvXM02n/w3Sb24BlrSfFlF/UMWDcqWeTQzer1asBEVgjWB4xj1ATGj 9ealmf4FKM5DNN6dLB7QQryVyveXVFYCEu8PUpxb1qlXflBkHirkU34s81/k1A4ZUZ3L KCLtP4iB6PlKoylpX0XHfmRl/up9yJ3/Ulqr+/N+x+rgKcD8QlMtsa0dP6eoE1a4x4Rd dtnNBI3DIl8AMowKyEcqR5lUxOe3/IqEIu2cf8YE7PZaDq9l+Dqef/+Bm0s/FLg93xeN HTkw== X-Gm-Message-State: AOJu0YyRT1dafS32avm+rVInLP6/O+toIjVbpYMSnKA2h5MVWpcBgX2j SPskuNhM/F7NWkq6wWE/gyxE2w== X-Google-Smtp-Source: AGHT+IF8jFbgIZhmIXFWybxvZi1xH+r5TpMqnB71Eg6Vp1NI3FCBmREdnNEYUGdVMdLrDMYy8/gxGw== X-Received: by 2002:a05:6000:4b:b0:32d:570b:c0a4 with SMTP id k11-20020a056000004b00b0032d570bc0a4mr20989524wrx.27.1699300844078; Mon, 06 Nov 2023 12:00:44 -0800 (PST) Received: from localhost.localdomain ([2001:871:260:5129:6ea5:5cea:5172:365b]) by smtp.gmail.com with ESMTPSA id o3-20020a056000010300b0032da4f70756sm444403wrx.5.2023.11.06.12.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 12:00:43 -0800 (PST) Message-ID: <05225cbe3f8b60dcce8b8eca61d06f0953762d41.camel@cybertec.at> Subject: Re: Wrong security context for deferred triggers? From: Laurenz Albe To: Tomas Vondra , pgsql-hackers@lists.postgresql.org Date: Mon, 06 Nov 2023 21:00:43 +0100 In-Reply-To: References: <77ee784cf248e842f74588418f55c2931e47bd78.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2023-11-06 at 18:29 +0100, Tomas Vondra wrote: > On 11/6/23 14:23, Laurenz Albe wrote: > > This behavior looks buggy to me. What do you think? > > I cannot imagine that it is a security problem, though. >=20 > How could code getting executed under the wrong role not be a security > issue? Also, does this affect just the role, or are there some other > settings that may unexpectedly change (e.g. search_path)? Perhaps it is a security issue, and I am just lacking imagination. Yes, changes to "search_path" should also have an effect. Yours, Laurenz Albe