diff options
| author | Dmitry Antipov <[email protected]> | 2025-05-07 06:50:44 +0000 |
|---|---|---|
| committer | Petr Pavlu <[email protected]> | 2025-05-07 18:24:59 +0000 |
| commit | a6aeb739974ec73e5217c75a7c008a688d3d5cf1 (patch) | |
| tree | ad2bdcde134048fd34adc0568802721730fe2b58 /drivers/usb/cdns3/cdns3-starfive.c | |
| parent | Linux 6.15-rc5 (diff) | |
| download | kernel-a6aeb739974ec73e5217c75a7c008a688d3d5cf1.tar.gz kernel-a6aeb739974ec73e5217c75a7c008a688d3d5cf1.zip | |
module: ensure that kobject_put() is safe for module type kobjects
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: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=7fb8a372e1f6add936dd
Fixes: 942e443127e9 ("module: Fix mod->mkobj.kobj potentially freed too early")
Cc: [email protected]
Suggested-by: Petr Pavlu <[email protected]>
Signed-off-by: Dmitry Antipov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Pavlu <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-starfive.c')
0 files changed, 0 insertions, 0 deletions
