Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3016777rdg; Tue, 17 Oct 2023 01:47:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHpcF0wJWey0nkLS4P0chlVFdTZ0j36f8aLpiJ/RP0UwbeELUVthCnNTnVWvzfpnRu8nWvX X-Received: by 2002:a05:6358:44e:b0:14c:e2d3:fb2e with SMTP id 14-20020a056358044e00b0014ce2d3fb2emr1903995rwe.0.1697532467073; Tue, 17 Oct 2023 01:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697532467; cv=none; d=google.com; s=arc-20160816; b=axCUlnRwOK7hOugKC7XgIrgVdxxoN5ynSoW50OL6x1cGqNb5eKn8AMvfL6y5WcBSPP JntzxuNPjLI21HuR8uQ1EAkjMgg7hNtkKhTIsbnf77Dlqh3X5zApEtjP6eczJlHmfljh lqt6KUEpeouR3lG6G2lmI4SO5flQaL2N10gHBQ4ZTaj2XQzKemFjLVTH1Q4jkhcWLzuW bJeCdBDq5haVlb/XRHv+UqQ8mQ37G1/HsbYm9jOUU7CPI6PX0lNQJSP/7U1EF2y+gyuE BNmee7J/JnY8+kMk1LnoskXbUsGpx7Bru8diN2HW2UEgVMIecE97J/j3ZZOFgsaw+AbJ wtwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:references :in-reply-to:subject:cc:to:from:date:mime-version:dkim-signature; bh=YfSMPngp96tLXmftRw+4sekNU/wcdz2J6DRn0F/1AVI=; fh=GUjVhQhbK1LlYxmxhUBDs3PT3sqKaKQW51UzCWmnzzs=; b=moC8aLjHs8dR+sqOgYnfg+HYomNH5KIsgOhe666IalhZgXrhN0VfSHuLB9lXtYMxt3 0ixIjaF4jf+4Vabx+fdnopDmJKgZFN7A15HqLE4/Dc526+4vmG976eiBRQt1zXQxipYI C2G+tXAxlo0XAbEjepwQQAbj04acRKDgpte875HbbX2titFjanreK3ijmQQP2Lt+Wlay vPQzvHh6hRZn1YoYDcDzM0zLEKkUObcwvN0HJ9dav8GoYNHzMEbhjzftpgSO/WIVhJNf nRFqKayvEmnt3RMX+wsPkavqXmZx8QUtATaHlrQZ+BlMz86Y45bSUhkwXthp0Z1K4UPr wudw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BZX5IroC; 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 t185-20020a6381c2000000b005adec857fd3si1256705pgd.523.2023.10.17.01.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 01:47:47 -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=BZX5IroC; 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 286658027672; Tue, 17 Oct 2023 01:47:46 -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 S234680AbjJQIrf (ORCPT + 52 others); Tue, 17 Oct 2023 04:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232134AbjJQIre (ORCPT ); Tue, 17 Oct 2023 04:47:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BF748E; Tue, 17 Oct 2023 01:47:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53FB1C433C8; Tue, 17 Oct 2023 08:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697532453; bh=Bn6xXXAWpQvwsW5L9Wtxkhfcme+lm1ca7BBUnXIdZks=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BZX5IroC0wVtNty+iQqGTDm7MVrOy17NbdNmrJHLQRHMMGUorbXhEfbXQ3143gSEd XEhomT0rkznVkR4CPaDbuUYiNr0o3VJfLqzI9A/QtHMcFill6oVJdIIpb2FDd+S/CD WHPxUqzkTSZv+0N3Nn9z+aHOT4mPJHRdQWOSkL36+Jp939r9OOhtdAJXs35qtf9eR7 s/m0R6nFE4D8Zeydcb84FaWwlKE/bPvMttPTeD9NoW4QGZr5dpcvvXd8MjBQ3StHFz WKdMi7k940UGSNmuQf7EOeWobz4ODHCYtfEyc3Y0q079b1PH13GwTpMUcXuRu7saL1 pjMmEXAWIB3NQ== MIME-Version: 1.0 Date: Tue, 17 Oct 2023 10:47:28 +0200 From: Michael Walle To: =?UTF-8?Q?Alexis_Lothor=C3=A9?= Cc: Claudiu Beznea , Kalle Valo , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Ajay Singh , Jeff Johnson , stable@vger.kernel.org Subject: Re: [PATCH v3] wifi: wilc1000: use vmm_table as array in wilc struct In-Reply-To: <20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com> References: <20231017-wilc1000_tx_oops-v3-1-b2155f1f7bee@bootlin.com> Message-ID: <8f50e47f00d31b3d40cf4acb0ff5856a@kernel.org> X-Sender: mwalle@kernel.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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]); Tue, 17 Oct 2023 01:47:46 -0700 (PDT) Am 2023-10-17 10:43, schrieb Alexis Lothoré: > 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