By Jake Edge
December 7, 2011
Inserting loadable modules into a running kernel is clearly a convenient
feature. It allows distributions to have relatively small kernels while
still supporting a wide variety of hardware and use-cases, but it can also
allow unwanted modules to be loaded in a way that may not be all that easy
to detect. Those modules could simply be
binary-only drivers that the distribution or service provides doesn't want
to support—or they could be some kind of malware. A recently posted
patch set will help to avoid those problems by giving the option of
building a kernel that will only allow modules that have
been cryptographically signed to be loaded, or to simply detect the
presence of
unsigned modules.
David Howells posted the patches, which are
based on code that has been running in Fedora and RHEL kernels for years.
Therefore, it should have been "thoroughly tested" Howells
said in the final patch in the series
(which also contains the module-signing.txt kernel Documentation file). The
patch allows for signing modules using the RSA signature algorithm with any
of the SHA family of hash algorithms.
The basic idea is that public keys can be built into the kernel and, if
CONFIG_MODULE_SIG is enabled, used to
check the validity of modules before they are loaded. If
CONFIG_MODULE_SIG_FORCE is enabled at compile time (or
enforcemodulesig=1 is passed on the kernel command line), only
those modules that can be verified with one of the public keys built into
the kernel will be loaded. If the "force" option is not used, unsigned
modules will still be loaded. In either case, modules with corrupt or
incorrect signatures,
or those that are signed with a key that is not on the keyring, will be
rejected.
In order to make that work, there needs to be a way to build signed
modules. That is done by creating public and private keys in the top-level
kernel directory (in kernel.pub and kernel.sec by
default). The public key will be processed with the kernel's
bin2c utility and written as crypto/signature/key.h. The
public and secret key will then be used with GNU Privacy Guard (GPG) to sign the
modules automatically as they are built. There are several options that
can be passed on the make command line to govern the location of the key
files as well as options to pass to gpg.
In addition, the modules can be stripped for inclusion into initial ramdisk
images and debuginfo can be included in a separate ELF section that is not
included in the signature calculation. That means that all of the variants
of a particular module can share a single signature that is stored in
the module itself (in the .module_sig ELF section). In addition,
the output of /proc/modules has been changed to add a "U" to
unsigned modules so that they can be detected.
The patch also modifies the kernel's crypto subsystem to allow for the new
key type and to add an RSA signature verification algorithm. That requires
using the multi-precision integer (MPI) library from GPG, which was
reworked from the Red Hat version for kernel inclusion by Dmitry Kasatkin.
That code is already in
the security tree in order to support the Extended Verification Module
(EVM) digital signature extension. It also requires a minimal parser for
the OpenPGP format (which is the kind of keys and signatures that GPG
generates).
There is also something of a chicken-and-egg problem. Many distributions
have crypto and hash algorithms built as modules, but the RSA algorithm and
whichever hash is being used to generate the signatures needs to be present
or an enforcing kernel won't be able to load any modules at all. For that
reason,
the patches ensure that if module signatures are selected at compile time,
the RSA and chosen hash algorithms are not built as modules themselves.
Modules are then loaded in the usual way, with insmod, but the
signature will be checked by suitably configured kernels.
There has been relatively little discussion or complaints about the patches
in the three revisions that have been posted since Howells began the
process in late November. H. Peter Anvin is concerned about adding a OpenPGP parser to the
kernel, and Howells was quick to point out
that the parser is just the minimal amount needed to pull keys and
signatures out of OpenPGP-formatted data. Both Anvin and James Morris were
unconvinced about the need for supporting the (now deprecated) DSA
signature algorithm and Howells has pulled that code out in the most recent
revision.
This is not the first time Howells has proposed these
(or similar) changes as those efforts
stretch back to (at least) 2004. He has now requested that the code be included into the
Morris's security tree. If that happens, and no major complaints arise, we
could potentially see signed module support in Linux 3.3.
While it is a useful feature, particularly for those trying to support
Linux kernels without random drivers from who-knows-where, it only
places another set of hurdles in front of malware authors. Since root
privileges are required to load modules in the first place, a malware
author will only need to find a way to insert code into the running kernel
without using the module loading facility. Once upon a time,
/dev/kmem could be used for that, but many distribution kernels
don't support it any more. Prior to the advent of
CONFIG_STRICT_DEVMEM, /dev/mem would have provided
another way, but distributions are generally enabling that option as well.
Exploiting some kind of kernel bug is the most
probable route for these root-privileged attackers, but is certainly a more
fragile approach than simply inserting a module.
Another potential use (or abuse depending on perspective) of the feature
is for device makers or distributions to lock down their kernels. That
would leave users who wish to add functionality (or remove anti-features)
in the same place as the malware author: looking for a kernel bug to
exploit. Of course, some users may just find a way to replace the kernel
entirely in that scenario.
Comments (7 posted)
Brief items
In recent months, Comodo has been
hacked repeatedly, DigiNotar was
compromised,
and the security of CAs as a whole has been found to be
not
altogether inspiring. The consensus finally seems to be shifting from the
notion that CAs are merely a ripoff, to the notion that they are a ripoff,
a security problem, and that
we want them dead as immediately as possible.
The only question that remains is
how to replace them.
--
Moxie Marlinspike
Disclosing security vulnerabilities is good for security and good for
society, but vendors really hate it. It results in bad press, forces them
to spend money fixing vulnerabilities, and comes out of nowhere. Over the
past decade or so, we've had an uneasy truce between security researchers
and product vendors. That truce seems to be breaking down.
--
Bruce
Schneier
The next problems we hit was pam_securid seems to be running netstat under
the covers. I recall we had this problem with the Netscape Certificate
libraries. They used to execute netstat in order to generate entropy when
using certificates, so I figure this is what is going on here. I also see
the sshd executing ps? Probably for the same reason.
RSA guys please use /dev/urandom and /dev/random.
--
Dan Walsh
debugs some problems that were causing RSA to recommend turning off SELinux
Comments (none posted)
Michael Grace, Yajin Zhou, Zhi Wang, and Xuxian Jiang have published
a
paper [PDF] describing research they have done into the Android
security model as implemented on actual handsets. "
In this paper, we
analyze eight popular Android smartphones and discover that the stock phone
images do not properly enforce the permission model. Several privileged
permissions are unsafely exposed to other applications which do not need
to request them for the actual use. To identify these leaked permissions or
capabilities, we have developed a tool called Woodpecker. Our results with
eight phone images show that among 13 privileged permissions examined so
far, 11 were leaked, with individual phones leaking up to eight
permissions. By exploiting them, an untrusted application can manage to
wipe out the user data, send out SMS messages, or record user conversation
on the affected phones - all without asking for any permission." The
Google "Nexus" phones were the happy exception, with almost no leaks. (Seen
on
The H).
Comments (3 posted)
Nmap hacker Fyodor has discovered that the download.com site is offering a
version of Nmap (for Windows) with an installer that makes a number of
unwelcome changes. "
The way it works is that C|Net's download page
offers what they claim to be Nmap's Windows installer. They even provide
the correct file size for our official installer. But users actually get a
Cnet-created trojan installer. That program does the dirty work before
downloading and executing Nmap's real installer." One assumes they
do similar things with other free programs. The number of LWN
readers obtaining software from download.com is likely to be quite small,
but it is still good to be aware of what's going on. This is why some
projects adopt draconian trademark policies, unfortunately. (Thanks to
Mattias Mattsson).
Full Story (comments: 38)
New vulnerabilities
clearsilver: arbitrary code execution
| Package(s): | clearsilver |
CVE #(s): | CVE-2011-4357
|
| Created: | December 1, 2011 |
Updated: | December 23, 2011 |
| Description: |
From the Debian advisory:
Leo Iannacone and Colin Watson discovered a format string vulnerability
in the Python bindings for the Clearsilver HTML template system, which
may lead to denial of service or the execution of arbitrary code.
|
| Alerts: |
|
Comments (none posted)
colord: SQL injection
| Package(s): | colord |
CVE #(s): | CVE-2011-4349
|
| Created: | December 5, 2011 |
Updated: | December 8, 2011 |
| Description: |
The colord daemon suffers from SQL injection vulnerabilities that could allow a local attacker to corrupt its databases or, possibly, databases belonging to other applications; see the Red Hat bugzilla entry for more information. |
| Alerts: |
|
Comments (none posted)
glibc: code execution
| Package(s): | glibc |
CVE #(s): | CVE-2009-5064
|
| Created: | December 7, 2011 |
Updated: | December 7, 2011 |
| Description: |
From the Red Hat advisory: A flaw was found in the way the ldd utility identified dynamically linked
libraries. If an attacker could trick a user into running ldd on a
malicious binary, it could result in arbitrary code execution with the
privileges of the user running ldd. |
| Alerts: |
|
Comments (none posted)
ipa: cross-site request forgery
| Package(s): | ipa |
CVE #(s): | CVE-2011-3636
|
| Created: | December 7, 2011 |
Updated: | January 11, 2012 |
| Description: |
A CSRF vulnerability in ipa can allow an attacker to perform Red Hat identity management configuration changes with the privileges of a logged-in user. |
| Alerts: |
|
Comments (none posted)
kernel: privilege escalation
| Package(s): | linux kernel |
CVE #(s): | CVE-2011-4330
|
| Created: | December 5, 2011 |
Updated: | December 7, 2011 |
| Description: |
A bounds-checking error in the HFS filesystem can be exploited by a local user to crash the system or gain privileges. |
| Alerts: |
|
Comments (none posted)
kexec-tools: information disclosure
| Package(s): | kexec-tools |
CVE #(s): | CVE-2011-3588
CVE-2011-3589
CVE-2011-3590
|
| Created: | December 7, 2011 |
Updated: | March 8, 2012 |
| Description: |
The kexec-tools package contains a number of information disclosure vulnerabilities exploitable by a local user. |
| Alerts: |
|
Comments (none posted)
krb5: denial of service
| Package(s): | krb5 |
CVE #(s): | CVE-2011-1530
|
| Created: | December 7, 2011 |
Updated: | February 1, 2012 |
| Description: |
The kerberos key distribution center can be made to dereference a null pointer by an authenticated attacker, leading to a server crash. |
| Alerts: |
|
Comments (none posted)
libarchive: arbitrary code execution
| Package(s): | libarchive |
CVE #(s): | CVE-2011-1777
CVE-2011-1778
|
| Created: | December 1, 2011 |
Updated: | February 21, 2012 |
| Description: |
From the Red Hat advisory:
Two heap-based buffer overflow flaws were discovered in libarchive. If a
user were tricked into expanding a specially-crafted ISO 9660 CD-ROM image
or tar archive with an application using libarchive, it could cause the
application to crash or, potentially, execute arbitrary code with the
privileges of the user running the application. (CVE-2011-1777,
CVE-2011-1778)
|
| Alerts: |
|
Comments (none posted)
libxml2: code execution
| Package(s): | libxml2 |
CVE #(s): | CVE-2011-0216
|
| Created: | December 7, 2011 |
Updated: | September 27, 2012 |
| Description: |
The libxml2 library contains an off-by-one error leading to a
buffer overflow vulnerability exploitable via a specially-crafted XML file. |
| Alerts: |
|
Comments (none posted)
mojarra: code injection
| Package(s): | mojarra |
CVE #(s): | CVE-2011-4358
|
| Created: | December 7, 2011 |
Updated: | December 7, 2011 |
| Description: |
Mojarra (a JavaServer Faces implementation) can be made to execute untrusted values as EL expressions in some configurations. |
| Alerts: |
|
Comments (none posted)
nginx: remote code execution
| Package(s): | nginx-1.0 |
CVE #(s): | CVE-2011-4315
|
| Created: | December 5, 2011 |
Updated: | February 9, 2012 |
| Description: |
The DNS resolver built into nginx suffers from a buffer overflow that could enable remote code execution attacks. |
| Alerts: |
|
Comments (none posted)
psi: input validation failure
| Package(s): | psi |
CVE #(s): | CVE-2011-3365
CVE-2011-3366
|
| Created: | December 6, 2011 |
Updated: | December 7, 2011 |
| Description: |
From the Red Hat bugzilla:
An input validation failure was discovered in KSSL (CVE-2011-3365) and Rekonq
(CVE-2011-3366) in KDE SC 4.6.0 up to and including KDE SC 4.7.1, however
upstream indicates that ealier versions of KDE SC may also be affected.
|
| Alerts: |
|
Comments (none posted)
qemu-kvm: privilege escalation
| Package(s): | qemu-kvm |
CVE #(s): | CVE-2011-4111
|
| Created: | December 7, 2011 |
Updated: | December 22, 2011 |
| Description: |
From the Red Hat advisory: A flaw was found in the way qemu-kvm handled VSC_ATR messages when a guest
was configured for a CCID (Chip/Smart Card Interface Devices) USB smart
card reader in passthrough mode. An attacker able to connect to the port on
the host being used for such a device could use this flaw to crash the
qemu-kvm process on the host or, possibly, escalate their privileges on the
host. |
| Alerts: |
|
Comments (none posted)
ruby: predictable random numbers
| Package(s): | ruby |
CVE #(s): | CVE-2011-3009
|
| Created: | December 7, 2011 |
Updated: | January 31, 2012 |
| Description: |
The Ruby interpreter does not reinitialize the random number generator after creating a child process, leading to a situation where two processes may get the same number. |
| Alerts: |
|
Comments (none posted)
ruby-on-rails: multiple vulnerabilities
| Package(s): | rubygem-* |
CVE #(s): | CVE-2010-3933
CVE-2011-0448
CVE-2011-0449
|
| Created: | December 7, 2011 |
Updated: | December 7, 2011 |
| Description: |
The Ruby on Rails package suffers from vulnerabilities enabling arbitrary modification of records via crafted form parameters (CVE-2010-3933), SQL injection (CVE-2011-0448), and access restriction bypass (CVE-2011-0449). |
| Alerts: |
|
Comments (none posted)
sos: key disclosure
| Package(s): | sos |
CVE #(s): | CVE-2011-4083
|
| Created: | December 7, 2011 |
Updated: | January 17, 2013 |
| Description: |
From the Red Hat advisory: The sosreport utility incorrectly included Certificate-based Red Hat
Network private entitlement keys in the resulting archive of debugging
information. An attacker able to access the archive could use the keys to
access Red Hat Network content available to the host. |
| Alerts: |
|
Comments (none posted)
torque: user impersonation
| Package(s): | torque |
CVE #(s): | |
| Created: | December 5, 2011 |
Updated: | December 7, 2011 |
| Description: |
A user connecting to the torque "pbs_server" is able to impersonate another user in the torque batch system. |
| Alerts: |
|
Comments (none posted)
util-linux-ng: denial of service
| Package(s): | util-linux-ng |
CVE #(s): | CVE-2011-1675
CVE-2011-1677
|
| Created: | December 7, 2011 |
Updated: | May 29, 2012 |
| Description: |
Vulnerabilities in the util-linux-ng package allow a local user with the ability to mount an unmount filesystems to corrupt the mtab file and leave a stale lock file around, interfering with others' ability to mount filesystems. |
| Alerts: |
|
Comments (none posted)
virt-v2v: privilege escalation
| Package(s): | virt-v2v |
CVE #(s): | CVE-2011-1773
|
| Created: | December 7, 2011 |
Updated: | December 16, 2011 |
| Description: |
From the Red Hat advisory: Using virt-v2v to convert a guest that has a password-protected VNC console
to a KVM guest removed that password protection from the converted guest:
after conversion, a password was not required to access the converted
guest's VNC console. |
| Alerts: |
|
Comments (none posted)
Page editor: Jake Edge
Next page: Kernel development>>