mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Wentao Liang <vulab@iscas.ac.cn>, luciano.coelho@intel.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	 stable@vger.kernel.org
Subject: Re: [PATCH v2] mac80211: Add null pointer check for ieee80211_link_get_chanctx()
Date: Mon, 26 May 2025 11:35:13 +0200	[thread overview]
Message-ID: <2d5b450b8b7b9bfa5771e371a9addc3dce19891e.camel@sipsolutions.net> (raw)
In-Reply-To: <20250526091903.587-1-vulab@iscas.ac.cn>

On Mon, 2025-05-26 at 17:19 +0800, Wentao Liang wrote:
> The function ieee80211_chsw_switch_vifs() calls the function
> ieee80211_link_get_chanctx(), but does not check its return value.
> The return value is a null pointer if the ieee80211_link_get_chanctx()
> fails. This will lead to a null pointer dereference in the following
> code "&old_ctx->conf". A proper implementation can be found in
> ieee80211_link_use_reserved_assign().
> 
> Add a null pointer check and goto error handling path if the
> function fails.

How do you propose it can fail?

johannes

  reply	other threads:[~2025-05-26  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26  9:19 Wentao Liang
2025-05-26  9:35 ` Johannes Berg [this message]
2025-05-26  9:44 ` Greg KH
2025-05-26  9:50   ` Johannes Berg
2025-05-26  9:56     ` Johannes Berg
2025-05-26 10:25       ` Greg KH

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=2d5b450b8b7b9bfa5771e371a9addc3dce19891e.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=vulab@iscas.ac.cn \
    /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®