Re: BUG #15420: Server crash. Segmentation fault when parsing xml file - Mailing list pgsql-bugs

From Pavel Stehule
Subject Re: BUG #15420: Server crash. Segmentation fault when parsing xml file
Date
Msg-id CAFj8pRD6d=wHgGRkVE2ZzCFof_ga+mNQ+V2Yw59r0StTjfqc_w@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15420: Server crash. Segmentation fault when parsing xml file  (Sergey Mirvoda <sergey@mirvoda.com>)
Responses Re: BUG #15420: Server crash. Segmentation fault when parsing xmlfile  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs


čt 4. 10. 2018 v 16:42 odesílatel Sergey Mirvoda <sergey@mirvoda.com> napsal:


чт, 4 окт. 2018, 19:31 Alvaro Herrera <alvherre@2ndquadrant.com>:
On 2018-Oct-04, Sergey Mirvoda wrote:

> чт, 4 окт. 2018, 19:03 Pavel Stehule <pavel.stehule@gmail.com>:

> Pavel, thank you for your interest.
> It is definitely something inside this document.
>
> Actually we loaded about 10k different documents like this one. About 10Gb
> of content and crash is only on this one.

It's probably a good idea to report this to libxml2 then.

--
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Sure, but bug is mostly about unhandled server crash. Is it normal?

Nobody can handle process crash. This should be fixed on libxml2 side.
 

Also, as far as I understand Pavel, lbxml2 interface somehow changed for handling 'huge' documents, but postgres don't handle this correctly. 

This can be fixed only partially - the authors of libxml2 introduced new limit and new option, but there is not possible apply new option on all API.

If I understand well to this behave - libxml2 implemented new limits as safeguards against strange attacker documents. Is it question if it is good idea disable this safeguards by default. Second issue is impossibility to set this option for functionality that we use from libxml2 - and there are not alternatives. I have not any idea, how these issues can be fixed on postgresql side.

The mentioned limit is 10 000 000 bytes - if you will generate documents less than this size, then probably don't hit this issue.

Regards

Pavel


pgsql-bugs by date:

Previous
From: Sergey Mirvoda
Date:
Subject: Re: BUG #15420: Server crash. Segmentation fault when parsing xml file
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15420: Server crash. Segmentation fault when parsing xmlfile