]> git.ipfire.org Git - thirdparty/kmod.git/commit
modinfo: Prevent out of boundary access
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 16 Oct 2024 09:42:04 +0000 (11:42 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 17 Oct 2024 21:47:53 +0000 (16:47 -0500)
commit136ffe757f8b39df0b6d11897db632cdad77ea87
treec5e9da4e154ad8797018d9e9e594770d6dfe1c6d
parentc40627f927c945717b35c8c79e07912b3a702a33
modinfo: Prevent out of boundary access

If a module file contains parameter strings longer than INT_MAX, it is
possible to trigger an out of boundary read with memcmp. Since such a
file is very likely broken or of malicious intent, just consider it
invalid and error out.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/184
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/modinfo.c