Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp18989pxb; Wed, 14 Apr 2021 08:28:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9r6P/x/P9LnNOdbKhm8Q+x8wIvbk7qP77oVdHe3ABlB6awdU//vbU2krLAsw1/csy92sr X-Received: by 2002:a17:906:415b:: with SMTP id l27mr22581548ejk.19.1618414114052; Wed, 14 Apr 2021 08:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618414114; cv=none; d=google.com; s=arc-20160816; b=d1ujt0zOl2wAQCEd5qCB164TOviQcdLu7/5gmLhBtzs9FydQo07yXoZ+ic4ZtntnsC UsMZgnv7Yf0v3VOdcFNn7JPby8gKwbKka+MVY+8Twn0d/2ZFITqUXHSgxwfxSazrYZ82 Lvg61Kk0DMTGiAbk9i4vWYLbBFpK5yQ6BgToPP1464ICZ3SZDbBHIWgoxmv9K32LjsLO 7+KSzm/gZCiaLGkwwLKa4/UZItxEER2V+xYM+1lYcdL7eZ96RTXq0HbLdMVPSkCljjNb U8Bl/4ouwWtp/RJEt9RQJPCfc/JpVBOdz/xZzODG5IndrKaEwfMUTiHlgoaohC6Z4VqT o3uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FASEUqYIZBb6hS7B3SBXB89XThdZrbyVFurlFc1J03g=; b=hKg8TVHPZOnbLJg6D0xRwktjnKnd67lsv7+6F1ii3bVs+zrk4hYvAzHfNVsNiiuKlp AaHcDDC36pJHW5uMfpfPCe77Df1QaoMU4pIR94vdQJN3gB8OU3qrc1r2veapTOS4FJ6A aWQt1kVxyCRJ+KgIae47cUOp7596YprBFX1m0NOTLM6vbAQdWayiYFDn5LFIJ0ABsJlg 7IiMXCQk05ad+VyKvm9feFgAvS6u3OF0JFUrIb6CryCDNBBXy7s4lJ+5sB7DutSVLxdP 5e25K2L8Dmn/YLXS1sB4FDi6pfGf8p9Dz7XtQioaS8cxdxxTvfyPrIOOZFSCKVooj5SR ZCIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Mx/DPTZX"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si5485644ejk.321.2021.04.14.08.27.25; Wed, 14 Apr 2021 08:28:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Mx/DPTZX"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233788AbhDNLKb (ORCPT + 99 others); Wed, 14 Apr 2021 07:10:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233758AbhDNLKa (ORCPT ); Wed, 14 Apr 2021 07:10:30 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6112EC061574; Wed, 14 Apr 2021 04:10:09 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id e186so20250781iof.7; Wed, 14 Apr 2021 04:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FASEUqYIZBb6hS7B3SBXB89XThdZrbyVFurlFc1J03g=; b=Mx/DPTZX+OvWlWEWLYvPDZWCJZsWeZR+F7x8MzZKksI1jZlptdeLmRRTuzXgXukE4p lLrIDsSljV68AGjc/Q9WmYA4+alUPY9CEfuk/jhbpd+xKfCBTt1+XNLhcS/xpmFoRJ/F wuSAsgaXv7XLRUIiE0oQkfiX0ty9ezIDyURe7W+0oe+OXx5V2oecHTOc7Xmu2W27pvLa scbcWoQBr1BDxxKNo/YGmYpPgHbZL5LqOmUyZ+pAKVyu+hxoahNnPWMcCr6XUfL4ZpZE JEfhS95e0gPpdqrB8O8iNh8aHbv4e4HBSM+SHSjtXLarYYMMYtK/7DC2Z6JYK5dQ/YwS H9wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FASEUqYIZBb6hS7B3SBXB89XThdZrbyVFurlFc1J03g=; b=J1VVnJxui+bwtPGBK6SbRyreoUzsMLbqrqpaMxQ89uzoGCI0txkNb5Yif7bk902Pty KJl7tl3aByqnkE/mH39chwfEWaUKj/C6xzC1gxc25cMcwFL7/PctUgPZqw0GHGH/6S8J Ey99aUwBEayPE/kPfP8Avpxkiy2pIbEk190xOzlbkWqV4uWBX+Co7DgrBq5bJOjjdQnf weOTj/VqxZ9b/Ju9hJmwJ+MhWsxW+1zuvY8P+HNBfaw1ChFpRt6vQDFM2O1JoxoVOXY7 gneyk947TyZj/XKDZwwQgmJNog6w+6sIPMYdGHpjVlvFDPRnRNf1bEcKEUn6Y7OrzQk6 rXwg== X-Gm-Message-State: AOAM533mk08v/vyneURcDn2+y7d2C3aOmTBUiRHUNZBBa0Uk3oUA+TO1 La5am5uxuHj3As1IMGfJkTe6YicGO3GwREvSM/8= X-Received: by 2002:a05:6602:179e:: with SMTP id y30mr17120190iox.130.1618398608907; Wed, 14 Apr 2021 04:10:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Stanislav Yakovlev Date: Wed, 14 Apr 2021 15:09:59 +0400 Message-ID: Subject: Re: [PATCH v2] ipw2x00: potential buffer overflow in libipw_wx_set_encodeext() To: Dan Carpenter Cc: Kalle Valo , James Ketrenos , Jeff Garzik , wireless , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 14 Apr 2021 at 12:30, Dan Carpenter wrote: > > The "ext->key_len" is a u16 that comes from the user. If it's over > SCM_KEY_LEN (32) that could lead to memory corruption. > > Fixes: e0d369d1d969 ("[PATCH] ieee82011: Added WE-18 support to default wireless extension handler") > Signed-off-by: Dan Carpenter > --- > v2: use clamp_val() instead of min_t() > > drivers/net/wireless/intel/ipw2x00/libipw_wx.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > Cc: stable@vger.kernel.org Acked-by: Stanislav Yakovlev Stanislav.