mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+d5dc2801166df6d34774@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fs?] KASAN: slab-use-after-free Read in lockref_get
Date: Wed, 17 Jul 2024 21:19:02 +0800	[thread overview]
Message-ID: <tencent_B8E916EE96CCEC783A6F182C756C2094800A@qq.com> (raw)
In-Reply-To: <0000000000005c6453061d53bc0f@google.com>

before remove debugfs_dir set reference pointer to NULL

#syz test: linux-next 58f9416d413a

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index aa22f09e6d14..6d807c3abcb6 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1473,7 +1473,8 @@ static void __sta_info_destroy_part2(struct sta_info *sta, bool recalc)
 	cfg80211_del_sta_sinfo(sdata->dev, sta->sta.addr, sinfo, GFP_KERNEL);
 	kfree(sinfo);
 
-	ieee80211_sta_debugfs_remove(sta);
+	if (sdata->flags & IEEE80211_SDATA_IN_DRIVER)
+		ieee80211_sta_debugfs_remove(sta);
 
 	ieee80211_destroy_frag_cache(&sta->frags);
 


  parent reply	other threads:[~2024-07-17 13:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16  2:02 syzbot
2024-07-16 11:20 ` Hillf Danton
2024-07-16 14:04   ` syzbot
2024-07-16 12:48 ` syzbot
2024-07-17  8:31   ` Berg, Benjamin
2024-07-17  3:24 ` Edward Adam Davis
2024-07-17  4:19   ` syzbot
2024-07-17 10:58 ` Hillf Danton
2024-07-17 11:18   ` syzbot
2024-07-17 11:39 ` Edward Adam Davis
2024-07-17 12:53   ` syzbot
2024-07-17 13:19 ` Edward Adam Davis [this message]
2024-07-17 13:38   ` syzbot
2024-07-17 14:07 ` Edward Adam Davis
2024-07-17 21:38   ` syzbot
2024-07-18 10:39 ` Hillf Danton
2024-07-18 14:18   ` syzbot

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_B8E916EE96CCEC783A6F182C756C2094800A@qq.com \
    --to=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+d5dc2801166df6d34774@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.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®