[syzbot] [kernel?] KASAN: global-out-of-bounds Read in uevent_store
Jeffin Philip <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,dev.linux.lists.driver-core |
|---|---|
| Message-ID | <[email protected]> |
#syz test: upstream 9d2ed026f031
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index ddbc4d7482d2..b03562301bfe 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -83,7 +83,7 @@ static int kobject_action_type(const char *buf, size_t count,
for (action = 0; action < ARRAY_SIZE(kobject_actions); action++) {
if (strncmp(kobject_actions[action], buf, count_first) != 0)
continue;
- if (kobject_actions[action][count_first] != '\0')
+ if (strlen(kobject_actions[action]) != count_first)
continue;
if (args)
*args = args_start;