From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbcEKTBv (ORCPT ); Wed, 11 May 2016 15:01:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34556 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752181AbcEKTAa (ORCPT ); Wed, 11 May 2016 15:00:30 -0400 Date: Wed, 11 May 2016 10:58:13 -0700 From: Olof Johansson To: Gwendal Grignou Cc: rdunlap@infradead.org, olofj@chromium.org, alan@lxorguk.ukuu.org.uk, cernekee@chromium.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] platform/chrome: cros_ec_dev - Fix security issue Message-ID: <20160511175813.GB21847@localhost> References: <1457457232-2926-1-git-send-email-gwendal@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457457232-2926-1-git-send-email-gwendal@chromium.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 08, 2016 at 09:13:52AM -0800, Gwendal Grignou wrote: > Prevent memory scribble by checking that ioctl buffer size parameters > are sane. > Without this check, on 32 bits system, if .insize = 0xffffffff - 20 and > .outsize the amount to scribble, we would overflow, allocate a small > amounts and be able to write outside of the malloc'ed area. > Adding a hard limit allows argument checking of the ioctl. With the > current EC, it is expected .insize and .outsize to be at around 512 bytes > or less. > > Signed-off-by: Gwendal Grignou Applied now. -Olof