Loadable Kernel Modules, or LKM, are object files that contain code to extend the running kernel, or so-called base kernel. Operating systems other than Linux, such as BSD systems, provide support for LKM's. However, the Linux kernel generally makes far greater and more versatile use of LKM's than other systems. LKM's are typically used to add support for new hardware, filesystems or for adding system calls. When the functionality provided by an LKM is no longer required, it can be unloaded, freeing memory.
/lib/modules, which is divided into subdirectories of kernel version, and module category.
The Filesystem Hierarchy Standard dictates where Loadable Kernel Modules should be located.
The solution is simple, reproduce the problem with an untainted kernel or encourage the vendor to release the module with an open-source license.
MODULE_LICENSE("GPL\0for files in the \"GPL\" directory; for others, only LICENSE file applies");
The string comparison code used by the kernel at the time to determine whether the module was GPLed stopped when it reached a null character (\0), so it would be fooled into thinking that the module was declaring its licence to be just "GPL". The GPL directory referred to in the rest of the licence string was empty.
The versioning information can be compared to the running kernel and if incompatible, will not be loaded.
The base kernel is always unpacked into real contiguous memory by its setup routines, so the base kernel code is never fragmented.
Once the system is in a state where modules may be inserted (for example, once the filesystems have been mounted that contain the modules) it is probable that any new kernel code insertion will cause the kernel to become fragmented, introducing a minor performance penalty.
Many rootkits make use of LKM's in this way.
Loadable module support can be removed in order to prevent this(need recompilation)
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Module (Linux)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world