mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Brian Norris <briannorris@chromium.org>,
	Kalle Valo <kvalo@kernel.org>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Lin <yu-hao.lin@nxp.com>
Subject: Re: [PATCH] [RFC] mwifiex: Fix NULL pointer deref
Date: Tue, 2 Jul 2024 22:36:11 +0200	[thread overview]
Message-ID: <ZoRku6FmNA8d8lkR@gaggiata.pivistrello.it> (raw)
In-Reply-To: <ZoQBYMRLVAwM0O0j@pengutronix.de>

On Tue, Jul 02, 2024 at 03:32:16PM +0200, Sascha Hauer wrote:
> On Mon, Jun 24, 2024 at 06:20:14PM +0200, Francesco Dolcini wrote:
> > On Fri, Jun 21, 2024 at 11:07:27AM +0200, Sascha Hauer wrote:

...

> > > 
> > > From 3357963821294ff7de26259a154a1cb5bab760cb Mon Sep 17 00:00:00 2001
> > > From: Sascha Hauer <s.hauer@pengutronix.de>
> > > Date: Tue, 18 Jun 2024 12:20:20 +0200
> > > Subject: [PATCH] mwifiex: Do not return unused priv in
> > >  mwifiex_get_priv_by_id()
> > > 
> > > mwifiex_get_priv_by_id() returns the priv pointer corresponding to the
> > > bss_num and bss_type, but without checking if the priv is actually
> > > currently in use.
> > > Unused priv pointers do not have a wiphy attached to them which can lead
> > > to NULL pointer dereferences further down the callstack.
> > > Fix this by returning only used priv pointers which have priv->bss_mode
> > > set to something else than NL80211_IFTYPE_UNSPECIFIED.
> > > 
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>

I guess you should send it as a proper patch?


...

> > I am just wondering if this might have anything to do with
> > commit a17b9f590f6e ("wifi: mwifiex: Fix interface type change"), maybe you have already looked into it?
> 
> It looks somehow related. I just gave it a try and it at least doesn't
> fix my issue.

thanks for trying it out.


Francesco


  reply	other threads:[~2024-07-02 20:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19  7:08 Sascha Hauer
2024-06-19  8:05 ` Kalle Valo
2024-06-20 19:48   ` Brian Norris
2024-06-21  9:07     ` Sascha Hauer
2024-06-21 22:50       ` Brian Norris
2024-06-24 11:07         ` Kalle Valo
2024-06-24 16:20       ` Francesco Dolcini
2024-07-02 13:32         ` Sascha Hauer
2024-07-02 20:36           ` Francesco Dolcini [this message]
2024-07-03  7:24             ` Sascha Hauer

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=ZoRku6FmNA8d8lkR@gaggiata.pivistrello.it \
    --to=francesco@dolcini.it \
    --cc=briannorris@chromium.org \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=yu-hao.lin@nxp.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 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®