* [PATCH net] net: rose: fix a typo in rose_clear_routes()
@ 2025-08-27 17:21 Eric Dumazet
2025-08-27 17:30 ` Kuniyuki Iwashima
2025-08-28 1:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2025-08-27 17:21 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet,
syzbot+2eb8d1719f7cfcfa6840, Takamitsu Iwai, Kuniyuki Iwashima
syzbot crashed in rose_clear_routes(), after a recent patch typo.
KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
CPU: 0 UID: 0 PID: 10591 Comm: syz.3.1856 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:rose_clear_routes net/rose/rose_route.c:565 [inline]
RIP: 0010:rose_rt_ioctl+0x162/0x1250 net/rose/rose_route.c:760
<TASK>
rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1381
sock_do_ioctl+0xd9/0x300 net/socket.c:1238
sock_ioctl+0x576/0x790 net/socket.c:1359
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:598 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Fixes: da9c9c877597 ("net: rose: include node references in rose_neigh refcount")
Reported-by: syzbot+2eb8d1719f7cfcfa6840@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/68af3e29.a70a0220.3cafd4.002e.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Takamitsu Iwai <takamitz@amazon.co.jp>
Cc: Kuniyuki Iwashima <kuniyu@google.com>
---
net/rose/rose_route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 1adee1fbc2ed1d04345c6340b717eae1f6a0305c..a1e9b05ef6f5f6f09ee17927c4a4aba50a156adb 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -562,7 +562,7 @@ static int rose_clear_routes(void)
rose_node = rose_node->next;
if (!t->loopback) {
- for (i = 0; i < rose_node->count; i++)
+ for (i = 0; i < t->count; i++)
rose_neigh_put(t->neighbour[i]);
rose_remove_node(t);
}
--
2.51.0.268.g9569e192d0-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: rose: fix a typo in rose_clear_routes()
2025-08-27 17:21 [PATCH net] net: rose: fix a typo in rose_clear_routes() Eric Dumazet
@ 2025-08-27 17:30 ` Kuniyuki Iwashima
2025-08-28 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2025-08-27 17:30 UTC (permalink / raw)
To: Eric Dumazet
Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, Simon Horman,
netdev, eric.dumazet, syzbot+2eb8d1719f7cfcfa6840, Takamitsu Iwai
On Wed, Aug 27, 2025 at 10:21 AM Eric Dumazet <edumazet@google.com> wrote:
>
> syzbot crashed in rose_clear_routes(), after a recent patch typo.
>
> KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
> CPU: 0 UID: 0 PID: 10591 Comm: syz.3.1856 Not tainted syzkaller #0 PREEMPT(full)
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
> RIP: 0010:rose_clear_routes net/rose/rose_route.c:565 [inline]
> RIP: 0010:rose_rt_ioctl+0x162/0x1250 net/rose/rose_route.c:760
> <TASK>
> rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1381
> sock_do_ioctl+0xd9/0x300 net/socket.c:1238
> sock_ioctl+0x576/0x790 net/socket.c:1359
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:598 [inline]
> __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
> do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
> do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> Fixes: da9c9c877597 ("net: rose: include node references in rose_neigh refcount")
> Reported-by: syzbot+2eb8d1719f7cfcfa6840@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/netdev/68af3e29.a70a0220.3cafd4.002e.GAE@google.com/T/#u
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Thanks for the fix !
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: rose: fix a typo in rose_clear_routes()
2025-08-27 17:21 [PATCH net] net: rose: fix a typo in rose_clear_routes() Eric Dumazet
2025-08-27 17:30 ` Kuniyuki Iwashima
@ 2025-08-28 1:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-28 1:10 UTC (permalink / raw)
To: Eric Dumazet
Cc: davem, kuba, pabeni, horms, netdev, eric.dumazet,
syzbot+2eb8d1719f7cfcfa6840, takamitz, kuniyu
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 27 Aug 2025 17:21:49 +0000 you wrote:
> syzbot crashed in rose_clear_routes(), after a recent patch typo.
>
> KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
> CPU: 0 UID: 0 PID: 10591 Comm: syz.3.1856 Not tainted syzkaller #0 PREEMPT(full)
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
> RIP: 0010:rose_clear_routes net/rose/rose_route.c:565 [inline]
> RIP: 0010:rose_rt_ioctl+0x162/0x1250 net/rose/rose_route.c:760
> <TASK>
> rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1381
> sock_do_ioctl+0xd9/0x300 net/socket.c:1238
> sock_ioctl+0x576/0x790 net/socket.c:1359
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:598 [inline]
> __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
> do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
> do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> [...]
Here is the summary with links:
- [net] net: rose: fix a typo in rose_clear_routes()
https://git.kernel.org/netdev/net/c/1cc8a5b534e5
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-28 1:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 17:21 [PATCH net] net: rose: fix a typo in rose_clear_routes() Eric Dumazet
2025-08-27 17:30 ` Kuniyuki Iwashima
2025-08-28 1:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).