From: Jiawei Ye <jiawei.ye@foxmail.com>
To: miquel.raynal@bootlin.com
Cc: alex.aring@gmail.com, davem@davemloft.net,
david.girault@qorvo.com, edumazet@google.com,
jiawei.ye@foxmail.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-wpan@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
przemyslaw.kitszel@intel.com, stefan@datenfreihafen.org
Subject: Re: [PATCH v2] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker
Date: Sat, 21 Sep 2024 05:22:48 +0000 [thread overview]
Message-ID: <tencent_51492FE7A9204AE5B3DC49FA4F144D310F08@qq.com> (raw)
In-Reply-To: <20240920132131.466e5636@xps-13>
Hi Miquèl,
I'm sorry for the accidental email sent while testing my email setup. Please disregard the previous message.
On 9/20/24 19:21, Miquel Raynal wrote:
> Hi Jiawei,
>
> jiawei.ye@foxmail.com wrote on Fri, 20 Sep 2024 04:03:32 +0000:
>
> > In the `mac802154_scan_worker` function, the `scan_req->type` field was
> > accessed after the RCU read-side critical section was unlocked. According
> > to RCU usage rules, this is illegal and can lead to unpredictable
> > behavior, such as accessing memory that has been updated or causing
> > use-after-free issues.
> >
> > This possible bug was identified using a static analysis tool developed
> > by myself, specifically designed to detect RCU-related issues.
> >
> > To address this, the `scan_req->type` value is now stored in a local
> > variable `scan_req_type` while still within the RCU read-side critical
> > section. The `scan_req_type` is then used after the RCU lock is released,
> > ensuring that the type value is safely accessed without violating RCU
> > rules.
> >
> > Fixes: e2c3e6f53a7a ("mac802154: Handle active scanning")
> > Signed-off-by: Jiawei Ye <jiawei.ye@foxmail.com>
>
> I think net maintainers now expect the Cc: stable tag to be put here
> when there is a reason to backport, which I believe is the case here.
> So please add this line here.
>
Does this mean I should use Cc: stable@vger.kernel.org? I am not familiar with this procedure.
> >
>
> Please delete this blank line as well.
>
> And with that you can add my:
>
> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
>
> > ---
>
> Thanks,
> Miquèl
Do I need to resend patch v2 with the "Resend" label?
Thank you for your assistance.
Best regards,
Jiawei Ye
next prev parent reply other threads:[~2024-09-21 5:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 4:03 Jiawei Ye
2024-09-20 11:21 ` Miquel Raynal
2024-09-21 5:22 ` Jiawei Ye [this message]
2024-09-23 12:40 ` Stefan Schmidt
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=tencent_51492FE7A9204AE5B3DC49FA4F144D310F08@qq.com \
--to=jiawei.ye@foxmail.com \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=david.girault@qorvo.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=stefan@datenfreihafen.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®