From 9e894108a9f022637e8150c31490094a8dc00a9a Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Sat, 25 Oct 2014 00:45:28 +0100 Subject: [PATCH] handle: validate items in kdbus_items_validate() in KDBUS_CMD_CONN_INFO Try to validate the KDBUS_ITEM_NAME before going further Signed-off-by: Djalal Harouni --- handle.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/handle.c b/handle.c index 12f132f..dabafad 100644 --- a/handle.c +++ b/handle.c @@ -861,6 +861,11 @@ static long kdbus_handle_ioctl_ep_connected(struct file *file, unsigned int cmd, if (ret < 0) break; + ret = kdbus_items_validate(cmd_info->items, + KDBUS_ITEMS_SIZE(cmd_info, items)); + if (ret < 0) + break; + if (cmd == KDBUS_CMD_CONN_INFO) ret = kdbus_cmd_info(conn, cmd_info); else -- 2.34.1