summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdnsp-pci.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2025-05-07 09:50:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-18 08:24:54 +0200
commitd63851049f412cdfadaeef7a7eaef5031d11c1e9 (patch)
treeec68ba4641b447605cb6c260e942e016c23f4659 /drivers/usb/cdns3/cdnsp-pci.c
parentd66a22f6a432a9dd376c9b365d7dc89bd416909c (diff)
module: ensure that kobject_put() is safe for module type kobjects
commit a6aeb739974ec73e5217c75a7c008a688d3d5cf1 upstream. In 'lookup_or_create_module_kobject()', an internal kobject is created using 'module_ktype'. So call to 'kobject_put()' on error handling path causes an attempt to use an uninitialized completion pointer in 'module_kobject_release()'. In this scenario, we just want to release kobject without an extra synchronization required for a regular module unloading process, so adding an extra check whether 'complete()' is actually required makes 'kobject_put()' safe. Reported-by: syzbot+7fb8a372e1f6add936dd@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7fb8a372e1f6add936dd Fixes: 942e443127e9 ("module: Fix mod->mkobj.kobj potentially freed too early") Cc: stable@vger.kernel.org Suggested-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Link: https://lore.kernel.org/r/20250507065044.86529-1-dmantipov@yandex.ru Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-pci.c')
0 files changed, 0 insertions, 0 deletions