From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+5a630f8ca0120ab43f55@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in __unix_gc
Date: Sat, 10 Feb 2024 18:07:05 +0800 [thread overview]
Message-ID: <20240210100707.817-1-hdanton@sina.com> (raw)
In-Reply-To: <000000000000ee09930610f42470@google.com>
On Fri, 09 Feb 2024 06:57:17 -0800
> HEAD commit: e7689879d14e ethtool: do not use rtnl in ethnl_default_dum..
> git tree: net-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=165f9cec180000
Test KI's fix [1].
[1] https://lore.kernel.org/netdev/20240209220453.96053-1-kuniyu@amazon.com/
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
--- x/net/unix/garbage.c
+++ y/net/unix/garbage.c
@@ -340,10 +340,11 @@ static void __unix_gc(struct work_struct
__skb_queue_purge(&hitlist);
#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
- list_for_each_entry_safe(u, next, &gc_candidates, link) {
- struct sk_buff *skb = u->oob_skb;
+ while (!list_empty(&gc_candidates)) {
+ u = list_entry(gc_candidates.next, struct unix_sock, link);
+ if (u->oob_skb) {
+ struct sk_buff *skb = u->oob_skb;
- if (skb) {
u->oob_skb = NULL;
kfree_skb(skb);
}
--
next prev parent reply other threads:[~2024-02-10 10:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 14:57 [syzbot] [kernel?] KASAN: slab-use-after-free Read in __unix_gc syzbot
2024-02-10 2:24 ` Hillf Danton
2024-02-10 4:08 ` syzbot
2024-02-10 6:35 ` Hillf Danton
2024-02-10 7:03 ` syzbot
2024-02-10 8:10 ` Kuniyuki Iwashima
2024-02-10 10:07 ` Hillf Danton [this message]
2024-02-10 11:39 ` 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=20240210100707.817-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5a630f8ca0120ab43f55@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