From: Kohei Enju <enjuk@amazon.com>
To: <syzbot+e04e2c007ba2c80476cb@syzkaller.appspotmail.com>
Cc: <linux-kernel@vger.kernel.org>, <syzkaller-bugs@googlegroups.com>,
<kohei.enju@gmail.com>
Subject: Re: [syzbot] [hams?] KASAN: slab-use-after-free Read in rose_get_neigh
Date: Sat, 28 Jun 2025 21:04:03 +0900 [thread overview]
Message-ID: <20250628120413.3247-1-enjuk@amazon.com> (raw)
In-Reply-To: <6807019a.050a0220.380c13.0001.GAE@google.com>
#syz test
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 2dd6bd3a3011..b72bf8a08d48 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -497,22 +497,15 @@ void rose_rt_device_down(struct net_device *dev)
t = rose_node;
rose_node = rose_node->next;
- for (i = 0; i < t->count; i++) {
+ for (i = t->count - 1; i >= 0; i--) {
if (t->neighbour[i] != s)
continue;
t->count--;
- switch (i) {
- case 0:
- t->neighbour[0] = t->neighbour[1];
- fallthrough;
- case 1:
- t->neighbour[1] = t->neighbour[2];
- break;
- case 2:
- break;
- }
+ memmove(&t->neighbour[i], &t->neighbour[i + 1],
+ sizeof(t->neighbour[0]) *
+ (t->count - i));
}
if (t->count <= 0)
next prev parent reply other threads:[~2025-06-28 12:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 6:56 syzbot
2025-04-22 2:40 ` syzbot
2025-06-24 12:43 ` Kohei Enju
2025-06-24 13:20 ` syzbot
2025-06-25 5:44 ` Kohei Enju
2025-06-25 6:21 ` syzbot
2025-06-25 7:12 ` Hillf Danton
2025-06-25 7:31 ` syzbot
2025-06-25 8:27 ` Hillf Danton
2025-06-25 9:26 ` syzbot
2025-06-28 12:04 ` Kohei Enju [this message]
2025-06-28 13:22 ` 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=20250628120413.3247-1-enjuk@amazon.com \
--to=enjuk@amazon.com \
--cc=kohei.enju@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+e04e2c007ba2c80476cb@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®