From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D18BC35254 for ; Mon, 10 Feb 2020 18:32:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55BE1208C4 for ; Mon, 10 Feb 2020 18:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581359565; bh=wlmX6ws1M3C+mMu5qOGLbLMmIo+vTJAZXx8Od+R+lmc=; h=Subject:To:From:Date:List-ID:From; b=bXC6npbSlR6lQez/FvV8JCExzR+PHZk7/4u6L04lm6ftJKIhofAAppVnVqTeT3sTT gcvetSLf1byFeoG7KmYCL6QvkMTICdGPHskXjq5pyWNjdJwAbGvfvhzNSELHQ2UqMy IlpZCBN5WHKE9gWCSwHuM9oOtCEmJX9gHJb/mXXE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726896AbgBJSco (ORCPT ); Mon, 10 Feb 2020 13:32:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:51198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbgBJSco (ORCPT ); Mon, 10 Feb 2020 13:32:44 -0500 Received: from localhost (unknown [104.132.1.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F012B20675; Mon, 10 Feb 2020 18:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581359564; bh=wlmX6ws1M3C+mMu5qOGLbLMmIo+vTJAZXx8Od+R+lmc=; h=Subject:To:From:Date:From; b=xEok+s3QZcVKxIMJbTv3Di/qdvonw0mvOvTWZk7xLJzfxfnz3/WMyNX1g3sU8voJ2 Jasa9a8s+R7bGu461gBcXxIP64bB0U35zq1eD0no86Akx+RtYCCMF7zTLNAxFr0ME1 V7M/ZiygFz7DY9kg/HUcsMwn2RWbY9t2a9OAaIEs= Subject: patch "staging: rtl8188eu: Fix potential security hole" added to staging-linus To: Larry.Finger@lwfinger.net, gregkh@linuxfoundation.org, pietroliva@gmail.com, stable@vger.kernel.org From: Date: Mon, 10 Feb 2020 10:32:43 -0800 Message-ID: <1581359563137156@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This is a note to let you know that I've just added the patch titled staging: rtl8188eu: Fix potential security hole to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 499c405b2b80bb3a04425ba3541d20305e014d3e Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Mon, 10 Feb 2020 12:02:30 -0600 Subject: staging: rtl8188eu: Fix potential security hole In routine rtw_hostapd_ioctl(), the user-controlled p->length is assumed to be at least the size of struct ieee_param size, but this assumption is never checked. This could result in out-of-bounds read/write on kernel heap in case a p->length less than the size of struct ieee_param is specified by the user. If p->length is allowed to be greater than the size of the struct, then a malicious user could be wasting kernel memory. Fixes commit a2c60d42d97c ("Add files for new driver - part 16"). Reported by: Pietro Oliva Cc: Pietro Oliva Cc: Stable Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20200210180235.21691-2-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 9b6ea86d1dcf..7d21f5799640 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -2796,7 +2796,7 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p) goto out; } - if (!p->pointer) { + if (!p->pointer || p->length != sizeof(struct ieee_param)) { ret = -EINVAL; goto out; } -- 2.25.0