syzbot


panic: send on closed channel

Status: fixed on 2024/07/08 19:13
Reported-by: syzbot+077cb394a25e5bfa4ed9@syzkaller.appspotmail.com
Fix commit: 9d1849029e8e tcpip/link/veth: don't send any packets if another end has been closed
First crash: 149d, last: 149d

Sample crash report:
panic: send on closed channel

goroutine 82175 gp=0x4004fc96c0 m=46 mp=0x400158e008 [running]:
panic({0xda4e60?, 0x11f6ee8?})
	GOROOT/src/runtime/panic.go:779 +0x140 fp=0x40005d2850 sp=0x40005d27a0 pc=0x4bc60
runtime.chansend(0x400bc4c480, 0x40005d2980, 0x1, 0x400385f900?)
	GOROOT/src/runtime/chan.go:283 +0x538 fp=0x40005d28c0 sp=0x40005d2850 pc=0x18618
runtime.chansend1(0x0?, 0x0?)
	GOROOT/src/runtime/chan.go:145 +0x18 fp=0x40005d28f0 sp=0x40005d28c0 pc=0x180c8
gvisor.dev/gvisor/pkg/tcpip/link/veth.(*Endpoint).WritePackets(0x400bc4c540, {{0x4000730118, 0x1, 0x1}})
	pkg/tcpip/link/veth/veth.go:207 +0xdc fp=0x40005d29a0 sp=0x40005d28f0 pc=0x7aa8bc
gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePackets(...)
	pkg/tcpip/link/nested/nested.go:131
gvisor.dev/gvisor/pkg/tcpip/link/ethernet.(*Endpoint).WritePackets(0x401403f860?, {{0x4000730118?, 0x4004c24b40?, 0x1?}})
	<autogenerated>:1 +0x44 fp=0x40005d29d0 sp=0x40005d29a0 pc=0x7a8974
gvisor.dev/gvisor/pkg/tcpip/link/nested.(*Endpoint).WritePackets(...)
	pkg/tcpip/link/nested/nested.go:131
gvisor.dev/gvisor/pkg/tcpip/link/packetsocket.(*endpoint).WritePackets(0x401403f860, {{0x4000730118, 0x1, 0x1}})
	pkg/tcpip/link/packetsocket/packetsocket.go:56 +0xc4 fp=0x40005d2a20 sp=0x40005d29d0 pc=0x7a8b14
gvisor.dev/gvisor/pkg/tcpip/stack.(*delegatingQueueingDiscipline).WritePacket(0x400d6d7000?, 0x4004c24b40?)
	pkg/tcpip/stack/nic.go:159 +0xcc fp=0x40005d2a90 sp=0x40005d2a20 pc=0x5dce6c
gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writeRawPacket(0x4009eb7448, 0x4004c24b40)
	pkg/tcpip/stack/nic.go:415 +0x7c fp=0x40005d2ac0 sp=0x40005d2a90 pc=0x5de41c
gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).writePacket(0x4009eb7448, 0x4004c24b40)
	pkg/tcpip/stack/nic.go:397 +0x4c fp=0x40005d2ae0 sp=0x40005d2ac0 pc=0x5de2bc
gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).WritePacketToRemote(0x4009eb7448, {0x400bfca848, 0x6}, 0x4004c24b40)
	pkg/tcpip/stack/nic.go:392 +0xdc fp=0x40005d2b80 sp=0x40005d2ae0 pc=0x5de22c
gvisor.dev/gvisor/pkg/tcpip/network/arp.(*endpoint).sendARPRequest(0x4003734a80, {{0xac, 0x14, 0x14, 0x1b, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...}, ...)
	pkg/tcpip/network/arp/arp.go:352 +0x2ec fp=0x40005d2d30 sp=0x40005d2b80 pc=0x9f89ec
gvisor.dev/gvisor/pkg/tcpip/network/arp.(*endpoint).LinkAddressRequest(0x4003734a80, {{0xac, 0x14, 0x14, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0, ...}, ...}, ...)
	pkg/tcpip/network/arp/arp.go:329 +0x2b8 fp=0x40005d2f00 sp=0x40005d2d30 pc=0x9f85f8
gvisor.dev/gvisor/pkg/tcpip/stack.(*neighborEntry).setStateLocked.func3()
	pkg/tcpip/stack/neighbor_entry.go:320 +0xa4 fp=0x40005d2fb0 sp=0x40005d2f00 pc=0x5d9954
gvisor.dev/gvisor/pkg/sentry/kernel/time.AfterFunc.func1.1()
	pkg/sentry/kernel/time/util.go:57 +0x40 fp=0x40005d2fd0 sp=0x40005d2fb0 pc=0x421c30
runtime.goexit({})
	src/runtime/asm_arm64.s:1222 +0x4 fp=0x40005d2fd0 sp=0x40005d2fd0 pc=0x896c4
created by gvisor.dev/gvisor/pkg/sentry/kernel/time.AfterFunc.func1 in goroutine 82173
	pkg/sentry/kernel/time/util.go:55 +0x84

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/30 07:48 gvisor d59375d82e63 757f06b1 .config console log report info ci-gvisor-arm64-ptrace-1-cover panic: send on closed channel
* Struck through repros no longer work on HEAD.