linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: david@lang.hm
To: Peter Dolding <oiaohm@gmail.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>,
	Pavel Machek <pavel@suse.cz>, Eric Paris <eparis@redhat.com>,
	Theodore Tso <tytso@mit.edu>, Rik van Riel <riel@redhat.com>,
	davecb@sun.com, linux-security-module@vger.kernel.org,
	Adrian Bunk <bunk@kernel.org>,
	Mihai Don??u <mdontu@bitdefender.com>,
	linux-kernel@vger.kernel.org, malware-list@lists.printk.net,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon access scanning
Date: Sun, 17 Aug 2008 17:39:00 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0808171733100.12859@asgard.lang.hm> (raw)
In-Reply-To: <e7d8f83e0808171731g6e9355d9mf9beaf7c2fec32a9@mail.gmail.com>

On Mon, 18 Aug 2008, Peter Dolding wrote:

> On Mon, Aug 18, 2008 at 10:17 AM,  <david@lang.hm> wrote:
>> On Sun, 17 Aug 2008, Casey Schaufler wrote:
>>
>>> Pavel Machek wrote:
>>>>>>>
>>>>>>> And I still don't get this 'mmap problem' that I don't solve that
>>>>>>> libmalware magically solves.  What?  don't use mmap?  I certainly hope
>>>>>>> not.
>>>>>>>
>>>>>> Don't use mmap, it is as simple as that. AFAICS mmap(MAP_SHARED) --
>>>>>> which is basically shared memory -- is fundamentally incompatible with
>>>>>> reliable virus scanning.
>>>>>>
>>>>>> ...or do you have a reasonable solution for mmap?
>>>>>>
>>>>> mmap has a few different problems
>>>>>
>>>>> 1. intercepting reads and writes to take action at that time
>>>>>
>>>>> 2. the fact that two programs can use it as an inter-process
>>>>> communication mechanism.
>>>>>
>>>>
>>>> ...can and will use it as an IPC. So we need to modify some
>>>> applications.
>>>>
>>>> Rather than modify all the applications using mmap (you can't tell if
>>>> the other side is going to use it for shared memory... right?), we
>>>> could simply modify all the Windows-facing applications using mmap.
>>>>
>>>>
>>>>> if you are worried about the IPC aspects, all you can do is forbid it,
>>>>
>>>> Can you automatically tell if applications are using mmap for IPC?
>>>>
>>>> BTW in another mail you wanted to include /var/log/syslog from
>>>> scanning. You should not be doing that if syslog is exported to
>>>> Windows systems. Of course, you can get away with scanning syslog when
>>>> Windows client tries to read it, which should be acceptable...
>>>>
>>>>  Pavel
>>>>
>>>
>>> There is a solution to this whole scanning thing, but I've been
>>> reluctant to suggest it, and it will be pretty obvious why y'all
>>> probably don't want to try it. Just to be sure the options are
>>> out on the table, here goes.
>>>
>>> Define an xattr, let's call it "UNSCANNED", which has as its value
>>> a timestamp. A regular file with this attribute cannot be executed
>>> or opened,(exec or open hangs or fails, either behavior has merit
>>> and downsides) and it requires privilege (perhaps CAP_MAC_ADMIN)
>>> to remove the attribute. File creation attaches the attribute. Any
>>> open for write attaches the attribute.
>>>
>>> Your scanner runs with privilege (say CAP_MAC_OVERRIDE) and passes
>>> judgment on files with this attribute, removing either the file, if
>>> it is Evil, or the attribute, if it is Good. The scanner is invoked
>>> when a file that was open with write access is closed. This can be
>>> done using mechanisms already discussed on this thread.
>>>
>>> If you like, you could use a "SCANNED" attribute instead of an
>>> "UNSCANNED" attribute, and reverse the sense of the test. The
>>> major difference will show up on filesystems that don't support
>>> xattrs. The implications should be obvious.
>>>
>>> Now at the beginning I said that you wouldn't like this scheme,
>>> and it shouldn't take a security expert to see the usability problems.
>>> This is how an old school trusted systems junkie (like me) would do
>>> it, and I don't see a better way that would actually achieve the
>>> stated goals. If you wanted you could implement an LSM to do the
>>> labeling bit in a day or two, the notification in about the same
>>> time, which would leave the scanner as the long pole in your
>>> development schedule.
>>
>> did you read the proposal I wrote up? it's similar to (but more flexible
>> than) what you are saying
>>
>> it would allow for multiple 'scanned' tags (to allow for multiple scanning
>> programs). the kernel would clear the tags when the file is dirtied (not
>> when it is closed, the file may not be closed for weeks after all), there is
>> a mechanism to tell the scanner(s) that a file was modified (rather then
>> having to scan the entire filesystem), and if the scan was not done yet when
>> a file is opened the scanner(s) can be invoked at that time.
>>
>>> P.S. - Library based security doesn't work.
>>
>> why not? (with the appropriate kernel support)
>>
>> it actually wouldn't be hard to have the kernel check the xattr, what would
>> be hard is hving the kernel know when it should then invoke the scanner(s)
>> and when it shouldn't. This is a policy decision that doesn't belong in the
>> kernel.
>>
> Because of syscalls  and you don't need to use LD.so to run a program.
>
> Programs can embed there own LD.so and avoid using the system core
> one.   This kind of function is being developed for LSB applications
> for platforms that don't support LSB.
>
> syscalls you can run programs by passing all .so files and directly
> talk to kernel.
>
> Two aways around LD Preloads there are a few more.

you seem to be disagreeing with the threat model. If so, rather then 
arguing agains this implementation of a defense, you need to be arguing 
against the threat model.

you are arguing that this solution doesn't work in some conditions. you 
are correct, but the threat model that was proposed (and nobody has 
proposed any different ones) is not trying to defend against code running 
on the system, even if that code is trying to bypass the protection. I 
even think that this is a good thing. it allows the distros to use the 
protection where appropriate and disable it where it's not (which is a 
surprisingly large number of places).

David Lang

  reply	other threads:[~2008-08-18  0:39 UTC|newest]

Thread overview: 251+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 21:00 [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning Eric Paris
2008-08-04 22:32 ` [malware-list] " Greg KH
2008-08-05  0:26   ` Christoph Hellwig
2008-08-05  0:47     ` Eric Paris
2008-08-05  0:54       ` Christoph Hellwig
2008-08-05  5:49         ` Kyle Moffett
2008-08-05 12:32           ` Alan Cox
2008-08-05 11:31         ` Alan Cox
2008-08-05 14:06           ` Peter Zijlstra
2008-08-05 14:09             ` Alan Cox
2008-08-05 17:58           ` Nick Piggin
2008-08-06  2:41         ` Andi Kleen
2008-08-06 18:04           ` Rik van Riel
2008-08-05  0:32   ` Eric Paris
2008-08-05  0:35     ` Eric Paris
2008-08-05  0:51     ` Greg KH
2008-08-05 11:23       ` Alan Cox
2008-08-05 17:03         ` Greg KH
2008-08-05 18:56           ` Eric Paris
2008-08-05 20:30             ` Greg KH
2008-08-06 18:49               ` Eric Paris
2008-08-06 21:02                 ` Theodore Tso
2008-08-06 21:28                   ` Eric Paris
2008-08-06 21:52                     ` Theodore Tso
2008-08-07 14:16                       ` Eric Paris
2008-08-07 21:55                         ` David Wagner
2008-08-08  2:06                         ` Rene Herman
2008-08-08  2:15                           ` Eric Paris
2008-08-08  2:55                             ` Rene Herman
2008-08-08 11:58                               ` Press, Jonathan
2008-08-08 12:34                                 ` Rene Herman
2008-08-08 13:11                                   ` Press, Jonathan
2008-08-08 13:43                                     ` Rene Herman
2008-08-05 11:25       ` Alan Cox
2008-08-05 17:01         ` Greg KH
2008-08-05 20:36           ` Alan Cox
2008-08-05 19:46       ` Eric Paris
2008-08-05 20:15         ` Greg KH
2008-08-06  9:37           ` tvrtko.ursulin
2008-08-06 15:25             ` Greg KH
2008-08-06 15:41               ` Eric Paris
2008-08-06 16:03               ` tvrtko.ursulin
2008-08-06  9:28         ` tvrtko.ursulin
2008-08-05 14:41     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface foron " Press, Jonathan
2008-08-05 14:56       ` Eric Paris
2008-08-05 16:37         ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon " Press, Jonathan
2008-08-05 17:19           ` Eric Paris
2008-08-05 17:38             ` Arjan van de Ven
2008-08-05 17:29               ` Alan Cox
2008-08-05 18:02                 ` Arjan van de Ven
2008-08-05 20:12                   ` Alan Cox
2008-08-05 20:41                     ` Arjan van de Ven
2008-08-05 18:04               ` Press, Jonathan
2008-08-05 18:11                 ` Greg KH
2008-08-05 18:38                   ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon " Press, Jonathan
2008-08-05 18:54                     ` Theodore Tso
2008-08-05 20:37                       ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon " Press, Jonathan
2008-08-05 21:14                         ` Greg KH
2008-08-05 21:23                           ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforonaccess scanning Press, Jonathan
2008-08-05 21:42                             ` Arjan van de Ven
2008-08-05 21:44                             ` Greg KH
     [not found]                               ` <2629CC4E1D22A64593B02C43E855530303E21D47@USILMS12.ca.com>
2008-08-05 22:26                                 ` [malware-list] [RFC 0/5] [TALPA] Intro toalinuxinterfaceforonaccess scanning Greg KH
2008-08-05 23:37                                   ` Al Viro
2008-08-05 23:48                                     ` Eric Paris
2008-08-05 23:57                                       ` Theodore Tso
2008-08-06  0:11                                       ` Greg KH
2008-08-06  0:25                                         ` Eric Paris
2008-08-06  0:46                                           ` Rik van Riel
2008-08-06  1:44                                             ` Theodore Tso
2008-08-08 10:48                                               ` [malware-list] Threat model for Unix Computers Jörg Ostertag
2008-08-08 22:26                                                 ` Peter Dolding
2008-08-09  1:21                                                 ` david
2008-08-09  1:44                                                 ` Ulrich Drepper
2008-08-05 23:55                                 ` [malware-list] [RFC 0/5] [TALPA] Intro toalinuxinterfaceforonaccess scanning Theodore Tso
2008-08-06 10:25                                   ` Pavel Machek
2008-08-05 21:45                             ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforonaccess scanning Al Viro
2008-08-05 20:18                     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon access scanning Greg KH
2008-08-05 20:28                       ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon " Press, Jonathan
2008-08-05 20:51                         ` Eric Paris
2008-08-05 21:08                           ` Arjan van de Ven
2008-08-06  0:51                     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon " Rik van Riel
2008-08-06 12:10                       ` Press, Jonathan
2008-08-06 12:38                         ` Peter Dolding
2008-08-06 13:11                           ` Press, Jonathan
2008-08-06 13:49                             ` Arjan van de Ven
2008-08-06 13:55                               ` Eric Paris
2008-08-06 14:11                                 ` Peter Dolding
2008-08-06 14:20                                   ` Serge E. Hallyn
2008-08-06 13:57                             ` Peter Dolding
2008-08-06 11:31                               ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon " David Collier-Brown
2008-08-06 23:20                                 ` Peter Dolding
2008-08-06 13:44                         ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon " Arjan van de Ven
2008-08-06 14:16                           ` tvrtko.ursulin
2008-08-06 14:23                             ` Arjan van de Ven
2008-08-06 15:22                             ` Theodore Tso
2008-08-06 15:54                               ` tvrtko.ursulin
2008-08-07  9:28                             ` Pavel Machek
2008-08-07 14:21                               ` Peter Dolding
2008-08-07 14:31                                 ` Eric Paris
2008-08-08  0:05                                   ` Peter Dolding
2008-08-08  5:17                                     ` James Morris
2008-08-06 15:08                         ` Theodore Tso
2008-08-06 15:33                           ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon " Press, Jonathan
2008-08-06 15:46                             ` Rik van Riel
2008-08-06 16:12                               ` tvrtko.ursulin
2008-08-06 16:25                                 ` Rik van Riel
2008-08-06 18:06                                   ` Eric Paris
2008-08-05 20:17                   ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon " Alan Cox
2008-08-06  9:24                   ` tvrtko.ursulin
2008-08-06 15:24                     ` Greg KH
2008-08-05 18:27                 ` Arjan van de Ven
2008-08-05 18:34                   ` Press, Jonathan
2008-08-05 18:38                     ` Greg KH
2008-08-05 20:15                       ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon " Press, Jonathan
2008-08-05 20:26                         ` Greg KH
2008-08-06 10:05                           ` tvrtko.ursulin
2008-08-06 10:50                             ` Adrian Bunk
2008-08-06 11:07                               ` tvrtko.ursulin
2008-08-06 11:26                                 ` Adrian Bunk
2008-08-07  0:49                                   ` Mihai Donțu
2008-08-07  4:39                                     ` Arjan van de Ven
2008-08-11 13:45                                       ` Mihai Donțu
2008-08-11 13:56                                         ` Arjan van de Ven
2008-08-11 16:11                                           ` David Collier-Brown
2008-08-11 21:18                                             ` Press, Jonathan
2008-08-11 22:09                                               ` David Wagner
2008-08-12  7:32                                                 ` Alan Cox
2008-08-13 10:28                                               ` Pavel Machek
2008-08-13 10:46                                                 ` Press, Jonathan
2008-08-13 11:08                                                   ` Peter Dolding
2008-08-13 12:56                                                   ` Pavel Machek
2008-08-13 13:52                                                     ` tvrtko.ursulin
2008-08-14 12:54                                                       ` Pavel Machek
2008-08-14 18:37                                                         ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon " Press, Jonathan
2008-08-14 22:39                                                           ` Pavel Machek
2008-08-15  0:00                                                             ` Rik van Riel
2008-08-15  0:43                                                               ` Theodore Tso
2008-08-15  1:02                                                                 ` Rik van Riel
2008-08-15  3:00                                                                 ` Eric Paris
2008-08-15  5:22                                                                   ` david
2008-08-15  5:33                                                                     ` david
2008-08-15  5:38                                                                       ` david
2008-08-17 22:14                                                                     ` Pavel Machek
2008-08-17 22:12                                                                   ` Pavel Machek
2008-08-17 22:47                                                                     ` david
2008-08-17 22:58                                                                       ` Pavel Machek
2008-08-17 23:24                                                                         ` david
2008-08-18  0:00                                                                         ` Casey Schaufler
2008-08-18  0:17                                                                           ` david
2008-08-18  0:31                                                                             ` Peter Dolding
2008-08-18  0:39                                                                               ` david [this message]
2008-08-18  0:42                                                                             ` Casey Schaufler
2008-08-18  0:07                                                                         ` Rik van Riel
2008-08-19 10:41                                                                           ` Pavel Machek
2008-08-15  8:35                                                                 ` Alan Cox
2008-08-15 11:35                                                                   ` Theodore Tso
2008-08-15 12:57                                                                     ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforonaccess scanning Press, Jonathan
2008-08-15 13:16                                                                       ` Theodore Tso
2008-08-15 13:22                                                                         ` douglas.leeder
2008-08-15 13:28                                                                           ` douglas.leeder
2008-08-15 13:55                                                                           ` Theodore Tso
2008-08-15 14:19                                                                             ` douglas.leeder
2008-08-15 15:42                                                                             ` Valdis.Kletnieks
2008-08-17 22:10                                                                   ` [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon access scanning Pavel Machek
2008-08-13 13:58                                                     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linuxinterfaceforon " Arjan van de Ven
2008-08-13 13:54                                                   ` Arjan van de Ven
2008-08-13 14:16                                                     ` tvrtko.ursulin
2008-08-13 14:28                                                       ` Arjan van de Ven
2008-08-13 15:19                                                         ` tvrtko.ursulin
2008-08-14 12:56                                                       ` Pavel Machek
2008-08-14 20:06                                                         ` Alan Cox
2008-08-14 22:35                                                           ` Pavel Machek
2008-08-11 21:53                                             ` David Wagner
2008-08-11 21:45                                               ` Alan Cox
2008-08-14 10:48                                               ` David Collier-Brown
2008-08-06 15:00                                 ` Theodore Tso
2008-08-06 15:17                             ` Greg KH
2008-08-06 15:22                               ` Eric Paris
2008-08-05 20:38                         ` Arjan van de Ven
2008-08-05 20:54                           ` Eric Paris
2008-08-05 21:05                           ` Al Viro
2008-08-05 18:38                     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon " Arjan van de Ven
2008-08-05 18:39                   ` Eric Paris
2008-08-06  0:30                     ` Rik van Riel
2008-08-06  1:55                       ` Eric Paris
2008-08-06 11:40                     ` Sidebar to [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on " David Collier-Brown
2008-08-06  0:22                 ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interfaceforon " Rik van Riel
2008-08-06  0:53                   ` jmorris
2008-08-06  2:46       ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface foron " Andi Kleen
2008-08-06  8:39     ` [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on " tvrtko.ursulin
2008-08-05 11:21   ` Helge Hafting
2008-08-05 17:04     ` Greg KH
2008-08-05  2:49 ` Casey Schaufler
2008-08-05  3:01   ` Cliffe
2008-08-05  3:44     ` Casey Schaufler
2008-08-05  3:45       ` Cliffe
2008-08-05 20:56       ` Paul Moore
2008-08-06  3:00         ` Casey Schaufler
2008-08-06 14:18           ` Paul Moore
2008-08-07  0:49             ` Casey Schaufler
2008-08-05  3:46     ` Greg KH
2008-08-05  3:58       ` Cliffe
2008-08-05 12:05         ` Peter Dolding
2008-08-05 12:22       ` Alan Cox
2008-08-05 18:08 ` Nick Piggin
2008-08-06  9:44   ` [malware-list] " tvrtko.ursulin
2008-08-06 11:10     ` Nick Piggin
2008-08-06 11:29       ` tvrtko.ursulin
2008-08-06 16:57         ` Nick Piggin
2008-08-05 22:55 ` J. Bruce Fields
2008-08-06 10:09   ` [malware-list] " tvrtko.ursulin
2008-08-06 22:24     ` David Wagner
2008-08-07  0:04       ` James Morris
2008-08-07 10:30         ` Alan Cox
2008-08-07 11:19       ` tvrtko.ursulin
2008-08-06  2:35 ` Andi Kleen
2008-08-06  3:43   ` Eric Paris
2008-08-06  3:52     ` Andi Kleen
2008-08-06 22:04 ` David Wagner
2008-08-18 14:06 ` John Moser
2008-08-15 10:10 [malware-list] [RFC 0/5] [TALPA] Intro to alinuxinterfaceforon " Rob Meijer
2008-08-15 11:02 ` Alan Cox
2008-08-15 12:22 Rob Meijer
2008-08-15 13:27 ` Peter Dolding
2008-08-15 17:31   ` david
2008-08-16  3:57     ` Peter Dolding
2008-08-16  4:09       ` Arjan van de Ven
2008-08-16  5:19         ` Peter Dolding
2008-08-16  9:39           ` Theodore Tso
2008-08-16 11:38             ` Peter Dolding
2008-08-16 15:17               ` Theodore Tso
2008-08-17  7:49                 ` Peter Dolding
2008-08-17  8:58                   ` david
2008-08-18  0:11                     ` Peter Dolding
2008-08-18  0:32                       ` david
2008-08-18  1:20                         ` Peter Dolding
2008-08-18 10:54                       ` douglas.leeder
2008-08-18 13:40                         ` Peter Dolding
2008-08-16  5:35         ` Valdis.Kletnieks
2008-08-16  7:27           ` david
     [not found]         ` <alpine.DEB.1.10.0808152115210.12859@asgard.lang.hm>
2008-08-16  9:28           ` Alan Cox
2008-08-16 10:14             ` david
2008-08-17 21:17       ` David Collier-Brown
2008-08-18  1:33         ` Peter Dolding
2008-08-18  1:44           ` david
2008-08-18  2:33             ` Peter Dolding
2008-08-15 14:18 ` Alan Cox
2008-08-17 10:33 Rob Meijer
2008-08-17 10:46 ` david
2008-08-17 21:58   ` Pavel Machek
2008-08-17 22:30     ` david

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.1.10.0808171733100.12859@asgard.lang.hm \
    --to=david@lang.hm \
    --cc=arjan@infradead.org \
    --cc=bunk@kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=davecb@sun.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=malware-list@lists.printk.net \
    --cc=mdontu@bitdefender.com \
    --cc=oiaohm@gmail.com \
    --cc=pavel@suse.cz \
    --cc=riel@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).