]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: Fix OOB write with illegal index files
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 11 Sep 2024 15:51:53 +0000 (17:51 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 17 Sep 2024 15:53:15 +0000 (10:53 -0500)
commit47407a2565cbd5c58456e7d2efa57158f5238c06
tree70d74a468c238412080615c69a9d20db3494ef34
parent0f6bd005de1a9b8b0cfd397e70f9f0ec5d31e67e
libkmod: Fix OOB write with illegal index files

If an index file with INDEX_NODE_CHILDS flag contains illegal first
and last markers for children, it is possible to trigger an out of
boundary write.

Make sure that first value is not larger than last value while reading
index files.

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/126
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-index.c