bytea(uuid) missing proleakproof? - Mailing list pgsql-hackers

From Chao Li
Subject bytea(uuid) missing proleakproof?
Date
Msg-id 1FAAF426-9205-4F53-8D3B-F2003D96EC37@gmail.com
Whole thread
Responses Re: bytea(uuid) missing proleakproof?
Re: bytea(uuid) missing proleakproof?
List pgsql-hackers
Hi,

While testing "[ba21f5bf8] Allow explicit casting between bytea and uuid", I noticed that the new proc bytea(uuid) is
notmarked as proleakproof, while the other functions in the group, bytea(int2), bytea(int4), and bytea(int8), are all
markedas proleakproof. 

Looking into the backend function uuid_bytea(), it just returns uuid_send(fcinfo). For a valid uuid datum, uuid_send()
onlycopies the UUID value into a bytea result, so I don't see an input-dependent error path or other reason not to mark
bytea(uuid)as proleakproof. 

This matters for security barrier planning, because a qual using uuid::bytea is otherwise treated as leaky and cannot
bepushed down. Attached is a tiny patch to fix that. 

I didn't mark uuid_send() itself as proleakproof because none of send/receive functions are marked as proleakproof in
pg_proc.dat.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/





Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Amit Kapila
Date:
Subject: Re: Fix publisher-side sequence permission reporting