[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212021424.34C0F695E4@keescook>
Date: Fri, 2 Dec 2022 14:24:30 -0800
From: coverity-bot <keescook@...omium.org>
To: Bo Jiao <Bo.Jiao@...iatek.com>
Cc: Lorenzo Bianconi <lorenzo@...nel.org>,
linux-wireless@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
Kalle Valo <kvalo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Shayne Chen <shayne.chen@...iatek.com>,
Eric Dumazet <edumazet@...gle.com>,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
linux-mediatek@...ts.infradead.org, Felix Fietkau <nbd@....name>,
"David S. Miller" <davem@...emloft.net>,
linux-kernel@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Sean Wang <sean.wang@...iatek.com>,
MeiChia Chiu <MeiChia.Chiu@...iatek.com>,
Ryder Lee <ryder.lee@...iatek.com>,
Sujuan Chen <sujuan.chen@...iatek.com>,
Bo Jiao <bo.jiao@...iatek.com>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: mt7915_mcu_get_chan_mib_info(): Memory - illegal accesses
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 <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1527801 ("Memory - illegal accesses")
Fixes: 417a4534d223 ("mt76: mt7915: update mt7915_chan_mib_offs for mt7916")
Thanks for your attention!
--
Coverity-bot
Powered by blists - more mailing lists