syzbot


WARNING in inet_csk_get_port

Status: fixed on 2023/11/20 11:42
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+b6b1b712ff7f21d25a76@syzkaller.appspotmail.com
Fix commit: 8b9c79c0ecd2 tcp: Fix listen() warning with v4-mapped-v6 address.
First crash: 429d, last: 400d
Fix bisection: fixed by (bisect log) :
commit 8b9c79c0ecd2805f063840d49ca0809fb47cbac8
Author: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Tue Oct 10 01:38:14 2023 +0000

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

  
Bug presence (2)
Date Name Commit Repro Result
2023/09/19 upstream (ToT) 2cf0f7156238 C [report] WARNING in inet_csk_get_port
2023/11/04 upstream (ToT) 2c40c1c6adab C Didn't crash
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in inet_csk_get_port (3) net C done done 8 183d 199d 0/28 auto-obsoleted due to no activity on 2024/08/30 00:27
upstream WARNING in inet_csk_get_port (2) net C done 88 397d 427d 25/28 fixed on 2023/12/21 01:43
upstream WARNING in inet_csk_get_port net C done 1166 685d 913d 22/28 fixed on 2023/02/24 13:50

Sample crash report:
------------[ 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 ]---

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/19 22:44 linux-6.1.y a356197db198 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/10/18 07:40 linux-6.1.y adc4d740ad9e 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in inet_csk_get_port
2023/10/18 02:59 linux-6.1.y adc4d740ad9e 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan WARNING in inet_csk_get_port
2023/10/18 05:54 linux-6.1.y adc4d740ad9e 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/10/18 03:05 linux-6.1.y adc4d740ad9e 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/23 15:13 linux-6.1.y d23900f974e0 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/23 11:35 linux-6.1.y d23900f974e0 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/21 07:28 linux-6.1.y a356197db198 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/21 04:48 linux-6.1.y a356197db198 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/19 18:02 linux-6.1.y a356197db198 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
2023/09/19 12:54 linux-6.1.y a356197db198 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 WARNING in inet_csk_get_port
* Struck through repros no longer work on HEAD.