git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
xen/xenbus: Reject replies with payload > XENSTORE_PAYLOAD_MAX.
[pandora-kernel.git]
/
drivers
/
xen
/
xenbus
/
xenbus_xs.c
diff --git
a/drivers/xen/xenbus/xenbus_xs.c
b/drivers/xen/xenbus/xenbus_xs.c
index
ede860f
..
a580b17
100644
(file)
--- a/
drivers/xen/xenbus/xenbus_xs.c
+++ b/
drivers/xen/xenbus/xenbus_xs.c
@@
-801,6
+801,12
@@
static int process_msg(void)
goto out;
}
+ if (msg->hdr.len > XENSTORE_PAYLOAD_MAX) {
+ kfree(msg);
+ err = -EINVAL;
+ goto out;
+ }
+
body = kmalloc(msg->hdr.len + 1, GFP_NOIO | __GFP_HIGH);
if (body == NULL) {
kfree(msg);