All 2.3.x versions of modutils (since March 12 1999) contain a vulnerability that can lead to a local root compromise. New modutils packages are now available for Redhat and Mandrake. This new version fixes this security problem.
Vulnerable systems:
Red Hat Linux 6.2 - i386, Alpha, Sparc
Red Hat Linux 6.2EE - i386, Alpha, Sparc
Red Hat Linux 7.0 - i386
Red Hat Linux 7.0J - i386
Linux-Mandrake 7.1, 7.2
modutils versions between 2.3.0 and 2.3.20
The modprobe program uses popen() to execute the "echo" program argument with user input. Because popen() relies on /bin/sh to parse the command string and execute "echo", un-escaped shell meta-characters can be included in user input to execute commands. Although modprobe is not installed setuid root, this vulnerability can be exploited to gain root access provided the target system is using kmod. Kmod is a kernel facility that automatically executes the program modprobe when a module is requested via request_module(). One program that can take advantage of this vulnerability is ping. When a device is specified at the command line that doesn't exist, request_module is called with the user-supplied arguments passed to the kernel. The kernel then takes the arguments and executes modprobe with them. Arbitrary commands included in the argument for module name (device name to ping) are then executed when popen() is called as root.
A new version of modutils (2.3.20) has been released that fixes this particular vulnerability. modutils still supports meta expansion, including back quoted commands, but only for data read from the configuration file. This assumes that when modutils is run as root out of the kernel, normal users cannot specify their own configuration files.
Solution:
For each RPM for your particular architecture, run:
rpm -Fvh [filename]
Where filename is the name of the RPM.
For Red Hat Linux 6.2, if you installed the previous (2.3.20-0.6.2) packages, you will need to run:
mv /etc/modules.conf /etc/conf.modules