В ядре Linux устранена следующая уязвимость: usb: gadget: f_tcm: fix deadlock В usbg_make_tpg() usbg_make_tpg() удерживается dep_lock при вызове configfs_depend_item_unlocked(), который приобретает configfs root inode lock при работе в разных подсистемах. Это создает круговую зависимость блокировки с configfs_rmdir(): dep_lock -> configfs root inode lock -> su_mutex -> dep_lock In usbg_make_tpg(), dep_lock только сериализировал чтение opts->ready, который является монотонным флагом, который переходит от false к true ровно один раз (в tcm_set_name()) и никогда не возвращается. Полностью удалите dep_lock из usbg_make_tpg() и используйте READ_ONCE/WRITE_ONCE для доступа к opts->ready без блокировки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_tcm: fix deadlock in usbg_make_tpg() usbg_make_tpg() held dep_lock while calling configfs_depend_item_unlocked(), which acquires the configfs root inode lock when operating across subsystems. This creates a circular lock dependency with configfs_rmdir(): dep_lock -> configfs root inode lock -> su_mutex -> dep_lock In usbg_make_tpg(), dep_lock only serialized the read of opts->ready, which is a monotonic flag that transitions from false to true exactly once (in tcm_set_name()) and never reverts. Remove dep_lock from usbg_make_tpg() entirely and use READ_ONCE/WRITE_ONCE to access opts->ready locklessly instead.