Re: BUG #18274: Error 'invalid XML content' - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #18274: Error 'invalid XML content'
Date
Msg-id ZaSyLnPwVpzHxDCU@paquier.xyz
Whole thread Raw
In response to Re: BUG #18274: Error 'invalid XML content'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sun, Jan 14, 2024 at 10:16:33PM -0500, Tom Lane wrote:
> Blowing out a backend's memory or CPU consumption is not something
> we try hard to prevent, so I'm not terribly worried on that score.
> The one thing I'm concerned about is that raising these limits could
> make bugs (like integer overflow problems) reachable that were not
> otherwise, and that such bugs might rise to the level of security
> problems.  They've had such issues before (CVE-2022-40303) and it'd be
> foolish to be sure that none remain.  Still, that's clearly their bug
> not our bug.

Interesting.  We could always keep our coding more defensive, not sure
entirely how.  I am not sure that this is enough to not just use the
upper limit, though.  Being able to manipulate larger XML elements
sounds like a fair argument from the user perspective these days,
especially with memory being cheaper and larger.

1fb2e0dfc631 has added the huge option back in 2009 in libxml2, so
it's been around for some time.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18274: Error 'invalid XML content'
Next
From: Zu-Ming Jiang
Date:
Subject: Re: BUG #18292: Unexpected error: "relation "hobbies_r" does not exist" caused by user-defined functions