[v6.1] WARNING in inet_csk_get_port

0 views
Skip to first unread message

syzbot

unread,
Sep 19, 2023, 8:54:56 AM9/19/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a356197db198 Linux 6.1.54
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1482f0f2680000
kernel config: https://syzkaller.appspot.com/x/.config?x=cffba67b853e9497
dashboard link: https://syzkaller.appspot.com/bug?extid=b6b1b712ff7f21d25a76
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/23f6486c30c2/disk-a356197d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f9e8fd4e7281/vmlinux-a356197d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/03ce090ec531/Image-a356197d.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b6b1b7...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 1 PID: 10901 at net/ipv4/inet_connection_sock.c:587 inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
Modules linked in:
CPU: 1 PID: 10901 Comm: syz-executor.1 Not tainted 6.1.54-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
lr : inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
sp : ffff80002bc179a0
x29: ffff80002bc17b30 x28: ffff0000d177cd00 x27: dfff800000000000
x26: ffff0000d4d85a00 x25: 0000000000004e22 x24: ffff0000d49ba4c0
x23: 0000000000000000 x22: ffff800019d55ca0 x21: 0000000000000000
x20: ffff0000d49bab70 x19: ffff0000d49bab78 x18: 0000000000000000
x17: 0000000000000000 x16: ffff8000084fbac4 x15: 0000000000000000
x14: 0000000000000002 x13: 00000000ffff0000 x12: 0000000000040000
x11: 0000000000000863 x10: ffff80002609f000 x9 : ffff800010b96ae4
x8 : 0000000000000864 x7 : 0000000000000000 x6 : 0000000000000001
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000ffffffff
x2 : 00000000ffffffff x1 : 00000000ffffffff x0 : 0000000000000001
Call trace:
inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
inet_csk_listen_start+0x104/0x2c8 net/ipv4/inet_connection_sock.c:1256
inet_listen+0x254/0x6d0 net/ipv4/af_inet.c:228
__sys_listen+0x1ac/0x21c net/socket.c:1810
__do_sys_listen net/socket.c:1819 [inline]
__se_sys_listen net/socket.c:1817 [inline]
__arm64_sys_listen+0x5c/0x74 net/socket.c:1817
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
irq event stamp: 405
hardirqs last enabled at (404): [<ffff8000081c7800>] __local_bh_enable_ip+0x258/0x4d0 kernel/softirq.c:401
hardirqs last disabled at (405): [<ffff8000121207cc>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (396): [<ffff8000103a161c>] spin_unlock_bh include/linux/spinlock.h:395 [inline]
softirqs last enabled at (396): [<ffff8000103a161c>] lock_sock_nested+0xe8/0x138 net/core/sock.c:3482
softirqs last disabled at (398): [<ffff800010b95988>] spin_lock_bh include/linux/spinlock.h:355 [inline]
softirqs last disabled at (398): [<ffff800010b95988>] inet_csk_get_port+0x218/0x156c net/ipv4/inet_connection_sock.c:535
---[ end trace 0000000000000000 ]---


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 19, 2023, 6:44:37 PM9/19/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: a356197db198 Linux 6.1.54
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10d6abf8680000
kernel config: https://syzkaller.appspot.com/x/.config?x=cffba67b853e9497
dashboard link: https://syzkaller.appspot.com/bug?extid=b6b1b712ff7f21d25a76
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13dbbf8c680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=145b9cf4680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/23f6486c30c2/disk-a356197d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f9e8fd4e7281/vmlinux-a356197d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/03ce090ec531/Image-a356197d.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+b6b1b7...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 1 PID: 4227 at net/ipv4/inet_connection_sock.c:587 inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
Modules linked in:
CPU: 1 PID: 4227 Comm: syz-executor416 Not tainted 6.1.54-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
lr : inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
sp : ffff80001e3779a0
x29: ffff80001e377b30 x28: ffff0000d44ba080 x27: dfff800000000000
x26: ffff0000d44bb100 x25: 0000000000004e22 x24: ffff0000d7b20000
x23: 0000000000000000 x22: ffff800019d55ca0 x21: 0000000000000000
x20: ffff0000d7b206b0 x19: ffff0000d7b206b8 x18: 0000000000000278
x17: 0000000000000000 x16: ffff8000084fbac4 x15: 0000000000000000
x14: 0000000000000000 x13: 00000000ffff0000 x12: ffff0000d5830000
x11: ff80800010b96ae4 x10: 0000000000000000 x9 : ffff800010b96ae4
x8 : ffff0000d5830000 x7 : 0000000000000000 x6 : 0000000000000001
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000ffffffff
x2 : 00000000ffffffff x1 : 00000000ffffffff x0 : 0000000000000001
Call trace:
inet_csk_get_port+0x1374/0x156c net/ipv4/inet_connection_sock.c:587
inet_csk_listen_start+0x104/0x2c8 net/ipv4/inet_connection_sock.c:1256
inet_listen+0x254/0x6d0 net/ipv4/af_inet.c:228
__sys_listen+0x1ac/0x21c net/socket.c:1810
__do_sys_listen net/socket.c:1819 [inline]
__se_sys_listen net/socket.c:1817 [inline]
__arm64_sys_listen+0x5c/0x74 net/socket.c:1817
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
irq event stamp: 15591
hardirqs last enabled at (15590): [<ffff8000081c7800>] __local_bh_enable_ip+0x258/0x4d0 kernel/softirq.c:401
hardirqs last disabled at (15591): [<ffff8000121207cc>] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405
softirqs last enabled at (15582): [<ffff8000103a161c>] spin_unlock_bh include/linux/spinlock.h:395 [inline]
softirqs last enabled at (15582): [<ffff8000103a161c>] lock_sock_nested+0xe8/0x138 net/core/sock.c:3482
softirqs last disabled at (15584): [<ffff800010b95988>] spin_lock_bh include/linux/spinlock.h:355 [inline]
softirqs last disabled at (15584): [<ffff800010b95988>] inet_csk_get_port+0x218/0x156c net/ipv4/inet_connection_sock.c:535
---[ end trace 0000000000000000 ]---


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Nov 19, 2023, 11:56:05 PM11/19/23
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 8b9c79c0ecd2805f063840d49ca0809fb47cbac8
Author: Kuniyuki Iwashima <kun...@amazon.com>
Date: Tue Oct 10 01:38:14 2023 +0000

tcp: Fix listen() warning with v4-mapped-v6 address.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=149169b8e80000
start commit: a356197db198 Linux 6.1.54
git tree: linux-6.1.y
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: tcp: Fix listen() warning with v4-mapped-v6 address.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages