]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Prevent ouf of boundary access
authorTobias Stoeckmann <tobias@stoeckmann.org>
Tue, 5 Nov 2024 16:17:57 +0000 (17:17 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 7 Nov 2024 20:29:52 +0000 (14:29 -0600)
commitaad7c6973bc420dde86870b73ed4efecacfa95ac
tree448e8415a01d311a6ce4ca6636f1ab9b6f78704b
parent6bd8c2bc7b677fd0982da6498064b04a073f2537
libkmod: Prevent ouf of boundary access

Do not access memory out of bounds if the first character read by fgets
is NUL. Treat such a character as EOL instead. This is a purely
defensive measure since /proc/modules should normaly not contain such
characters.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Link: https://github.com/kmod-project/kmod/pull/227
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-module.c