Extracting prog: 4m21.92178447s
Minimizing prog: 20m0.726411096s
Simplifying prog options: 0s
Extracting C: 41.350874367s
Simplifying C: 8m55.473679676s
extracting reproducer from 1 programs
testing a last program of every proc
single: executing 1 programs separately with timeout 30s
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program crashed: possible deadlock in n_tty_flush_buffer
program did not crash
single: failed to extract reproducer
single: executing 1 programs separately with timeout 6m0s
testing program (duration=6m0s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program crashed: possible deadlock in n_tty_flush_buffer
single: successfully extracted reproducer
found reproducer with 8 syscalls
minimizing guilty program
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
ioctl$UI_SET_EVBIT(0xffffffffffffffff, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(0xffffffffffffffff, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(0xffffffffffffffff, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(0xffffffffffffffff, 0x5501)
write$input_event(0xffffffffffffffff, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
syz_open_dev$tty1(0xc, 0x4, 0x1)
r0 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r0, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r0, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r0, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r0, 0x5501)
write$input_event(r0, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
ioctl$KDSKBENT(0xffffffffffffffff, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r0 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r0, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r0, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r0, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r0, 0x5501)
write$input_event(r0, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, 0x0)
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, 0x0, 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, 0x0)
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program did not crash
testing program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, 0x0, 0x0)
program did not crash
extracting C reproducer
testing compiled C program (duration=1m24.990940736s, {Threaded:true Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
simplifying C reproducer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program did not crash
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:true Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing compiled C program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
program crashed: possible deadlock in n_tty_flush_buffer
testing program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program crashed: possible deadlock in n_tty_flush_buffer
validation run: crashed=true
testing program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program crashed: possible deadlock in n_tty_flush_buffer
validation run: crashed=true
testing program (duration=1m24.990940736s, {Threaded:false Repeat:true RepeatTimes:0 Procs:4 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): syz_open_dev$tty1-ioctl$KDSKBENT-openat$uinput-ioctl$UI_SET_EVBIT-ioctl$UI_SET_KEYBIT-ioctl$UI_DEV_SETUP-ioctl$UI_DEV_CREATE-write$input_event
detailed listing:
executing program 0:
r0 = syz_open_dev$tty1(0xc, 0x4, 0x1)
ioctl$KDSKBENT(r0, 0x4b47, &(0x7f0000000040)={0x0, 0x1c, 0x20f})
r1 = openat$uinput(0xffffffffffffff9c, &(0x7f0000000080), 0x2, 0x0)
ioctl$UI_SET_EVBIT(r1, 0x40045564, 0x1)
ioctl$UI_SET_KEYBIT(r1, 0x40045565, 0x1c)
ioctl$UI_DEV_SETUP(r1, 0x405c5503, &(0x7f0000000100)={{}, 'syz0\x00'})
ioctl$UI_DEV_CREATE(r1, 0x5501)
write$input_event(r1, &(0x7f0000000200)={{}, 0x1, 0x1c, 0x1}, 0x18)
program crashed: possible deadlock in n_tty_flush_buffer
validation run: crashed=true
reproducing took 37m45.928905072s
repro crashed as (corrupted=false):
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/1:0/27 is trying to acquire lock:
ffff888035fb62c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff888035fb62c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
but task is already holding lock:
ffff88813fe720b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&buf->lock){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #2 (console_lock){+.+.}-{0:0}:
console_lock+0x71/0x90 kernel/printk/printk.c:2896
uart_configure_port drivers/tty/serial/serial_core.c:2590 [inline]
serial_core_add_one_port drivers/tty/serial/serial_core.c:3174 [inline]
serial_core_register_port+0xe23/0x2b80 drivers/tty/serial/serial_core.c:3353
serial8250_register_8250_port+0x1a28/0x2420 drivers/tty/serial/8250/8250_core.c:900
serial_pnp_probe+0x576/0x800 drivers/tty/serial/8250/8250_pnp.c:480
pnp_device_probe+0x313/0x4d0 drivers/pnp/driver.c:111
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__driver_attach+0x339/0x600 drivers/base/dd.c:1292
bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:386
bus_add_driver+0x345/0x670 drivers/base/bus.c:766
driver_register+0x23a/0x320 drivers/base/driver.c:174
serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:318
do_one_initcall+0x250/0x870 init/main.c:1360
do_initcall_level+0x10a/0x1a0 init/main.c:1422
do_initcalls+0x59/0xa0 init/main.c:1438
kernel_init_freeable+0x29d/0x3e0 init/main.c:1673
kernel_init+0x22/0x1d0 init/main.c:1563
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #1 (&port->mutex){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
class_mutex_constructor include/linux/mutex.h:253 [inline]
uart_set_termios+0x83/0x1330 drivers/tty/serial/serial_core.c:1661
tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
set_termios+0x538/0x6c0 drivers/tty/tty_ioctl.c:516
tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
tty_ioctl+0x9bd/0xde0 drivers/tty/tty_io.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&tty->termios_rwsem){++++}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
other info that might help us debug this:
Chain exists of:
&tty->termios_rwsem --> console_lock --> &buf->lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&buf->lock);
lock(console_lock);
lock(&buf->lock);
lock(&tty->termios_rwsem);
*** DEADLOCK ***
locks held by kworker/1:0/27: 5, last CPU#1:
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#2: ffffffff8f14e880 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
#2: ffffffff8f14e880 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:989
#3: ffff888035fb60a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
#3: ffff888035fb60a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
#4: ffff88813fe720b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
stack backtrace:
CPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: events vc_SAK
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
tty tty1: SAK: killed process 5899 (syz.0.17): by fd#3
tty tty1: SAK: killed process 5910 (syz.0.21): by fd#3
tty tty1: SAK: killed process 5972 (syz.2.72): by fd#3
tty tty1: SAK: killed process 5973 (syz.0.74): by fd#3
tty tty1: SAK: killed process 5974 (syz.1.73): by fd#3
tty tty1: SAK: killed process 5975 (syz.3.75): by fd#3
tty tty1: SAK: killed process 6054 (syz.3.154): by fd#3
tty tty1: SAK: killed process 6056 (syz.2.157): by fd#3
tty tty1: SAK: killed process 6057 (syz.1.156): by fd#3
tty tty1: SAK: killed process 6058 (syz.2.159): by fd#3
tty tty1: SAK: killed process 6060 (syz.3.160): by fd#3
tty tty1: SAK: killed process 6061 (syz.1.161): by fd#3
tty tty1: SAK: killed process 6062 (syz.2.162): by fd#3
tty tty1: SAK: killed process 6063 (syz.0.163): by fd#3
tty tty1: SAK: killed process 6091 (syz.0.188): by fd#3
tty tty1: SAK: killed process 6092 (syz.3.190): by fd#3
tty tty1: SAK: killed process 6114 (syz.1.212): by fd#3
tty tty1: SAK: killed process 6115 (syz.2.213): by fd#3
tty tty1: SAK: killed process 6135 (syz.3.233): by fd#3
tty tty1: SAK: killed process 6144 (syz.0.242): by fd#3
tty tty1: SAK: killed process 6149 (syz.0.246): by fd#3
tty tty1: SAK: killed process 6150 (syz.3.248): by fd#3
tty tty1: SAK: killed process 6151 (syz.2.249): by fd#3
tty tty1: SAK: killed process 6152 (syz.1.250): by fd#3
tty tty1: SAK: killed process 6153 (syz.0.251): by fd#3
tty tty1: SAK: killed process 6156 (syz.3.254): by fd#3
tty tty1: SAK: killed process 6157 (syz.0.255): by fd#3
tty tty1: SAK: killed process 6157 (syz.0.255): by fd#3
tty tty1: SAK: killed process 6158 (syz.2.256): by fd#3
tty tty1: SAK: killed process 6187 (syz.1.285): by fd#3
tty tty1: SAK: killed process 6188 (syz.0.286): by fd#3
tty tty1: SAK: killed process 6189 (syz.2.287): by fd#3
tty tty1: SAK: killed process 6190 (syz.3.288): by fd#3
tty tty1: SAK: killed process 6191 (syz.1.289): by fd#3
tty tty1: SAK: killed process 6192 (syz.0.291): by fd#3
tty tty1: SAK: killed process 6193 (syz.2.290): by fd#3
tty tty1: SAK: killed process 6194 (syz.1.292): by fd#3
tty tty1: SAK: killed process 6230 (syz.0.328): by fd#3
tty tty1: SAK: killed process 6231 (syz.1.329): by fd#3
tty tty1: SAK: killed process 6232 (syz.3.331): by fd#3
tty tty1: SAK: killed process 6233 (syz.2.330): by fd#3
tty tty1: SAK: killed process 6234 (syz.3.332): by fd#3
tty tty1: SAK: killed process 6235 (syz.0.334): by fd#3
tty tty1: SAK: killed process 6236 (syz.1.333): by fd#3
tty tty1: SAK: killed process 6237 (syz.2.335): by fd#3
tty tty1: SAK: killed process 6238 (syz.1.336): by fd#3
tty tty1: SAK: killed process 6239 (syz.0.337): by fd#3
tty tty1: SAK: killed process 6240 (syz.3.338): by fd#3
tty tty1: SAK: killed process 6244 (syz.0.342): by fd#3
tty tty1: SAK: killed process 6245 (syz.1.343): by fd#3
final repro crashed as (corrupted=false):
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/1:0/27 is trying to acquire lock:
ffff888035fb62c8 (&tty->termios_rwsem){++++}-{4:4}, at: class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
ffff888035fb62c8 (&tty->termios_rwsem){++++}-{4:4}, at: n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
but task is already holding lock:
ffff88813fe720b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&buf->lock){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #2 (console_lock){+.+.}-{0:0}:
console_lock+0x71/0x90 kernel/printk/printk.c:2896
uart_configure_port drivers/tty/serial/serial_core.c:2590 [inline]
serial_core_add_one_port drivers/tty/serial/serial_core.c:3174 [inline]
serial_core_register_port+0xe23/0x2b80 drivers/tty/serial/serial_core.c:3353
serial8250_register_8250_port+0x1a28/0x2420 drivers/tty/serial/8250/8250_core.c:900
serial_pnp_probe+0x576/0x800 drivers/tty/serial/8250/8250_pnp.c:480
pnp_device_probe+0x313/0x4d0 drivers/pnp/driver.c:111
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__driver_attach+0x339/0x600 drivers/base/dd.c:1292
bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:386
bus_add_driver+0x345/0x670 drivers/base/bus.c:766
driver_register+0x23a/0x320 drivers/base/driver.c:174
serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:318
do_one_initcall+0x250/0x870 init/main.c:1360
do_initcall_level+0x10a/0x1a0 init/main.c:1422
do_initcalls+0x59/0xa0 init/main.c:1438
kernel_init_freeable+0x29d/0x3e0 init/main.c:1673
kernel_init+0x22/0x1d0 init/main.c:1563
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #1 (&port->mutex){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
class_mutex_constructor include/linux/mutex.h:253 [inline]
uart_set_termios+0x83/0x1330 drivers/tty/serial/serial_core.c:1661
tty_set_termios+0xcaf/0x1800 drivers/tty/tty_ioctl.c:341
set_termios+0x538/0x6c0 drivers/tty/tty_ioctl.c:516
tty_mode_ioctl+0x49c/0x7c0 drivers/tty/tty_ioctl.c:-1
tty_ioctl+0x9bd/0xde0 drivers/tty/tty_io.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:597 [inline]
__se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&tty->termios_rwsem){++++}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
other info that might help us debug this:
Chain exists of:
&tty->termios_rwsem --> console_lock --> &buf->lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&buf->lock);
lock(console_lock);
lock(&buf->lock);
lock(&tty->termios_rwsem);
*** DEADLOCK ***
locks held by kworker/1:0/27: 5, last CPU#1:
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#0: ffff88813fe0ad48 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:309 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3460 [inline]
#1: ffffc90000a1fc40 ((work_completion)(&vc_cons[currcons].SAK_work)){+.+.}-{0:0}, at: process_scheduled_works+0x97a/0x1630 kernel/workqueue.c:3578
#2: ffffffff8f14e880 (console_lock){+.+.}-{0:0}, at: class_console_lock_constructor include/linux/console.h:734 [inline]
#2: ffffffff8f14e880 (console_lock){+.+.}-{0:0}, at: vc_SAK+0x28/0x220 drivers/tty/vt/vt_ioctl.c:989
#3: ffff888035fb60a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref drivers/tty/tty_ldisc.c:263 [inline]
#3: ffff888035fb60a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_flush+0x20/0xc0 drivers/tty/tty_ldisc.c:386
#4: ffff88813fe720b8 (&buf->lock){+.+.}-{4:4}, at: tty_buffer_flush+0x74/0x2b0 drivers/tty/tty_buffer.c:236
stack backtrace:
CPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: events vc_SAK
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
class_rwsem_write_constructor include/linux/rwsem.h:270 [inline]
n_tty_flush_buffer+0x30/0x230 drivers/tty/n_tty.c:349
tty_buffer_flush+0x1ec/0x2b0 drivers/tty/tty_buffer.c:248
tty_ldisc_flush+0x6b/0xc0 drivers/tty/tty_ldisc.c:388
__do_SAK+0x25e/0x680 drivers/tty/tty_io.c:3015
vc_SAK+0x78/0x220 drivers/tty/vt/vt_ioctl.c:998
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
tty tty1: SAK: killed process 5899 (syz.0.17): by fd#3
tty tty1: SAK: killed process 5910 (syz.0.21): by fd#3
tty tty1: SAK: killed process 5972 (syz.2.72): by fd#3
tty tty1: SAK: killed process 5973 (syz.0.74): by fd#3
tty tty1: SAK: killed process 5974 (syz.1.73): by fd#3
tty tty1: SAK: killed process 5975 (syz.3.75): by fd#3
tty tty1: SAK: killed process 6054 (syz.3.154): by fd#3
tty tty1: SAK: killed process 6056 (syz.2.157): by fd#3
tty tty1: SAK: killed process 6057 (syz.1.156): by fd#3
tty tty1: SAK: killed process 6058 (syz.2.159): by fd#3
tty tty1: SAK: killed process 6060 (syz.3.160): by fd#3
tty tty1: SAK: killed process 6061 (syz.1.161): by fd#3
tty tty1: SAK: killed process 6062 (syz.2.162): by fd#3
tty tty1: SAK: killed process 6063 (syz.0.163): by fd#3
tty tty1: SAK: killed process 6091 (syz.0.188): by fd#3
tty tty1: SAK: killed process 6092 (syz.3.190): by fd#3
tty tty1: SAK: killed process 6114 (syz.1.212): by fd#3
tty tty1: SAK: killed process 6115 (syz.2.213): by fd#3
tty tty1: SAK: killed process 6135 (syz.3.233): by fd#3
tty tty1: SAK: killed process 6144 (syz.0.242): by fd#3
tty tty1: SAK: killed process 6149 (syz.0.246): by fd#3
tty tty1: SAK: killed process 6150 (syz.3.248): by fd#3
tty tty1: SAK: killed process 6151 (syz.2.249): by fd#3
tty tty1: SAK: killed process 6152 (syz.1.250): by fd#3
tty tty1: SAK: killed process 6153 (syz.0.251): by fd#3
tty tty1: SAK: killed process 6156 (syz.3.254): by fd#3
tty tty1: SAK: killed process 6157 (syz.0.255): by fd#3
tty tty1: SAK: killed process 6157 (syz.0.255): by fd#3
tty tty1: SAK: killed process 6158 (syz.2.256): by fd#3
tty tty1: SAK: killed process 6187 (syz.1.285): by fd#3
tty tty1: SAK: killed process 6188 (syz.0.286): by fd#3
tty tty1: SAK: killed process 6189 (syz.2.287): by fd#3
tty tty1: SAK: killed process 6190 (syz.3.288): by fd#3
tty tty1: SAK: killed process 6191 (syz.1.289): by fd#3
tty tty1: SAK: killed process 6192 (syz.0.291): by fd#3
tty tty1: SAK: killed process 6193 (syz.2.290): by fd#3
tty tty1: SAK: killed process 6194 (syz.1.292): by fd#3
tty tty1: SAK: killed process 6230 (syz.0.328): by fd#3
tty tty1: SAK: killed process 6231 (syz.1.329): by fd#3
tty tty1: SAK: killed process 6232 (syz.3.331): by fd#3
tty tty1: SAK: killed process 6233 (syz.2.330): by fd#3
tty tty1: SAK: killed process 6234 (syz.3.332): by fd#3
tty tty1: SAK: killed process 6235 (syz.0.334): by fd#3
tty tty1: SAK: killed process 6236 (syz.1.333): by fd#3
tty tty1: SAK: killed process 6237 (syz.2.335): by fd#3
tty tty1: SAK: killed process 6238 (syz.1.336): by fd#3
tty tty1: SAK: killed process 6239 (syz.0.337): by fd#3
tty tty1: SAK: killed process 6240 (syz.3.338): by fd#3
tty tty1: SAK: killed process 6244 (syz.0.342): by fd#3
tty tty1: SAK: killed process 6245 (syz.1.343): by fd#3