|
|
Subscribe / Log in / New account

Security

The LoadPin security module

By Jonathan Corbet
April 6, 2016
The merging of security-module stacking was supposed to jump-start the creation of a whole set of small, special-purpose security modules. By making it possible for security modules to play well together, stacking enables modules that solve one little problem rather than implementing an entire security policy. Thus far, the flood of new modules has yet to begin, but the LoadPin module from Kees Cook demonstrates the sort of problem that little security modules might be written to solve.

Security-conscious developers have long worried about code that is loaded into the kernel at run time; such code could clearly, if malicious, subvert the security of the entire system. Mechanisms like the signing of kernel modules are designed to prevent the loading of such code. In the end, though, a signature on a loadable module really only guarantees one thing: where that module came from. If the provenance of kernel modules (or other files loaded into the kernel) could be ascertained by other means, it would not be necessary to sign them.

ChromeOS keeps its security-sensitive files, including kernel modules, in read-only storage; that storage is verified as a whole before the system boots. In such a setting, the loading of modules from the read-only partition is safe regardless of whether they have been signed; they are known to come from Google and cannot have been modified since. So a reasonable security policy for ChromeOS systems might well be to load modules (without signature checking) from the secure partition, while rejecting the loading of modules from anywhere else.

That is the policy that LoadPin was created to implement. It takes advantage of the relatively new kernel file-loading mechanism to intercept all attempts to load a file into the kernel; these include loading kernel modules, reading firmware, loading a security policy, or loading an image for kexec(). In each case, the filesystem containing the file to be loaded is compared against the filesystem used in the first load operation after boot; if the two don't match, the attempt is rejected. All that is required is to build the security module into the kernel; there is no other configuration needed or possible.

The resulting mechanism is, obviously, quite simple in nature. Administrators who want to enable file loading from multiple filesystems, or who want to change the allowed filesystem during the lifetime of the system will be out of luck. But, for the simple case where the system boots from a trusted, read-only image, LoadPin does all that is needed.

In truth, the interface isn't quite that simple. If (and only if) the first load operation is satisfied by a writable filesystem, the LoadPin module will log a warning and establish a sysctl knob (kernel/load_pinning) that can be used to turn the feature on or off. This, of course, is a debugging mechanism; normally one would not want to be able to write to the filesystem containing the trusted modules. After all, the immutability of the trusted filesystem is the foundation on which the trust in its contents is being built. On a production system, the ability to disable pinning would also be undesirable.

It would not be surprising if other developers eventually showed up wanting to add more complex configuration options to this module. One could imagine wanting to apply different policies to different types of files (firmware or kexec() images), for example. The current module is also likely to run into trouble on systems that boot with an initramfs image; the first modules will almost certainly be loaded from that image (that's why it exists, usually), causing loads to be pinned to a temporary filesystem that will go away at the end of the bootstrap process. In the current patch, if the filesystem to which loading is pinned disappears, loading of files will be disabled entirely — behavior that makes sense, but which may not lead to the desired results in an initramfs setting.

But that is work for later, should somebody decide that it is needed. For now, the simple security module would appear to be enough for Google's needs. Indeed, the copyright dates in the code suggest that it has been in use there since 2011.

As Casey Schaufler suggested in his talk on writing one's own security module, the stacking mechanism makes it possible to implement a wide variety of possible policies. LoadPin, perhaps, will be the start of a series of modules from developers who have extended the kernel's security mechanisms in novel ways. The potential is there for some interesting ideas to be contributed back to the kernel. Given that relatively few people seem to think that we have solved all of the security problems with what we have now, that seems like it should be a step in the right direction.

Comments (none posted)

Brief items

Security quotes of the week

A command injection vulnerability exists in this function due to a lack of any sanitization on the user-supplied input that is fed to the system() call. Instead of a number of times to blink the LED, if we send a Linux command wrapped in backticks, like `id`, it will get executed by the Linux shell on the device. To make matters worse, the discovery service runs as root, so whatever command we send it will also be run as root, effectively giving us complete control over the device. Since the device in this case is a door controller, having complete control includes all of the alarm and locking functionality. This means that with a few simple UDP packets and no authentication whatsoever, you can permanently unlock any door connected to the controller. And you can do this in a way that makes it impossible for a remote management system to relock it. On top of that, because the discoveryd service responds to broadcast UDP packets, you can do this to every single door on the network at the same time!
Ricky Lawshae on a vulnerability in HID door controllers in the Trend Micro blog

Best thing the US could do for cyber security would be to fly bombers over every tech business and drop leaflets saying DON'T CALL SYSTEM()
Matthew Garrett reacts to the HID vulnerability

No matter what promises are made on the campaign trail, terrorism will never be vanquished. There is no ideology, no surveillance, no wall that will definitely stop some 24-year-old from becoming radicalized on the Web, gaining access to guns and shooting a soft target. When we don’t admit this to ourselves, we often swing between the extremes of putting our heads in the sand or losing them entirely.
Juliette Kayyem, former assistant secretary at the US Department of Homeland Security

Comments (22 posted)

OSVDB: FIN

The Open Sourced Vulnerability Database (OSVDB) has been shut down. "This was not an easy decision, and several of us struggled for well over ten years trying to make it work at great personal expense. The industry simply did not want to contribute and support such an effort. The OSVDB blog will continue to be a place for providing commentary on all things related to the vulnerability world." (Thanks to Paul Wise)

Comments (none posted)

New vulnerabilities

apache-commons-collections: code execution

Package(s):apache-commons-collections CVE #(s):CVE-2015-8103
Created:April 4, 2016 Updated:April 14, 2016
Description: From the CVE entry:

The Jenkins CLI subsystem in CloudBees Jenkins before 1.638 and LTS before 1.625.2 allows remote attackers to execute arbitrary code via a crafted serialized Java object, related to a problematic webapps/ROOT/WEB-INF/lib/commons-collections-*.jar file and the "Groovy variant in 'ysoserial'".

Alerts:
Mageia MGASA-2016-0137 apache-commons-collections 2016-04-13
Fedora FEDORA-2016-dc3740c56e apache-commons-collections 2016-04-02
Fedora FEDORA-2016-0c5838abc5 apache-commons-collections 2016-04-02

Comments (none posted)

Chromium: denial of service

Package(s):Chromium CVE #(s):CVE-2016-3679
Created:April 1, 2016 Updated:April 6, 2016
Description:

From the CVE entry:

Multiple unspecified vulnerabilities in Google V8 before 4.9.385.33, as used in Google Chrome before 49.0.2623.108, allow attackers to cause a denial of service or possibly have other impact via unknown vectors.

Alerts:
Ubuntu USN-2955-1 oxide-qt 2016-04-27
openSUSE openSUSE-SU-2016:1059-1 Chromium 2016-04-16
openSUSE openSUSE-SU-2016:0930-1 Chromium 2016-04-01
openSUSE openSUSE-SU-2016:0929-1 Chromium 2016-04-01

Comments (none posted)

file: buffer over-write

Package(s):file CVE #(s):
Created:April 6, 2016 Updated:April 6, 2016
Description: From the Mageia advisory:

The file command was vulnerable to a buffer over-write with a malformed magic file.

Alerts:
Mageia MGASA-2016-0132 file 2016-04-06

Comments (none posted)

kernel: timing side channel vulnerability

Package(s):kernel CVE #(s):CVE-2016-2085
Created:April 6, 2016 Updated:April 6, 2016
Description: From the Ubuntu advisory:

Xiaofei Rex Guo discovered a timing side channel vulnerability in the Linux Extended Verification Module (EVM). An attacker could use this to affect system integrity.

Alerts:
Oracle ELSA-2016-3596 kernel 4.1.12 2016-08-26
Oracle ELSA-2016-3596 kernel 4.1.12 2016-08-26
Mageia MGASA-2016-0233 kernel-tmb 2016-06-22
Mageia MGASA-2016-0232 kernel-linus 2016-06-22
Mageia MGASA-2016-0225 kernel 2016-06-13
Ubuntu USN-2948-2 linux-lts-utopic 2016-04-11
Ubuntu USN-2947-3 linux-raspi2 2016-04-06
Ubuntu USN-2947-2 linux-lts-wily 2016-04-06
Ubuntu USN-2949-1 linux-lts-vivid 2016-04-06
Ubuntu USN-2948-1 linux-lts-utopic 2016-04-06
Ubuntu USN-2946-2 linux-lts-trusty 2016-04-06
Ubuntu USN-2946-1 kernel 2016-04-06
Ubuntu USN-2947-1 kernel 2016-04-06

Comments (none posted)

kubernetes: improper admission check control

Package(s):kubernetes CVE #(s):
Created:April 1, 2016 Updated:April 6, 2016
Description:

From the Red Hat bug report:

It was found that patch will check admission control with an empty object and if it passes, then will proceed to update the object with the patch. Admission control plugins don't get a chance to see/validate what is actually going to be updated.

Alerts:
Fedora FEDORA-2016-a89f5ce5f4 kubernetes 2016-04-01

Comments (none posted)

lhasa: code execution

Package(s):lhasa CVE #(s):CVE-2016-2347
Created:April 4, 2016 Updated:April 15, 2016
Description: From the Debian advisory:

Marcin Noga discovered an integer underflow in Lhasa, a lzh archive decompressor, which might result in the execution of arbitrary code if a malformed archive is processed.

Alerts:
Arch Linux ASA-201604-8 lhasa 2016-04-14
openSUSE openSUSE-SU-2016:1027-1 lhasa 2016-04-13
openSUSE openSUSE-SU-2016:1029-1 lhasa 2016-04-13
Debian DSA-3540-1 lhasa 2016-04-03

Comments (none posted)

libebml: use-after-free vulnerability

Package(s):libebml CVE #(s):CVE-2015-8789
Created:March 31, 2016 Updated:April 6, 2016
Description:

From the Debian advisory:

Context-dependent attackers could trigger a use-after-free vulnerability by providing a maliciously crafted EBML document.

Alerts:
Debian DSA-3538-1 libebml 2016-03-31

Comments (none posted)

libqt4: unsafe SSL ciphers

Package(s):libqt4 CVE #(s):
Created:March 31, 2016 Updated:August 31, 2016
Description:

From the openSUSE advisory:

Various unsafe SSL ciphers have been disabled in the standard SSL classes. Also the RC4 based ciphers have been disabled.

Alerts:
openSUSE openSUSE-SU-2016:2199-1 libqt4 2016-08-30
openSUSE openSUSE-SU-2016:0922-1 libqt4 2016-03-31

Comments (none posted)

mercurial: three vulnerabilities

Package(s):mercurial CVE #(s):CVE-2016-3630 CVE-2016-3068 CVE-2016-3069
Created:April 4, 2016 Updated:May 3, 2016
Description: From the Slackware advisory:

This update fixes security issues and bugs, including remote code execution in binary delta decoding, arbitrary code execution with Git subrepos, and arbitrary code execution when converting Git repos.

Alerts:
Scientific Linux SLSA-2016:0706-1 mercurial 2016-05-02
Oracle ELSA-2016-0706 mercurial 2016-05-02
CentOS CESA-2016:0706 mercurial 2016-05-02
Red Hat RHSA-2016:0706-01 mercurial 2016-05-02
openSUSE openSUSE-SU-2016:1073-1 mercurial 2016-04-17
Mageia MGASA-2016-0138 mercurial 2016-04-13
openSUSE openSUSE-SU-2016:1016-1 mercurial 2016-04-12
SUSE SUSE-SU-2016:1011-1 mercurial 2016-04-12
SUSE SUSE-SU-2016:1010-1 mercurial 2016-04-12
Fedora FEDORA-2016-79604dde9f mercurial 2016-04-07
Fedora FEDORA-2016-b7f1f8e3bf mercurial 2016-04-07
Arch Linux ASA-201604-6 mercurial 2016-04-06
Debian DSA-3542-1 mercurial 2016-04-05
Slackware SSA:2016-092-01 mercurial 2016-04-01
Gentoo 201612-19 mercurial 2016-12-07

Comments (none posted)

networkmanager: multiple vulnerabilities

Package(s):NetworkManager CVE #(s):
Created:April 4, 2016 Updated:April 6, 2016
Description: From the Fedora advisory:

[ 1 ] Bug #1268617 - NetworkManager: get_ip_iface_identifier(): NetworkManager killed by SIGABRT

[ 2 ] Bug #1270247 - NetworkManager: nm_device_get_unmanaged_flag(): NetworkManager killed by SIGSEGV

[ 3 ] Bug #1241198 - NetworkManager: nm_supplicant_interface_get_scanning(): NetworkManager killed by SIGSEGV

[ 4 ] Bug #1298007 - NetworkManager: nm_supplicant_interface_get_scanning(): NetworkManager killed by SIGSEGV

Alerts:
Fedora FEDORA-2016-8201e3fefa NetworkManager 2016-04-03

Comments (none posted)

oar: privilege escalation

Package(s):oar CVE #(s):CVE-2016-1235
Created:April 6, 2016 Updated:April 6, 2016
Description: From the Debian advisory:

Emmanuel Thome discovered that missing sanitising in the oarsh command of OAR, a software used to manage jobs and resources of HPC clusters, could result in privilege escalation.

Alerts:
Debian DSA-3543-1 oar 2016-04-05

Comments (none posted)

optipng: code execution

Package(s):optipng CVE #(s):CVE-2016-2191
Created:April 5, 2016 Updated:June 27, 2016
Description: From the Arch Linux advisory:

An invalid write may occur in optipng before version 0.7.6 while processing bitmap images due to `crt_row' being (inc|dec)remented without any boundary checking when encountering delta escapes. This issue can possibly be used to execute arbitrary code.

Alerts:
Gentoo 201608-01 optipng 2016-08-10
Fedora FEDORA-2016-b8f91621c7 optipng 2016-06-25
Ubuntu USN-2951-1 optipng 2016-04-18
openSUSE openSUSE-SU-2016:1082-1 optipng 2016-04-17
openSUSE openSUSE-SU-2016:1078-1 optipng 2016-04-17
Mageia MGASA-2016-0135 optipng 2016-04-13
Debian DSA-3546-1 optipng 2016-04-07
Arch Linux ASA-201604-5 optipng 2016-04-04

Comments (none posted)

php: multiple vulnerabilities

Package(s):php CVE #(s):CVE-2015-8865 CVE-2016-4070 CVE-2016-4071 CVE-2016-4072 CVE-2016-4073 CVE-2016-8866 CVE-2016-8867
Created:April 4, 2016 Updated:December 22, 2016
Description: PHP 5.6.20 fixes numerous bugs. See the PHP changelog for details.
Alerts:
Red Hat RHSA-2016:2750-01 rh-php56 2016-11-15
Oracle ELSA-2017-3511 docker-engine docker-engine-selinux 2017-01-17
Oracle ELSA-2017-3511 docker-engine docker-engine-selinux 2017-01-17
Gentoo 201701-42 file 2017-01-17
SUSE SUSE-SU-2016:1638-1 php53 2016-06-21
SUSE SUSE-SU-2016:1581-1 php53 2016-06-14
Debian-LTS DLA-499-1 php5 2016-05-31
openSUSE openSUSE-SU-2017:0023-1 ImageMagick 2017-01-04
Ubuntu USN-2984-1 php5, php7.0 2016-05-24
openSUSE openSUSE-SU-2016:1373-1 php5 2016-05-20
SUSE SUSE-SU-2016:1277-1 php5 2016-05-11
openSUSE openSUSE-SU-2016:1274-1 php5 2016-05-11
Debian-LTS DLA-460-1 file 2016-05-07
SUSE SUSE-SU-2016:3258-1 ImageMagick 2016-12-23
openSUSE openSUSE-SU-2016:3233-1 ImageMagick 2016-12-22
openSUSE openSUSE-SU-2016:3238-1 GraphicsMagick 2016-12-22
Debian-LTS DLA-756-1 imagemagick 2016-12-21
Debian DSA-3560-1 php5 2016-04-27
Fedora FEDORA-2016-9282d83bee php 2016-04-09
Fedora FEDORA-2016-1cf1b49047 php 2016-04-09
Mageia MGASA-2016-0131 php 2016-04-06
Slackware SSA:2016-092-02 php 2016-04-01
openSUSE openSUSE-SU-2016:3009-1 containerd docker runc 2016-12-05
Gentoo 201611-22 php 2016-12-01
Fedora FEDORA-2016-15cf686c8d docker 2016-11-19
Fedora FEDORA-2016-8e1558d1c6 docker 2016-11-19

Comments (none posted)

squid: denial of service

Package(s):squid CVE #(s):CVE-2016-3947
Created:April 4, 2016 Updated:April 6, 2016
Description: From the Arch Linux advisory:

Due to incorrect bounds checking Squid is vulnerable to a denial of service attack when processing HTTP responses. This problem allows a malicious client script and remote server delivering certain unusual HTTP response syntax to trigger a denial of service for all clients accessing the Squid service.

Alerts:
SUSE SUSE-SU-2016:2089-1 squid3 2016-08-16
openSUSE openSUSE-SU-2016:2081-1 squid 2016-08-16
SUSE SUSE-SU-2016:1996-1 squid3 2016-08-09
Fedora FEDORA-2016-b3b9407940 squid 2016-07-13
Fedora FEDORA-2016-95edf19d8a squid 2016-07-12
Gentoo 201607-01 squid 2016-07-09
Ubuntu USN-2995-1 squid3 2016-06-09
Mageia MGASA-2016-0133 squid 2016-04-06
Arch Linux ASA-201604-4 squid 2016-04-02

Comments (none posted)

squid: denial of service

Package(s):squid CVE #(s):CVE-2016-3948
Created:April 6, 2016 Updated:November 11, 2016
Description: From the Mageia advisory:

Due to incorrect bounds checking, Squid before 3.5.16 is vulnerable to a denial of service attack when processing HTTP responses.

Alerts:
Oracle ELSA-2016-2600 squid 2016-11-10
Red Hat RHSA-2016:2600-02 squid 2016-11-03
SUSE SUSE-SU-2016:2089-1 squid3 2016-08-16
openSUSE openSUSE-SU-2016:2081-1 squid 2016-08-16
SUSE SUSE-SU-2016:1996-1 squid3 2016-08-09
Fedora FEDORA-2016-b3b9407940 squid 2016-07-13
Fedora FEDORA-2016-95edf19d8a squid 2016-07-12
Gentoo 201607-01 squid 2016-07-09
Scientific Linux SLSA-2016:2600-2 squid 2016-12-14
Mageia MGASA-2016-0133 squid 2016-04-06

Comments (none posted)

thunderbird: unspecified vulnerabilities

Package(s):thunderbird/thunderbird-l10n CVE #(s):
Created:April 1, 2016 Updated:April 14, 2016
Description:

According to the Mageia bug report:

Mozilla released Thunderbird 38.7.1 on March 25: https://www.mozilla.org/en-US/thunderbird/38.7.1/releasenotes/

The only change is that they disabled the Graphite2 font shaping library, presumably because of multiple security issues, deciding that disabling the library was more efficient than attempting to fix multiple, potentially unknown vulnerabilities.

Alerts:
Mageia MGASA-2016-0139 thunderbird 2016-04-13
Mageia MGASA-2016-0129 thunderbird/thunderbird-l10n 2016-03-31

Comments (none posted)

vtun: denial of service

Package(s):vtun CVE #(s):
Created:April 5, 2016 Updated:April 25, 2016
Description: From the Red Hat bugzilla:

A vulnerability was found in the vtun package. When you send a SIGHUP to a vtun client process and it cannot connect to the remote server, vtun tries to reconnect without sleep between each attempt. In result, the vtun process uses a lot of CPU, and writes to syslog without limit.

Alerts:
Mageia MGASA-2016-0146 vtun 2016-04-25
Fedora FEDORA-2016-06e4c327b7 vtun 2016-04-05
Fedora FEDORA-2016-0fb6577f07 vtun 2016-04-05

Comments (none posted)

xchat-gnome: man-in-the-middle attack

Package(s):xchat-gnome CVE #(s):CVE-2013-7449
Created:April 5, 2016 Updated:April 7, 2016
Description: From the Ubuntu advisory:

It was discovered that XChat-GNOME incorrectly verified the hostname in an SSL certificate. An attacker could trick XChat-GNOME into trusting a rogue server's certificate, which was signed by a trusted certificate authority, to perform a man-in-the-middle attack.

Alerts:
Ubuntu USN-2945-1 xchat-gnome 2016-04-04

Comments (none posted)

xen: multiple vulnerabilities

Package(s):xen CVE #(s):CVE-2012-6030 CVE-2012-6031 CVE-2012-6032 CVE-2012-6033 CVE-2012-6034 CVE-2012-6035 CVE-2012-6036
Created:April 5, 2016 Updated:April 6, 2016
Description: From the CVE entries:

The do_tmem_op function in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 allow local guest OS users to cause a denial of service (host crash) and possibly have other unspecified impacts via unspecified vectors related to "broken locking checks" in an "error path." NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6030)

The do_tmem_get function in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 allow local guest OS users to cause a denial of service (CPU hang and host crash) via unspecified vectors related to a spinlock being held in the "bad_copy error path." NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6031)

Multiple integer overflows in the (1) tmh_copy_from_client and (2) tmh_copy_to_client functions in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 allow local guest OS users to cause a denial of service (memory corruption and host crash) via unspecified vectors. NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6032)

The do_tmem_control function in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 does not properly check privileges, which allows local guest OS users to access control stack operations via unspecified vectors. NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6033)

The (1) tmemc_save_get_next_page and (2) tmemc_save_get_next_inv functions and the (3) TMEMC_SAVE_GET_POOL_UUID sub-operation in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 "do not check incoming guest output buffer pointers," which allows local guest OS users to cause a denial of service (memory corruption and host crash) or execute arbitrary code via unspecified vectors. NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6034)

The do_tmem_destroy_pool function in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 does not properly validate pool ids, which allows local guest OS users to cause a denial of service (memory corruption and host crash) or execute arbitrary code via unspecified vectors. NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6035)

The (1) memc_save_get_next_page, (2) tmemc_restore_put_page and (3) tmemc_restore_flush_page functions in the Transcendent Memory (TMEM) in Xen 4.0, 4.1, and 4.2 do not check for negative id pools, which allows local guest OS users to cause a denial of service (memory corruption and host crash) or possibly execute arbitrary code via unspecified vectors. NOTE: this issue was originally published as part of CVE-2012-3497, which was too general; CVE-2012-3497 has been SPLIT into this ID and others. (CVE-2012-6036)

Alerts:
Gentoo 201604-03 xen 2016-04-05

Comments (none posted)

Page editor: Jake Edge
Next page: Kernel development>>


Copyright © 2016, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds