1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 09:32:12 +00:00
Dmitry Antipov a6aeb73997 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: 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>
2025-05-07 20:24:59 +02:00
..
2025-03-24 21:18:05 -07:00
2025-03-30 15:44:36 -07:00
2025-03-31 13:37:22 -07:00
2025-03-27 19:22:24 -07:00
2025-03-30 15:44:36 -07:00
2025-03-25 14:47:04 -07:00
2025-02-10 16:56:58 -08:00
2024-11-03 01:28:06 -05:00
2025-03-24 13:39:27 -07:00
2025-04-02 16:05:21 -07:00
2025-01-28 11:34:03 -08:00
2025-03-29 11:59:43 -07:00
2024-11-03 01:28:06 -05:00
2025-02-12 12:12:27 +01:00
2025-03-24 09:52:37 -07:00
2025-03-25 10:54:15 -07:00