]> www.infradead.org Git - users/jedix/linux-maple.git/commit
intel_scu_ipcutil: underflow in scu_reg_access()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 26 Jan 2016 09:24:25 +0000 (12:24 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:44:48 +0000 (15:44 -0700)
commit505aa9e1c76bf06a9ae08d6bf869821e63ddfaf8
treec9bdf04d00537cf9a67177117e3719626fa88735
parent4bc9cfcdf89a7d168fe32108b49241dbb2ab5cd7
intel_scu_ipcutil: underflow in scu_reg_access()

Orabug: 23330826

[ Upstream commit b1d353ad3d5835b16724653b33c05124e1b5acf1 ]

"count" is controlled by the user and it can be negative.  Let's prevent
that by making it unsigned.  You have to have CAP_SYS_RAWIO to call this
function so the bug is not as serious as it could be.

Fixes: 5369c02d951a ('intel_scu_ipc: Utility driver for intel scu ipc')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit abd62631a46c8a27fc607ea5525d3034e8d69781)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/platform/x86/intel_scu_ipcutil.c