Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347452 > unrolled thread

[PATCH 4.4 114/342] mei: validate request value in client notify request ioctl

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-03-02 02:20 +0100
Last post2016-03-02 02:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 114/342] mei: validate request value in client notify request ioctl Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 02:20 +0100

#1347452 — [PATCH 4.4 114/342] mei: validate request value in client notify request ioctl

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-02 02:20 +0100
Subject[PATCH 4.4 114/342] mei: validate request value in client notify request ioctl
Message-ID<r83Ck-jE-65@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alexander Usyskin <alexander.usyskin@intel.com>

commit 7326fffb712f09a315bc73cc1ee63843f59b8bd4 upstream.

This patch address a possible security issue:

The request field in client notify request ioctl comes from user space
as u32 and is downcasted to u8 with out validation.
Check request field to have approved values
MEI_HBM_NOTIFICATION_STAR/STOP

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/misc/mei/main.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -458,7 +458,11 @@ static int mei_ioctl_client_notify_reque
 {
 	struct mei_cl *cl = file->private_data;
 
-	return mei_cl_notify_request(cl, file, request);
+	if (request != MEI_HBM_NOTIFICATION_START &&
+	    request != MEI_HBM_NOTIFICATION_STOP)
+		return -EINVAL;
+
+	return mei_cl_notify_request(cl, file, (u8)request);
 }
 
 /**

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web