~registry/kmod/master

  • Committer: Lucas De Marchi
  • Author(s): Dmitry Antipov
  • Date: 2023-05-30 19:56:54 UTC
  • Revision ID: git-v1:badacf76e46b3602bc0e99ffc677ccbe53691f62
libkmod: fix possible out-of-bounds memory access

An attempt to pass too long module name to, say, rmmod, may
cause an out-of-bounds memory access (as repoted by UBSan):

$ rmmod $(for i in $(seq 0 4200); do echo -ne x; done)
libkmod/libkmod-module.c:1828:8: runtime error: index 4107 out of bounds for type 'char [4096]'

This is because 'snprintf(path, sizeof(path), ...)' may return the
value which exceeds 'sizeof(path)' (which happens when an output
gets truncated). To play it safe, such a suspicious output is
better to be rejected explicitly.

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://lore.kernel.org/r/20230519074638.402045-1-dmantipov@yandex.ru
Filename Latest Rev Last Changed Committer Comment Size
..
libkmod 2 12 years ago Lucas De Marchi Rename libabc to libkmod Diff
m4 1 12 years ago Lucas De Marchi Import skeleton from libabc Diff
man 439 12 years ago Lucas De Marchi rename doc dir to man Diff
shared 919 9 years ago Lucas De Marchi Move macro.h to shared directory It's not really Diff
shell-completion 815 10 years ago Lucas De Marchi shell-completion: Add initial completion for kmod Diff
testsuite 495 12 years ago Lucas De Marchi testsuite: add skeleton Diff
tools 163 12 years ago Lucas De Marchi Merge branch 'use-mmap' Conflicts: libkmod/libkm Diff
.gitignore 1245 2 years ago Lucas De Marchi gitignore: ignore gtk-doc.make Reviewed-by: Luis 303 bytes Diff Download File
.travis.yml 1205 3 years ago Lucas De Marchi ci: update travis distro Don't bother with gcc 4. 802 bytes Diff Download File
File autogen.sh 1279 1 year ago Lucas De Marchi autogen.sh: remove --with-rootprefix, it is gone s 1.7 KB Diff Download File
CODING-STYLE 971 9 years ago Lucas De Marchi CODING-STYLE: add include order 2.3 KB Diff Download File
configure.ac 1296 1 year ago Lucas De Marchi configure.ac: fix link with -llzma Add liblzma_LI 11 KB Diff Download File
COPYING 928 9 years ago Lucas De Marchi Clarify what licences apply where This doesn't ch 25.8 KB Diff Download File
Makefile.am 1295 1 year ago Lucas De Marchi configure: manage libkmod.pc.in and version.py.in 16.2 KB Diff Download File
NEWS 1273 1 year ago Lucas De Marchi kmod 30 27.9 KB Diff Download File
README.md 1271 1 year ago Lucas De Marchi README: Update optional dependencies Signed-off-b 3.7 KB Diff Download File
TODO 1142 6 years ago Lucas De Marchi libkmod-module: check for NULL before accessing po 2.1 KB Diff Download File