This is for the client-side receiving messages from xenstored, so there
is no security impact, unlike XSA-72.
Coverity-ID:
1055449
Coverity-ID:
1056028
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
goto error_freemsg;
}
+ /* Sanity check message body length. */
+ if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+ saved_errno = E2BIG;
+ goto error_freemsg;
+ }
+
/* Allocate and read the message body. */
body = msg->body = malloc(msg->hdr.len + 1);
if (body == NULL)