From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+5a66db916cdde0dbcc1c@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] BUG: corrupted list in flow_block_cb_setup_simple
Date: Fri, 12 Sep 2025 17:30:40 +0800 [thread overview]
Message-ID: <20250912093042.6843-1-hdanton@sina.com> (raw)
In-Reply-To: <68c3c675.050a0220.2ff435.0353.GAE@google.com>
> Date: Fri, 12 Sep 2025 00:06:29 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: e59a039119c3 Merge tag 's390-6.17-4' of git://git.kernel.o..
> git tree: bpf
> console output: https://syzkaller.appspot.com/x/log.txt?x=1523e934580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=4d8792ecb6308d0f
> dashboard link: https://syzkaller.appspot.com/bug?extid=5a66db916cdde0dbcc1c
> compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16d4bd62580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10d69642580000
#syz test upstream master
--- x/net/core/flow_offload.c
+++ y/net/core/flow_offload.c
@@ -334,6 +334,7 @@ bool flow_block_cb_is_busy(flow_setup_cb
}
EXPORT_SYMBOL(flow_block_cb_is_busy);
+static DEFINE_MUTEX(setup_lock);
int flow_block_cb_setup_simple(struct flow_block_offload *f,
struct list_head *driver_block_list,
flow_setup_cb_t *cb,
@@ -348,27 +349,37 @@ int flow_block_cb_setup_simple(struct fl
f->driver_block_list = driver_block_list;
+ mutex_lock(&setup_lock);
switch (f->command) {
case FLOW_BLOCK_BIND:
- if (flow_block_cb_is_busy(cb, cb_ident, driver_block_list))
+ if (flow_block_cb_is_busy(cb, cb_ident, driver_block_list)) {
+ mutex_unlock(&setup_lock);
return -EBUSY;
+ }
block_cb = flow_block_cb_alloc(cb, cb_ident, cb_priv, NULL);
- if (IS_ERR(block_cb))
+ if (IS_ERR(block_cb)) {
+ mutex_unlock(&setup_lock);
return PTR_ERR(block_cb);
+ }
flow_block_cb_add(block_cb, f);
list_add_tail(&block_cb->driver_list, driver_block_list);
+ mutex_unlock(&setup_lock);
return 0;
case FLOW_BLOCK_UNBIND:
block_cb = flow_block_cb_lookup(f->block, cb, cb_ident);
- if (!block_cb)
+ if (!block_cb) {
+ mutex_unlock(&setup_lock);
return -ENOENT;
+ }
flow_block_cb_remove(block_cb, f);
list_del(&block_cb->driver_list);
+ mutex_unlock(&setup_lock);
return 0;
default:
+ mutex_unlock(&setup_lock);
return -EOPNOTSUPP;
}
}
--
next prev parent reply other threads:[~2025-09-12 9:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 7:06 [syzbot] [net?] BUG: corrupted list in flow_block_cb_setup_simple syzbot
2025-09-12 9:30 ` Hillf Danton [this message]
2025-09-12 12:45 ` syzbot
2026-02-06 18:28 ` Forwarded: Test for 5a66db916cdde0dbcc1c syzbot
[not found] <87ldh5k9pu.fsf@redhat.com>
2026-02-06 19:59 ` [syzbot] [net?] BUG: corrupted list in flow_block_cb_setup_simple 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=20250912093042.6843-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5a66db916cdde0dbcc1c@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