2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 12:07:56 +00:00
Files
xcat-core/xCAT-server
Vinícius Ferrão b53ffaf190 fix(xcatd): refuse an XML request that carries a document type declaration
The daemon reads the XML of every request through this parser. A request could
declare an entity in its own document type declaration, and the parser expanded
it. An entity that refers to other entities grows on each level, so a short
request expands into a large document and consumes the memory and the time of
the daemon. A client holds a certificate before it can send a request, so this
needs an account, but the daemon should not accept the work.

Refuse the declaration itself. The option that stops the parser from expanding
an entity does not cover an entity that a request names inside an attribute, so
it leaves the same growth available through a different part of the document.
Measured on XML::Parser 2.46, a request of 204 bytes that names its entity in
an attribute still grew to 1014 bytes with that option set, which is what the
parser does without it.

No request that xCAT sends carries a document type declaration. The client
builds every request with XML::Simple, which does not write one.

The handler that refuses an external entity stays, so a parser that reaches it
by another route still refuses to read the named file.
2026-09-01 22:06:39 -03:00
..
2026-04-23 02:01:33 -03:00
2016-07-21 13:27:40 -04:00