From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754933AbcBVTda (ORCPT ); Mon, 22 Feb 2016 14:33:30 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:45585 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752711AbcBVTd2 (ORCPT ); Mon, 22 Feb 2016 14:33:28 -0500 Date: Mon, 22 Feb 2016 22:33:09 +0300 From: Dan Carpenter To: Greg Kroah-Hartman Cc: Wim de With , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, One Thousand Gnomes Subject: [patch 5/6] Staging: gdm72xx: underflow bug in gdm_wimax_ioctl_get_data() Message-ID: <20160222193309.GE23565@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "size" here should be unsigned, otherwise we might end up trying to copy negative bytes in gdm_wimax_ioctl_get_data() resulting in an information leak. Reported-by: Alan Cox Signed-off-by: Dan Carpenter diff --git a/drivers/staging/gdm72xx/wm_ioctl.h b/drivers/staging/gdm72xx/wm_ioctl.h index 631cb1d..032cb07 100644 --- a/drivers/staging/gdm72xx/wm_ioctl.h +++ b/drivers/staging/gdm72xx/wm_ioctl.h @@ -74,12 +74,12 @@ struct fsm_s { }; struct data_s { - int size; + unsigned int size; void *buf; }; struct udata_s { - int size; + unsigned int size; void __user *buf; };