mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Francesco Dolcini <francesco@dolcini.it>
Cc: 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: Wed, 3 Jul 2024 09:24:43 +0200	[thread overview]
Message-ID: <ZoT8uxpUvW-V7K-Y@pengutronix.de> (raw)
In-Reply-To: <ZoRku6FmNA8d8lkR@gaggiata.pivistrello.it>

On Tue, Jul 02, 2024 at 10:36:11PM +0200, Francesco Dolcini wrote:
> 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?

Yes, I just did this.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2024-07-03  7:24 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
2024-07-03  7:24             ` Sascha Hauer [this message]

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=ZoT8uxpUvW-V7K-Y@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=briannorris@chromium.org \
    --cc=francesco@dolcini.it \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --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®