linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: david@lang.hm
To: Arjan van de Ven <arjan@infradead.org>
Cc: Theodore Tso <tytso@mit.edu>,
	Christoph Hellwig <hch@infradead.org>,
	Eric Paris <eparis@redhat.com>,
	tvrtko.ursulin@sophos.com, alan@lxorguk.ukuu.org.uk,
	andi@firstfloor.org, linux-kernel@vger.kernel.org,
	malware-list@lists.printk.net,
	malware-list-bounces@dmesg.printk.net, peterz@infradead.org,
	viro@ZenIV.linux.org.uk
Subject: Re: [malware-list] TALPA - a threat model?  well sorta.
Date: Thu, 14 Aug 2008 22:05:15 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.1.10.0808142149030.12859@asgard.lang.hm> (raw)
In-Reply-To: <20080814204134.23c88f6c@infradead.org>

On Thu, 14 Aug 2008, Arjan van de Ven wrote:

> On Thu, 14 Aug 2008 22:04:00 -0400
> Theodore Tso <tytso@mit.edu> wrote:
>
>> On Thu, Aug 14, 2008 at 06:44:33PM -0700, david@lang.hm wrote:
>>> could you do something like defining a namespace inside posix
>>> attributes and then setting up a mechanism in the kernel to alert
>>> if the attributes change (with the entire namespace getting cleared
>>> if the file gets dirtied)?
>>
>> According to Eric Paris the clean/dirty state is only stored in
>> memory.  We could use the extended attribute interface as a way of not
>> defining a new system call, or some other interface, but I'm not sure
>> it's such a great match given that the extended attributes interface
>> are designed for persistent data.
>>
>> I agree that doesn't actually work very well for the tracker use case,
>> where you the clean/dirty bit to be persistent (in case the tracker is
>> disabled due to the fact you are running on battery, for example, and
>> then you reboot).
>>
>
> but we need a "give me all dirty files" solution, not a "is this file
> dirty" solution.
>
> I do not want a virus scanner to constantly have to poll the whole fs
> for dirty files ;-)

I'm not sure.

there are two situations (with the transition between them)

1. unscanned system, we want to do everything. (this happens immediatly 
after a new signature file is deployed)

here you do just want to filter out the files that have been scanned from 
the list of everything, and you probably want to check at the time of 
scanning the file in case it was opened (and scanned) in the meantime.

2. mostly scanned system, we only want to scan files that have been 
dirtied.

here you don't need to scan everything, you only need to scan in two cases

2a. the file was dirtied (you learn about it and add it to the queue of 
files to scan when you get around to it)

2b. an unscanned file is opened (the library detects that the file was not 
marked approved by all the current scanners, so it invokes the scanners on 
this file before completing the open, or copy for mmap, or whatever)



In the first case the attributes work "don't bother scanning me".

In the second case they also work (becouse you aren't trying to scan 
everything)


the only time there is a headache is in the transition between them when 
you have scanned a lot of the system, but not all of it, and the machine 
was rebooted so you lost track of what you had scanned.

it shouldn't be too hard to deal with this. even if you never resume the 
scan you are still safe (becouse of the scan-on-open), but it's also 
possible to either do a find f(or equivalent) or files without the 
attribute and store the results (similar to updatedb) and then updating 
the file to mark the files as being scanned (update in place, change the 
first character or something to be fairly crash safe). after the full list 
of files has been scanned shift to the second mode.

the sweep scan should be a background task, possibly disabled when on 
battery power.

why would this not satisfy the requirements?

David Lang

  reply	other threads:[~2008-08-15  5:05 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 16:36 TALPA - a threat model? well sorta Eric Paris
2008-08-13 16:24 ` Alan Cox
2008-08-13 16:47   ` Eric Paris
2008-08-13 16:37     ` Alan Cox
2008-08-13 17:00       ` Eric Paris
2008-08-13 19:59         ` Alan Cox
2008-08-13 21:24           ` [malware-list] " Press, Jonathan
2008-08-13 21:13             ` Alan Cox
2008-08-13 21:35             ` Rik van Riel
2008-08-13 21:23               ` Alan Cox
2008-08-15  3:25                 ` Eric Paris
2008-08-15 20:16               ` Jan Harkes
2008-08-15 22:05                 ` Arjan van de Ven
2008-08-17 23:19                   ` Eric Paris
2008-08-17 23:26                     ` Arjan van de Ven
2008-08-17 21:11                       ` David Collier-Brown
2008-08-18 15:33                     ` Alan Cox
2008-08-18 16:43                       ` Rik van Riel
     [not found]                         ` <20080819071416.GA14731@elf.ucw.cz>
2008-08-19 16:10                           ` HSM (was Re: [malware-list] TALPA - a threat model? well sorta.) Rik van Riel
2008-08-19 19:20                             ` Pavel Machek
2008-08-19 20:33                               ` Rik van Riel
2008-08-20 17:03                                 ` Pavel Machek
2008-08-13 17:07   ` TALPA - a threat model? well sorta Christoph Hellwig
2008-08-14 13:00   ` Arnd Bergmann
2008-08-13 16:57 ` Greg KH
2008-08-13 17:39 ` Arjan van de Ven
2008-08-13 18:15   ` Theodore Tso
2008-08-13 18:21     ` Arjan van de Ven
2008-08-14  9:18       ` tvrtko.ursulin
2008-08-13 19:02     ` Eric Paris
2008-08-13 19:29       ` Theodore Tso
2008-08-13 21:15         ` [malware-list] " Press, Jonathan
2008-08-14  9:30         ` tvrtko.ursulin
2008-08-14 12:03           ` Press, Jonathan
2008-08-14 12:27             ` tvrtko.ursulin
2008-08-15 14:31               ` Pavel Machek
2008-08-14 13:24           ` Theodore Tso
2008-08-14 13:48             ` Eric Paris
2008-08-14 15:50               ` Theodore Tso
2008-08-14 17:29                 ` Eric Paris
2008-08-14 19:17                   ` Theodore Tso
2008-08-14 19:20                     ` Eric Paris
2008-08-14 19:34                     ` Christoph Hellwig
2008-08-14 19:41                       ` Theodore Tso
2008-08-14 20:20                         ` Christoph Hellwig
2008-08-14 21:21                           ` J. Bruce Fields
2008-08-14 23:34                             ` Theodore Tso
2008-08-19 21:43                               ` J. Bruce Fields
2008-08-15  1:44                         ` david
2008-08-15  2:04                           ` Theodore Tso
2008-08-15  3:41                             ` Arjan van de Ven
2008-08-15  5:05                               ` david [this message]
2008-08-15  5:12                                 ` Johannes Weiner
2008-08-15  5:28                                   ` david
2008-08-15  5:36                                 ` david
2008-08-15  4:48                             ` david
2008-08-15  8:51                             ` Alan Cox
2008-08-15 14:37                 ` Pavel Machek
2008-08-13 18:57   ` Eric Paris
2008-08-13 21:39     ` Arjan van de Ven
2008-08-14 14:12       ` Eric Paris
2008-08-14 15:57         ` Arjan van de Ven
2008-08-15 10:07         ` Helge Hafting
2008-08-15 10:37           ` Peter Zijlstra
2008-08-15 13:10             ` [malware-list] " Press, Jonathan
2008-08-15 13:18               ` douglas.leeder
2008-08-15 17:04                 ` Theodore Tso
2008-08-15 18:09                   ` Press, Jonathan
2008-08-18 10:09                     ` Helge Hafting
2008-08-18 10:14                       ` Peter Zijlstra
2008-08-18 10:24                         ` tvrtko.ursulin
2008-08-18 10:25                       ` douglas.leeder
2008-08-15 16:25               ` david
2008-08-15 16:30                 ` Press, Jonathan
2008-08-15 17:33                   ` david
2008-08-15 17:40                     ` Press, Jonathan
2008-08-15 17:47                       ` david
2008-08-15 18:06                         ` Valdis.Kletnieks
2008-08-15 20:05                           ` david
2008-08-15 20:17                           ` Theodore Tso
2008-08-15 18:17                         ` Press, Jonathan
2008-08-15 20:08                           ` david
2008-08-18 10:02               ` Helge Hafting
2008-08-15 10:44           ` tvrtko.ursulin
2008-08-14  9:46     ` [malware-list] " tvrtko.ursulin
2008-08-14 13:46       ` Arjan van de Ven
2008-08-15  1:37       ` david
2008-08-15  1:31   ` david
2008-08-15 16:06   ` Pavel Machek
2008-08-18 12:21     ` david
2008-08-18 13:30       ` Pavel Machek
2008-08-19  0:03         ` david
2008-08-13 18:17 ` Andi Kleen
2008-08-13 18:21   ` H. Peter Anvin
2008-08-13 18:24   ` Arjan van de Ven
2008-08-13 18:40   ` Eric Paris
2008-08-14  0:18   ` Mihai Donțu
2008-08-14 11:58     ` [malware-list] " Press, Jonathan
2008-08-14 12:34       ` Mihai Donțu
2008-08-14  0:14 ` 7v5w7go9ub0o
2008-08-14  2:25   ` 7v5w7go9ub0o

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.0808142149030.12859@asgard.lang.hm \
    --to=david@lang.hm \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=arjan@infradead.org \
    --cc=eparis@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malware-list-bounces@dmesg.printk.net \
    --cc=malware-list@lists.printk.net \
    --cc=peterz@infradead.org \
    --cc=tvrtko.ursulin@sophos.com \
    --cc=tytso@mit.edu \
    --cc=viro@ZenIV.linux.org.uk \
    /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).