Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp176815rdb; Thu, 19 Oct 2023 00:31:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNTochWswDBkgm6Eu23fYnEm9IxlIMxNg7akhhYXNdsr00+0GD5pDgZ+lS6VMaDOf14YOU X-Received: by 2002:a17:90a:ca88:b0:27d:29f6:79e0 with SMTP id y8-20020a17090aca8800b0027d29f679e0mr1505918pjt.17.1697700663351; Thu, 19 Oct 2023 00:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697700663; cv=none; d=google.com; s=arc-20160816; b=nzsCrjsvcvH8CKEbb8JzFNbgC/7R44ak+P+zbKQYG89xOJ5EHSCS9r5nOexvFLsYGN tYILyW2UOOUXu6EtuuxYqxFKbwgdBKWDFiOzsmD7lyCayxwar4NUL9l1IBcGqKsU5eSI +q2Sgdog9aVLRJryN/Hq0ih/PD7ypk1x5a/kykKCrJ2dp7p0/e6QAhi3GUf9OPKrK1GQ /dPocG8hVEKMsH4mrm16oS0ukf7e9BkvzNODIr3QxUFVqcdoqp1ggWdww3C+o4PZQ8SA EeXi8Vj5vbVmAnmg2nUQ9y5W6BWBa0y1x9VA27WQrkHneYOlREvJpkIQVpZT0OGQPhJC wLIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=vLdF9jzwgnTTjDLtndPI0F1/ObcuHSnFDL/LAEja70g=; fh=g+BWCNntmZMm3pPbxsJurHW66ABBJIG5lqK0w9p4Wmo=; b=RRE1NPWviMT5yDT2HPnBHExxtjuZqYtub44Eu0jCadJ3UpOCTz2CiVUnh773tLbM/o vM6Dkvo3flXI3wZapTKL2f8C0bAe2BFfzPFLRBb6gNPnckEGVxqAjsKOD+iXNDCMwTov Fg2obiWpcz1o60lxo3SZm8CWKKKxgygI/PWIxfhEM+cCnwawJsLKQbPjgeYzswHZxFN4 8fDAlDGu3gTslmXvttUpIWpBUqfg7o5fsi+hHpsexmn4Zft0Al3y6rteh3KQ/BoWKCAL UHjhIgSOAvymC1h0R5Bneh5oKOMc7doL+QfoF5AWHwU93kpOlfAnpag2TZR5RZkX4sYK z6IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KRvWN9M6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 17-20020a17090a035100b002774aec6805si1433812pjf.68.2023.10.19.00.31.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 00:31:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KRvWN9M6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id CFB8F807066A; Thu, 19 Oct 2023 00:30:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233089AbjJSHa6 (ORCPT + 52 others); Thu, 19 Oct 2023 03:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232326AbjJSHa4 (ORCPT ); Thu, 19 Oct 2023 03:30:56 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CDA69F; Thu, 19 Oct 2023 00:30:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E478DC433C8; Thu, 19 Oct 2023 07:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697700654; bh=9g/oL5ciNynJcn9WgauUXtHsSALIsdoIPjlIDDbWEys=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=KRvWN9M6Omb2EVLdylaIEl4OTKB6w92CHI5vHjZIMrWPeWS5m5xxzwc4Svg15O4K+ PSP7OveM/o+APV5fOwGPsPs31FyZa4VPZS2zSvYMJNwljwOJ4ryUMf0ddezjFfYRH0 /oCi2R4j9Ty6XAL6MV+Yp91x+04hyBo/uG12eDCXAAZ0m2eFXF0/FKdJXoa1+ZFmtb grkx5g/glQxPH7wAq4qbM2JAfmbxjfYXldpL+uXzvYibDTj+1X9gPDqFOspPxpoGtZ 0tQWY/ftgAG4V1d1qpUt2RNXLRX42CxjgXu2aZg0vQfDvWb7qlyGSXiAKcWcyylyJM F5CX5JTmq/pag== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v3] wifi: wilc1000: use vmm_table as array in wilc struct From: Kalle Valo In-Reply-To: <20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com> References: <20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com> To: =?utf-8?q?Alexis_Lothor=C3=A9?= Cc: Claudiu Beznea , Michael Walle , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Ajay Singh , Jeff Johnson , stable@vger.kernel.org, =?utf-8?q?Alexis_Lothor=C3=A9?= User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <169770065004.117236.8779995270709198838.kvalo@kernel.org> Date: Thu, 19 Oct 2023 07:30:51 +0000 (UTC) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 00:30:59 -0700 (PDT) Alexis Lothoré wrote: > From: Ajay Singh > > Enabling KASAN and running some iperf tests raises some memory issues with > vmm_table: > > BUG: KASAN: slab-out-of-bounds in wilc_wlan_handle_txq+0x6ac/0xdb4 > Write of size 4 at addr c3a61540 by task wlan0-tx/95 > > KASAN detects that we are writing data beyond range allocated to vmm_table. > There is indeed a mismatch between the size passed to allocator in > wilc_wlan_init, and the range of possible indexes used later: allocation > size is missing a multiplication by sizeof(u32) > > Fixes: 40b717bfcefa ("wifi: wilc1000: fix DMA on stack objects") > Cc: stable@vger.kernel.org > Signed-off-by: Ajay Singh > Signed-off-by: Alexis Lothoré > Reviewed-by: Michael Walle > Reviewed-by: Jeff Johnson Patch applied to wireless-next.git, thanks. 05ac1a198a63 wifi: wilc1000: use vmm_table as array in wilc struct -- https://patchwork.kernel.org/project/linux-wireless/patch/20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches