You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Heap buffer overflow in Oracle XML namespace parsing #1824
register_ns_from_csting() allocates fixed 1024-byte StringInfo buffers for the namespace prefix and URL, then writes into them with memcpy() sized from the caller-supplied namespace string, with no bounds check. Any Oracle-compatible XML function that accepts an nsList argument (e.g. EXTRACTVALUE, UPDATEXML, INSERTCHILDXML, etc.) will trigger a heap buffer overflow — and corrupt heap metadata, crashing the backend — if the supplied namespace prefixor URL exceeds 1024 bytes.
Expected behavior/code
The prefix/URL should be written using a growable append (e.g. appendBinaryStringInfo()), so the buffer always matches the actual input length instead ofa fixed size, preventing arbitrarily long input from corrupting adjacent heap memory.
Step to reproduce
Call any Oracle-compatible XML function that accepts an nsList argument with a namespace prefix or URL longer than 1024 bytes to trigger the overflow. Exact reproduction SQL is withheld here in line with responsible disclosure; happy to share it privately with maintainers.
Additional context that can be helpful for identifying the problem
Activity