From: Kalle Valo <kvalo@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: oe-kbuild@lists.linux.dev, Sriram R <quic_srirrama@quicinc.com>,
lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Jeff Johnson <jjohnson@kernel.org>,
ath12k@lists.infradead.org,
Rameshkumar Sundaram <quic_ramess@quicinc.com>
Subject: Re: [ath:ath12k-mlo-qcn9274 65/81] drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
Date: Mon, 04 Nov 2024 22:21:06 +0200 [thread overview]
Message-ID: <871pzq7nt9.fsf@kernel.org> (raw)
In-Reply-To: <8f50a85a-b09a-421b-ab02-55b4f3b6aa18@stanley.mountain> (Dan Carpenter's message of "Wed, 9 Oct 2024 14:16:36 +0300")
Dan Carpenter <dan.carpenter@linaro.org> writes:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git ath12k-mlo-qcn9274
> head: 7435d14d41d5d479a5e6a8a2cd4efdac9d928823
> commit: d50d85ea8574956b273faf4cb2493a98c6548b04 [65/81] wifi: ath12k:
> Use mac80211 sta's link_sta instead of deflink
> config: csky-randconfig-r072-20241008
> (https://download.01.org/0day-ci/archive/20241009/202410091157.eMoYClhc-lkp@intel.com/config)
> compiler: csky-linux-gcc (GCC) 14.1.0
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> | Closes: https://lore.kernel.org/r/202410091157.eMoYClhc-lkp@intel.com/
>
> New smatch warnings:
> drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
> drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
> drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
> drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
> drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15
>
> vim +534 drivers/net/wireless/ath/ath12k/mac.c
>
> d50d85ea857495 Sriram R 2024-08-16 522 static struct
> d50d85ea857495 Sriram R 2024-08-16 523 ieee80211_link_sta *ath12k_get_link_sta(struct ath12k_link_sta *arsta)
> d50d85ea857495 Sriram R 2024-08-16 524 {
> d50d85ea857495 Sriram R 2024-08-16 525 struct ath12k_sta *ahsta = arsta->ahsta;
> d50d85ea857495 Sriram R 2024-08-16 526 struct ieee80211_sta *sta = ath12k_ahsta_to_sta(ahsta);
> d50d85ea857495 Sriram R 2024-08-16 527 struct ieee80211_link_sta *link_sta;
> d50d85ea857495 Sriram R 2024-08-16 528 /* ieee80211_sta->link[]'s are
> rcu objects which requires rcu_read_lock()
> d50d85ea857495 Sriram R 2024-08-16 529 * to be held for safe access.
> d50d85ea857495 Sriram R 2024-08-16 530 */
> d50d85ea857495 Sriram R 2024-08-16 531 if (arsta->link_id > IEEE80211_MLD_MAX_NUM_LINKS)
>
> Was >= intended?
Yes, fixed version here:
https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=ath12k-mlo&id=722120a853986de95db37e92ecbf731deffe86fa
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-11-04 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 11:16 [ath:ath12k-mlo-qcn9274 65/81] drivers/net/wireless/ath/ath12k/mac.c:534 ath12k_get_link_sta() error: buffer overflow 'sta->link' 15 <= 15 Dan Carpenter
2024-11-04 20:21 ` Kalle Valo [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-09 3:25 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871pzq7nt9.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@lists.infradead.org \
--cc=dan.carpenter@linaro.org \
--cc=jjohnson@kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=quic_ramess@quicinc.com \
--cc=quic_srirrama@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.