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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1FDB8C4332F for ; Fri, 2 Dec 2022 22:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: Date:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=nGSoUp7WQX3IaDa58qZXS7qmIQUelvFIDPleLU6fQ2k=; b=y7HO7nHfz1Y9fP 5X/14lh4ZSNT/FoLA2SL7yznaHSo3pyQODNTeqfN5K3p/OlQq1HF6MHU4+7hjNHgBfnTPmyPiXgDk RZDhSr4tjsxo5vb61c8BLjYpgav2APOawDm5GxTHfL/Q4zsPjzh25JVD1fTeIq085+IEIfM7/BXP3 hjP/v5AM6PBN0kCJM0s9x9lgw9pjsKQon2gvLn5XDcjySd4HBrCt197kw5NLnEA6Zh0r6HX8vF5T0 wl1LbUWWBp0bqhclQClci6/yjzzj9nq4nRPEfZLv+TEhSKKT5RghUS/0MCxCDKzPN24gN6KNorfL7 eOMT5BCaBDyCYSztusqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1ESX-001VfZ-Qt; Fri, 02 Dec 2022 22:24:41 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p1ESR-001VcJ-8W for linux-arm-kernel@lists.infradead.org; Fri, 02 Dec 2022 22:24:38 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 6so5479636pgm.6 for ; Fri, 02 Dec 2022 14:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :from:to:cc:subject:date:message-id:reply-to; bh=F3xXQ9lCYQUlSBdhMmL8tVWcZF1nta/Hqkq7klcjUGo=; b=ANMtQZQ22M8vFa//m1q5Nmz5C5pG2EpSadk6l4a/nZGYH8n8ibP6Wt6LaUr0FtwdxZ 8YJeutEDfbFawUjEe7XOl53hVibAOcUc5N7HvhA+E15qlobGxxJb5hICBtS23EoLD3Zq oyal/07g/8aHTI8NzzysmrvqI1hNFUbBl+PCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F3xXQ9lCYQUlSBdhMmL8tVWcZF1nta/Hqkq7klcjUGo=; b=rcQd/wrAwP1TTgh16efEL1F7GWrTYyIST8cWf+ezOpDT6cy3SCop0+Om9i1E1VHDGq UirtQV+o1GnZFCduVRR0jX2vQ2FT4LZ7DRdZUVM2fe+5cW9wxhfZGnLJj1SvRdUb91WM M8P8Dr2kDesCtwDo0KkEE90F2DWDpMVKqpRCK3/JS02bF9qf2mQTghNqR1B/6g7o5ZKQ xust8lzmtS6ru3tNPKMRMZtVdHJpJUqg+LEqxguqtzdlbrfz5Hi5kpslq3aFWb9q9LFg msWtDhBKjBCmDc6tYaYfR2CGJawGyTefQP4SFbGiYJgWoxOZb7QpGOQbKS++xWyNQ3/c DGLA== X-Gm-Message-State: ANoB5plnZ96ylagLIuoJTtU+A5sr848FgoqWDhRNXAVp7MxClfMtnCY8 fGB+tjzZ4c+lxvsqmUiv2iadwg== X-Google-Smtp-Source: AA0mqf5E5D//TIG/aMQomKzNdz/FjOxFMupViZN74H7lfe+o54dMc5jppUGkpbgH+JGrhPhCHz28bg== X-Received: by 2002:a63:2310:0:b0:457:a1a5:3ce with SMTP id j16-20020a632310000000b00457a1a503cemr47333634pgj.416.1670019872324; Fri, 02 Dec 2022 14:24:32 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z2-20020a17090ab10200b0021885b05660sm5201731pjq.24.2022.12.02.14.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 14:24:31 -0800 (PST) From: coverity-bot X-Google-Original-From: coverity-bot Date: Fri, 2 Dec 2022 14:24:30 -0800 To: Bo Jiao Cc: Lorenzo Bianconi , linux-wireless@vger.kernel.org, Jakub Kicinski , Kalle Valo , Matthias Brugger , Shayne Chen , Eric Dumazet , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, Felix Fietkau , "David S. Miller" , linux-kernel@vger.kernel.org, Paolo Abeni , Sean Wang , MeiChia Chiu , Ryder Lee , Sujuan Chen , Bo Jiao , "Gustavo A. R. Silva" , linux-next@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Coverity: mt7915_mcu_get_chan_mib_info(): Memory - illegal accesses Message-ID: <202212021424.34C0F695E4@keescook> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221202_142435_306800_345BEB0B X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello! This is an experimental semi-automated report about issues detected by Coverity from a scan of next-20221202 as part of the linux-next scan project: https://scan.coverity.com/projects/linux-next-weekly-scan You're getting this email because you were associated with the identified lines of code (noted below) that were touched by commits: Thu Feb 3 13:57:56 2022 +0100 417a4534d223 ("mt76: mt7915: update mt7915_chan_mib_offs for mt7916") Coverity reported the following: *** CID 1527801: Memory - illegal accesses (OVERRUN) drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3005 in mt7915_mcu_get_chan_mib_info() 2999 start = 5; 3000 ofs = 0; 3001 } 3002 3003 for (i = 0; i < 5; i++) { 3004 req[i].band = cpu_to_le32(phy->mt76->band_idx); vvv CID 1527801: Memory - illegal accesses (OVERRUN) vvv Overrunning array "offs" of 9 4-byte elements at element index 9 (byte offset 39) using index "i + start" (which evaluates to 9). 3005 req[i].offs = cpu_to_le32(offs[i + start]); 3006 3007 if (!is_mt7915(&dev->mt76) && i == 3) 3008 break; 3009 } 3010 If this is a false positive, please let us know so we can mark it as such, or teach the Coverity rules to be smarter. If not, please make sure fixes get into linux-next. :) For patches fixing this, please include these lines (but double-check the "Fixes" first): Reported-by: coverity-bot Addresses-Coverity-ID: 1527801 ("Memory - illegal accesses") Fixes: 417a4534d223 ("mt76: mt7915: update mt7915_chan_mib_offs for mt7916") Thanks for your attention! -- Coverity-bot _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel