Extracting prog: 55.02485181s
Minimizing prog: 14m16.172096s
Simplifying prog options: 2m19.328607259s
Extracting C: 32.05311578s
Simplifying C: 0s
extracting reproducer from 55 programs
first checking the prog from the crash report
single: executing 1 programs separately with timeout 30s
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-syz_open_procfs$pagemap-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
syz_open_procfs$pagemap(0x0, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
single: successfully extracted reproducer
found reproducer with 9 syscalls
minimizing guilty program
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-syz_open_procfs$pagemap-add_key$keyring-mkdirat-mount
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
syz_open_procfs$pagemap(0x0, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-syz_open_procfs$pagemap-add_key$keyring-mkdirat-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
syz_open_procfs$pagemap(0x0, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-syz_open_procfs$pagemap-add_key$keyring-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
syz_open_procfs$pagemap(0x0, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-syz_open_procfs$pagemap-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
syz_open_procfs$pagemap(0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
write(0xffffffffffffffff, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, 0x0, 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, 0x0, &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', 0x0, 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, 0x0, 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, 0x0, 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0), 0x0)
add_key$keyring(&(0x7f0000000400), 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, 0x0, 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, 0x0, &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', 0x0, 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program did not crash
testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, 0x0, 0x1ff)
program did not crash
extracting C reproducer
testing compiled C program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
program did not crash
simplifying guilty program options
testing program (duration=30s, {Threaded:false Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
extracting C reproducer
testing compiled C program (duration=30s, {Threaded:false Repeat:true RepeatTimes:0 Procs:5 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:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
program did not crash
testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
extracting C reproducer
testing compiled C program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
program did not crash
testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
validation run: crashed=true
testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
validation run: crashed=true
testing program (duration=30s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): mkdirat-mount-openat-write-add_key$keyring-mkdirat-mount-mkdirat
detailed listing:
executing program 0:
mkdirat(0xffffffffffffff9c, &(0x7f0000000080)='./proc\x00', 0x1ff)
mount(0x0, &(0x7f0000000100)='./proc\x00', &(0x7f0000000340)='proc\x00', 0x4000, 0x0)
r0 = openat(0xffffffffffffff9c, &(0x7f0000000380)='./proc/thread-self/fail-nth\x00', 0x2, 0x0)
write(r0, &(0x7f00000003c0)='100', 0x3)
add_key$keyring(0x0, 0x0, 0x0, 0x0, 0xffffffffffffffff)
mkdirat(0xffffffffffffff9c, &(0x7f0000000200)='./my_configfs\x00', 0x1ff)
mount(0x0, &(0x7f0000000240)='./my_configfs\x00', &(0x7f00000002c0)='configfs\x00', 0x0, 0x0)
mkdirat(0xffffffffffffff9c, &(0x7f0000000300)='./my_configfs/usb_gadget/g1\x00', 0x1ff)
program crashed: KASAN: use-after-free Read in gadgets_drop
validation run: crashed=true
reproducing took 19m54.030649521s
repro crashed as (corrupted=false):
RSP: 002b:00007ffc69bb2288 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f0e16425fa0 RCX: 00007f0e1619fb19
RDX: 00000000000001ff RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f0e16237b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0e16425fac R14: 00007f0e16425fa0 R15: 00007f0e16425fa0
==================================================================
BUG: KASAN: use-after-free in android_device_destroy drivers/usb/gadget/configfs.c:1815 [inline]
BUG: KASAN: use-after-free in gadgets_drop+0x40/0xd0 drivers/usb/gadget/configfs.c:1904
Read of size 8 at addr ffff888111fd7540 by task syz.2.17/374
CPU: 1 PID: 374 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x71/0x200 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:420
kasan_report+0x122/0x150 mm/kasan/report.c:524
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
android_device_destroy drivers/usb/gadget/configfs.c:1815 [inline]
gadgets_drop+0x40/0xd0 drivers/usb/gadget/configfs.c:1904
client_drop_item+0xa2/0xd0 fs/configfs/dir.c:933
configfs_mkdir+0x811/0x9e0 fs/configfs/dir.c:1413
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f0e1619fb19
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc69bb2288 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f0e16425fa0 RCX: 00007f0e1619fb19
RDX: 00000000000001ff RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f0e16237b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0e16425fac R14: 00007f0e16425fa0 R15: 00007f0e16425fa0
Allocated by task 374:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:380 [inline]
__kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:212 [inline]
kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
gadgets_make+0x57/0xad0 drivers/usb/gadget/configfs.c:1835
configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 374:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1750 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
slab_free mm/slub.c:3712 [inline]
__kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
kfree+0x6f/0xf0 mm/slab_common.c:990
gadget_info_attr_release+0xf5/0x120 drivers/usb/gadget/configfs.c:436
config_item_cleanup fs/configfs/item.c:128 [inline]
config_item_release fs/configfs/item.c:137 [inline]
kref_put include/linux/kref.h:65 [inline]
config_item_put+0x166/0x210 fs/configfs/item.c:149
gadgets_drop+0x23/0xd0 drivers/usb/gadget/configfs.c:1903
client_drop_item+0xa2/0xd0 fs/configfs/dir.c:933
configfs_mkdir+0x811/0x9e0 fs/configfs/dir.c:1413
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff888111fd7000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1344 bytes inside of
2048-byte region [ffff888111fd7000, ffff888111fd7800)
The buggy address belongs to the physical page:
page:ffffea000447f400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fd0
head:ffffea000447f400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000122 ffff888100043200
raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 374, tgid 374 (syz.2.17), ts 39420123220, free_ts 39307489695
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
__kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
__do_kmalloc_node mm/slab_common.c:937 [inline]
__kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
kmalloc_reserve net/core/skbuff.c:449 [inline]
__alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
alloc_skb include/linux/skbuff.h:1322 [inline]
nlmsg_new include/net/netlink.h:987 [inline]
audit_buffer_alloc kernel/audit.c:1801 [inline]
audit_log_start+0x407/0x8a0 kernel/audit.c:1919
common_lsm_audit+0xd2/0x1730 security/lsm_audit.c:448
slow_avc_audit+0x1c4/0x240 security/selinux/avc.c:804
audit_inode_permission+0x1a3/0x270 security/selinux/hooks.c:3085
selinux_inode_permission+0x4f3/0x5d0 security/selinux/hooks.c:3130
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1581 [inline]
free_pcp_prepare mm/page_alloc.c:1655 [inline]
free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
free_unref_page+0x93/0x530 mm/page_alloc.c:3720
free_the_page mm/page_alloc.c:863 [inline]
__free_pages+0x67/0x100 mm/page_alloc.c:6021
free_large_kmalloc+0xae/0xf0 mm/slab_common.c:915
kfree+0x8b/0xf0 mm/slab_common.c:984
can_pernet_exit+0x75/0xd0 net/can/af_can.c:830
ops_exit_list net/core/net_namespace.c:172 [inline]
cleanup_net+0x5b0/0xb10 net/core/net_namespace.c:604
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888111fd7400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888111fd7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888111fd7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888111fd7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888111fd7600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
final repro crashed as (corrupted=false):
RSP: 002b:00007ffc69bb2288 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f0e16425fa0 RCX: 00007f0e1619fb19
RDX: 00000000000001ff RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f0e16237b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0e16425fac R14: 00007f0e16425fa0 R15: 00007f0e16425fa0
==================================================================
BUG: KASAN: use-after-free in android_device_destroy drivers/usb/gadget/configfs.c:1815 [inline]
BUG: KASAN: use-after-free in gadgets_drop+0x40/0xd0 drivers/usb/gadget/configfs.c:1904
Read of size 8 at addr ffff888111fd7540 by task syz.2.17/374
CPU: 1 PID: 374 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x71/0x200 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:420
kasan_report+0x122/0x150 mm/kasan/report.c:524
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
android_device_destroy drivers/usb/gadget/configfs.c:1815 [inline]
gadgets_drop+0x40/0xd0 drivers/usb/gadget/configfs.c:1904
client_drop_item+0xa2/0xd0 fs/configfs/dir.c:933
configfs_mkdir+0x811/0x9e0 fs/configfs/dir.c:1413
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f0e1619fb19
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc69bb2288 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f0e16425fa0 RCX: 00007f0e1619fb19
RDX: 00000000000001ff RSI: 0000200000000300 RDI: ffffffffffffff9c
RBP: 00007f0e16237b70 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f0e16425fac R14: 00007f0e16425fa0 R15: 00007f0e16425fa0
Allocated by task 374:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:380 [inline]
__kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:212 [inline]
kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
gadgets_make+0x57/0xad0 drivers/usb/gadget/configfs.c:1835
configfs_mkdir+0x518/0x9e0 fs/configfs/dir.c:1329
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 374:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1750 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
slab_free mm/slub.c:3712 [inline]
__kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
kfree+0x6f/0xf0 mm/slab_common.c:990
gadget_info_attr_release+0xf5/0x120 drivers/usb/gadget/configfs.c:436
config_item_cleanup fs/configfs/item.c:128 [inline]
config_item_release fs/configfs/item.c:137 [inline]
kref_put include/linux/kref.h:65 [inline]
config_item_put+0x166/0x210 fs/configfs/item.c:149
gadgets_drop+0x23/0xd0 drivers/usb/gadget/configfs.c:1903
client_drop_item+0xa2/0xd0 fs/configfs/dir.c:933
configfs_mkdir+0x811/0x9e0 fs/configfs/dir.c:1413
vfs_mkdir+0x39c/0x580 fs/namei.c:4113
do_mkdirat+0x174/0x4d0 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
x64_sys_call+0x73d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:259
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff888111fd7000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1344 bytes inside of
2048-byte region [ffff888111fd7000, ffff888111fd7800)
The buggy address belongs to the physical page:
page:ffffea000447f400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111fd0
head:ffffea000447f400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000122 ffff888100043200
raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 374, tgid 374 (syz.2.17), ts 39420123220, free_ts 39307489695
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
__kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
__do_kmalloc_node mm/slab_common.c:937 [inline]
__kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
kmalloc_reserve net/core/skbuff.c:449 [inline]
__alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
alloc_skb include/linux/skbuff.h:1322 [inline]
nlmsg_new include/net/netlink.h:987 [inline]
audit_buffer_alloc kernel/audit.c:1801 [inline]
audit_log_start+0x407/0x8a0 kernel/audit.c:1919
common_lsm_audit+0xd2/0x1730 security/lsm_audit.c:448
slow_avc_audit+0x1c4/0x240 security/selinux/avc.c:804
audit_inode_permission+0x1a3/0x270 security/selinux/hooks.c:3085
selinux_inode_permission+0x4f3/0x5d0 security/selinux/hooks.c:3130
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1581 [inline]
free_pcp_prepare mm/page_alloc.c:1655 [inline]
free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
free_unref_page+0x93/0x530 mm/page_alloc.c:3720
free_the_page mm/page_alloc.c:863 [inline]
__free_pages+0x67/0x100 mm/page_alloc.c:6021
free_large_kmalloc+0xae/0xf0 mm/slab_common.c:915
kfree+0x8b/0xf0 mm/slab_common.c:984
can_pernet_exit+0x75/0xd0 net/can/af_can.c:830
ops_exit_list net/core/net_namespace.c:172 [inline]
cleanup_net+0x5b0/0xb10 net/core/net_namespace.c:604
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888111fd7400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888111fd7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888111fd7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888111fd7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888111fd7600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================