KASAN: use-after-free Write in config_item_get
Quoted 6 lines · Kyungtae Kim
We report a bug (in linux-5.6.8) found by FuzzUSB (a modified version of syzkaller)
kernel config: https://kt0755.github.io/etc/config_v5.6.8
Quoted 8 lines
This bug happened when accessing a
configfs_iteminstance right after being deallocated.
Specifically,config_item_get()tries to accessci_krefelement in aconfig_iteminstance. But this led to memory access violation because that instance (held by afsg_optsstructure) had been freed byfsg_free_inst()in another thread (PID: 2603).To fix, it needs to check if the
config_iteminstance is still in use when trying to deallocate it.
Great, can you create a patch to fix this now that you have a solid test for it?
thanks,
greg k-h