|
|
Log in / Subscribe / Register

Security

Kernel-based malware scanning

By Jonathan Corbet
December 4, 2007
Readers of LWN's Kernel Page have long been aware of the ongoing debate over the value of the Linux Security Module (LSM) framework and the security policies which have been implemented using it. One result from that discussion has been the removal of the modular interface in the upcoming 2.6.24 kernel. If that change stands (Linus has said that he could yet be talked out of it), security modules will have to be built into the kernel; there will be no way to load them at runtime. Arguments for this change include ending abuses of the LSM interface, the need to have a security policy in place when the kernel is first booted, and the fact that there is no safe way to unload most known security modules.

On November 28, a message from an engineer at Sophos turned up on the kernel mailing list. It seems that Sophos has a security module (called "Talpa") which performs virus scanning; they would like for the LSM interface to remain so that this module can continue to be loaded. Of course, only free software modules are considered relevant for this discussion, but there is no problem with that: Talpa is available on SourceForge and has been since, well, November 23. Talpa was described this way:

In essence, what our module does is it intercepts file accesses and allows userspace daemons to vet them. One of the means we implemented that is through LSM and although it is not a perfect match for such use we prefer to use an official interface. Unfortunately, with time it became impossible to use LSM on some distributions (SELinux) so we had to implement other intercept methods which are significantly less nice, and which may also become unworkable over time.

So Talpa creates a hook whereby a (presumably proprietary) user-space process can scan file contents for bad stuff and, when it is found, block access to that stuff.

There was quite a bit of discussion about the approaches taken in this code, many of which are seen as being "significantly less nice." Suffice to say that any kernel running this module is not really Linux any more. But it also turns out that there is a lot of skepticism about the goal of this work, regardless of how it's implemented.

One might well be able to create a shiny, proprietary file scanner which can, with 100% accuracy, identify any file containing malware. But that still does not really solve the problem because it is very hard to guarantee that the file's contents as seen by the scanner match those which are later processed by an application. One can imagine a course of events something like this:

  • A user asks the system administrator to look at a PDF file using some sort of plausible reason probably involving the highly humorous content which can be found inside.

  • The administrator (as root, naturally) runs a PDF viewer application which opens the file.

  • The user-space malware-scanning application springs into action; after extensive analysis it pronounces the file clean and allows the access to continue.

  • Before the PDF viewer gets going again, the evil user overwrites the file with content crafted to exploit one of the several-hundred recent PDF library vulnerabilities.

  • The now-compromised viewer immediately repurposes the system toward the task of posting Ron Paul-related comments on weblogs worldwide.

The obvious thing might be to prevent the evil user from writing malware to the file by scanning data as it is written as well. Simple forms of this technique could be circumvented by jumping around the file and writing the bad stuff in small, seemingly innocuous pieces. A much easier and more effective approach, though, is for the attacker to simply mmap() the file, allowing it to be rewritten without the need for any system calls at all. One could try to enforce exclusive access to the file, but that would require an effective revoke() system call, which has proved to be tremendously hard to implement. At this time, there really is no effective defense against that sort of attack.

Defenders of active scanning respond that this sort of local-attacker scenario is not really part of their threat model. If one is concerned about the content of files which arrive on the system via a web browser, a web server, an email client, or something along those lines, then attacks which involve race conditions exploited by local bad guys are not really part of the picture. For this case, active file scanning might be sufficient to detect most potential attacks. In the end, no security mechanism is going to be perfect. A mechanism which makes attacks harder is the best which can be done, and it should, at least, succeed in raising the bar. The response to that assertion is that, for such a simple model, the requisite scanning could easily be done entirely in user space.

In the short term, the Talpa module is not going to get anywhere near the mainline kernel. There is clearly a demand for that sort of feature, though; some segments of the user community feel that it will improve their security and they are willing to pay for it. So the real question that comes out of this discussion is how to provide this kind of feature in a way which plays well with the rest of the kernel. The word is that some of the relevant people are getting together to talk about new approaches; expect this topic to return sometime soon.

Comments (17 posted)

New vulnerabilities

asterisk: possible SQL injection

Package(s): asterisk CVE #(s): CVE-2007-6170
Created: December 3, 2007 Updated: April 15, 2008
Description: Tilghman Lesher discovered that the logging engine of Asterisk, a free software PBX and telephony toolkit, performs insufficient sanitizing of call-related data, which may lead to SQL injection.
Alerts:
Gentoo 200804-13 asterisk 2008年04月14日
SuSE SUSE-SR:2008:005 acroread, asterisk, cacti, compat-openssl097g, icu, libcdio, wireshark/ethereal, Jakarta, perl-tk 2008年03月06日
Debian DSA-1417-1 asterisk 2007年12月02日

Comments (none posted)

cairo: integer overflow

Package(s): Cairo CVE #(s): CVE-2007-5503
Created: November 29, 2007 Updated: April 10, 2008
Description: Cairo has an integer overflow vulnerability in the PNG image processing code. If a user processes a specially crafted PNG image with an application that is linked against cairo, arbitrary code can be executed with the user's privileges.
Alerts:
Gentoo 201209-25 vmware-player 2012年09月29日
Debian DSA-1542-1 libcairo 2008年04月09日
SuSE SUSE-SR:2008:003 java, nss_ldap, cairo, geronimo, moodle, SDL_image, python, mysql, nx, xemacs 2008年02月07日
Mandriva MDVSA-2008:019 cairo 2007年01月21日
Fedora FEDORA-2007-3818 cairo 2008年01月16日
rPath rPSA-2008-0015-1 cairo 2008年01月15日
Ubuntu USN-550-3 cairo 2007年12月13日
Ubuntu USN-550-2 libcairo 2007年12月10日
Gentoo 200712-04 cairo 2007年12月09日
Ubuntu USN-550-1 libcairo 2007年12月03日
Slackware SSA:2007-337-01 cairo 2007年12月04日
Red Hat RHSA-2007:1078-02 Cairo 2007年11月29日

Comments (none posted)

htdig: cross-site scripting vulnerability

Package(s): htdig CVE #(s): CVE-2007-6110
Created: November 29, 2007 Updated: December 12, 2007
Description: The htsearch component in htdig 3.2.0b6 is vulnerable to a cross-site scripting attack. Attackers can inject web scripts and HTML code using the sort parameter.
Alerts:
SuSE SUSE-SR:2007:025 net-snmp, htdig, e2fsprogs, nagios-plugins, libpng, emacs, rubygem-actionpack, gnump3d, glib2 2007年12月05日
Debian DSA-1429-1 htdig 2007年12月11日
Fedora FEDORA-2007-757 htdig 2007年12月03日
Red Hat RHSA-2007:1095-01 htdig 2007年12月03日
Fedora FEDORA-2007-3958 htdig 2007年11月29日
Fedora FEDORA-2007-3907 htdig 2007年11月29日

Comments (none posted)

kernel: several vulnerabilities

Package(s): kernel CVE #(s): CVE-2007-2172 CVE-2007-3739 CVE-2007-4308
Created: December 3, 2007 Updated: January 8, 2009
Description: A typo in Linux kernel 2.6 before 2.6.21-rc6 and 2.4 before 2.4.35 causes RTA_MAX to be used as an array size instead of RTN_MAX, which leads to an "out of bound access" by the (1) dn_fib_props (dn_fib.c, DECNet) and (2) fib_props (fib_semantics.c, IPv4) functions. (CVE-2007-2172)

mm/mmap.c in the hugetlb kernel, when run on PowerPC systems, does not prevent stack expansion from entering into reserved kernel page memory, which allows local users to cause a denial of service (OOPS) via unspecified vectors. (CVE-2007-3739)

The (1) aac_cfg_open and (2) aac_compat_ioctl functions in the SCSI layer ioctl path in aacraid in the Linux kernel before 2.6.23-rc2 do not check permissions for ioctls, which might allow local users to cause a denial of service or gain privileges. (CVE-2007-4308)

Alerts:
Red Hat RHSA-2008:0787-01 kernel 2009年01月05日
Red Hat RHSA-2009:0001-01 kernel 2009年01月08日
SuSE SUSE-SA:2008:017 kernel 2008年03月28日
Debian DSA-1504 kernel-source-2.6.8 2008年02月22日
Debian DSA-1503 kernel-source-2.4.27 2008年02月22日
Debian DSA-1503-2 kernel-source-2.4.27 2008年03月06日
SuSE SUSE-SA:2008:006 kernel 2008年02月07日
SuSE SUSE-SA:2007:064 kernel 2007年12月04日
Red Hat RHSA-2007:1049-01 kernel 2007年12月03日

Comments (none posted)

kernel: buffer overflows

Package(s): kernel CVE #(s): CVE-2007-5904
Created: December 3, 2007 Updated: June 20, 2008
Description: Multiple buffer overflows in CIFS VFS in Linux kernel 2.6.23 and earlier allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via long SMB responses that trigger the overflows in the SendReceive function.
Alerts:
SuSE SUSE-SA:2008:030 kernel 2008年06月20日
Ubuntu USN-618-1 linux-source-2.6.15/20/22 2008年06月19日
SuSE SUSE-SA:2008:017 kernel 2008年03月28日
Red Hat RHSA-2008:0167-01 kernel 2008年03月14日
SuSE SUSE-SA:2008:013 kernel-rt 2008年03月06日
rPath rPSA-2008-0048-1 kernel 2008年02月08日
Red Hat RHSA-2008:0089-01 kernel 2008年01月23日
Debian DSA-1428-2 linux-2.6 2007年12月11日
SuSE SUSE-SA:2007:064 kernel 2007年12月04日
SuSE SUSE-SA:2007:063 kernel 2007年12月03日

Comments (none posted)

kernel: multiple vulnerabilities

Created: December 4, 2007 Updated: January 8, 2009
Description: The sysfs_readdir function in the Linux kernel 2.6 allows local users to cause a denial of service (kernel OOPS) by dereferencing a null pointer to an inode in a dentry. (CVE-2007-3104)

The CIFS filesystem, when Unix extension support is enabled, did not honor the umask of a process, which allowed local users to gain privileges.(CVE-2007-3740)

The Linux kernel checked the wrong global variable for the CIFS sec mount option, which might allow remote attackers to spoof CIFS network traffic that the client configured for security signatures, as demonstrated by lack of signing despite sec=ntlmv2i in a SetupAndX request. (CVE-2007-3843)

Buffer overflow in the isdn_net_setcfg function in isdn_net.c in the Linux kernel allowed local users to have an unknown impact via a crafted argument to the isdn_ioctl function. (CVE-2007-6063)

Alerts:
Red Hat RHSA-2008:0787-01 kernel 2009年01月05日
CentOS CESA-2008:0973 kernel 2008年12月17日
Red Hat RHSA-2008:0973-03 kernel 2008年12月16日
Red Hat RHSA-2009:0001-01 kernel 2009年01月08日
Mandriva MDVSA-2008:112 kernel 2007年06月12日
Mandriva MDVSA-2008:105 kernel 2007年05月21日
Debian DSA-1504 kernel-source-2.6.8 2008年02月22日
Red Hat RHSA-2008:0154-01 kernel 2008年03月05日
Debian DSA-1503-2 kernel-source-2.4.27 2008年03月06日
Debian DSA-1503 kernel-source-2.4.27 2008年02月22日
Ubuntu USN-578-1 linux-source-2.6.15 2008年02月14日
SuSE SUSE-SA:2008:006 kernel 2008年02月07日
Ubuntu USN-574-1 linux-source-2.6.17/20/22 2008年02月04日
Red Hat RHSA-2008:0055-01 kernel 2008年01月31日
Red Hat RHSA-2008:0089-01 kernel 2008年01月23日
Mandriva MDVSA-2008:008 kernel 2008年01月11日
Debian DSA-1436-1 linux-2.6 2007年12月20日
Debian DSA-1428-2 linux-2.6 2007年12月11日
Debian DSA-1428-1 linux-2.6 2007年12月10日
SuSE SUSE-SA:2007:064 kernel 2007年12月04日

Comments (none posted)

openoffice.org: arbitrary code execution

Package(s): openoffice.org CVE #(s): CVE-2007-4575
Created: December 5, 2007 Updated: September 10, 2008
Description:

From the OpenOffice advisory:

A security vulnerability in HSQLDB, the default database engine shipped with OpenOffice.org 2 (all versions), may allow attackers to execute arbitrary static Java code, by manipulating database documents to be opened by a user.

Alerts:
Fedora FEDORA-2008-7531 openoffice.org 2008年09月05日
Fedora FEDORA-2008-5247 openoffice.org 2008年06月11日
Fedora FEDORA-2008-5239 openoffice.org 2008年06月11日
Fedora FEDORA-2008-4104 openoffice.org 2008年05月17日
Ubuntu USN-609-1 openoffice.org 2008年05月06日
Mandriva MDVSA-2008:095 openoffice.org 2008年05月02日
Fedora FEDORA-2008-3251 openoffice.org 2008年04月22日
Red Hat RHSA-2008:0158-01 JBoss 2008年03月24日
Gentoo 200712-25 openoffice 2007年12月30日
SuSE SUSE-SA:2007:067 OpenOffice_org 2007年12月11日
Fedora FEDORA-2007-4172 openoffice.org 2007年12月06日
Red Hat RHSA-2007:1090-01 openoffice.org2 2007年12月05日
Fedora FEDORA-2007-762 openoffice.org 2007年12月07日
Fedora FEDORA-2007-4120 openoffice.org 2007年12月06日
Red Hat RHSA-2007:1048-01 openoffice.org 2007年12月05日
Debian DSA-1419-1 openoffice.org 2007年12月05日

Comments (none posted)

openoffice.org, hsqldb: arbitrary code execution

Package(s): openoffice.org, hsqldb CVE #(s): CVE-2003-0845
Created: December 5, 2007 Updated: December 6, 2007
Description:

From the CVE entry:

Unknown vulnerability in the HSQLDB component in JBoss 3.2.1 and 3.0.8 on Java 1.4.x platforms, when running in the default configuration, allows remote attackers to conduct unauthorized activities and possibly execute arbitrary code via certain SQL statements to (1) TCP port 1701 in JBoss 3.2.1, and (2) port 1476 in JBoss 3.0.8.

Alerts:
Red Hat RHSA-2007:1048-01 openoffice.org 2007年12月05日

Comments (3 posted)

php5: multiple vulnerabilities

Package(s): php5 CVE #(s): CVE-2007-4657 CVE-2007-4660 CVE-2007-4662
Created: November 30, 2007 Updated: July 4, 2008
Description: Multiple integer overflows in PHP 4 before 4.4.8, and PHP 5 before 5.2.4, allow remote attackers to obtain sensitive information (memory contents) or cause a denial of service (thread crash) via a large len value to the (1) strspn or (2) strcspn function, which triggers an out-of-bounds read. NOTE: this affects different product versions than CVE-2007-3996. (CVE-2007-4657)

Unspecified vulnerability in the chunk_split function in PHP before 5.2.4 has unknown impact and attack vectors, related to an incorrect size calculation. (CVE-2007-4660)

Buffer overflow in the php_openssl_make_REQ function in PHP before 5.2.4 has unknown impact and attack vectors. (CVE-2007-4662)

Alerts:
Mandriva MDVSA-2008:125 php 2008年07月03日
Mandriva MDVSA-2008:126 php 2007年07月03日
Debian DSA-1578-1 php4 2008年05月17日
Debian DSA-1444-2 php5 2008年01月23日
Debian DSA-1444-1 php5 2008年01月03日
Ubuntu USN-549-2 php5 2007年12月03日
Ubuntu USN-549-1 php5 2007年11月29日

Comments (none posted)

pioneers: denial of service

Package(s): pioneers CVE #(s): CVE-2007-6010
Created: November 30, 2007 Updated: December 5, 2007
Description: Unspecified vulnerability in pioneers (formerly gnocatan) 0.11.3 allows remote attackers to cause a denial of service (daemon crash) via unspecified vectors that trigger an assert error. NOTE: this issue reportedly exists because of an incomplete fix for CVE-2007-5933.
Alerts:
Gentoo 200711-20:04 pioneers 2007年11月14日

Comments (none posted)

rsync: restricted file access

Package(s): rsync CVE #(s): CVE-2007-6199 CVE-2007-6200
Created: December 5, 2007 Updated: September 23, 2011
Description:

From the CVE entry:

rsync before 3.0.0pre6, when running a writable rsync daemon that is not using chroot, allows remote attackers to access restricted files via unknown vectors that cause rsync to create a symlink that points outside of the module's hierarchy.

Alerts:
CentOS CESA-2011:0999 rsync 2011年09月22日
Red Hat RHSA-2011:0999-01 rsync 2011年07月21日
Foresight FLEA-2008-0004-1 rsync 2008年02月11日
Mandriva MDVSA-2008:011 rsync 2007年01月11日
SuSE SUSE-SR:2008:001 libexiv2 dvips libsndfile squid rsync clamav xen 2008年01月09日
rPath rPSA-2007-0257-1 rsync 2007年12月04日

Comments (none posted)

wesnoth: directory traversal

Package(s): wesnoth CVE #(s): CVE-2007-5742
Created: December 3, 2007 Updated: December 6, 2007
Description: Directory traversal vulnerability in the WML engine preprocessor for Wesnoth before 1.2.8 allows remote attackers to read arbitrary files via ".." sequences in unknown vectors.
Alerts:
Debian DSA-1421-1 wesnoth 2007年12月06日
Fedora FEDORA-2007-3989 wesnoth 2007年12月03日
Fedora FEDORA-2007-3986 wesnoth 2007年12月03日

Comments (none posted)

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

(追記) (追記ここまで)

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

AltStyle によって変換されたページ (->オリジナル) /