Commit Graph

21 Commits

Author SHA1 Message Date
snj
fa7a018146 Fix a spelling error. 2008-05-28 00:31:10 +00:00
elad
6700cfccd6 Some Veriexec stuff that's been rotting in my tree for months.
Bug fixes:
  - Fix crash reported by Scott Ellis on current-users@.

  - Fix race conditions in enforcing the Veriexec rename and remove
    policies. These are NOT security issues.

  - Fix memory leak in rename handling when overwriting a monitored
    file.

  - Fix table deletion logic.

  - Don't prevent query requests if not in learning mode.


KPI updates:
  - fileassoc_table_run() now takes a cookie to pass to the callback.

  - veriexec_table_add() was removed, it is now done internally. As a
    result, there's no longer a need for VERIEXEC_TABLESIZE.

  - veriexec_report() was removed, it is now internal.

  - Perform sanity checks on the entry type, and enforce default type
    in veriexec_file_add() rather than in veriexecctl.

  - Add veriexec_flush(), used to delete all Veriexec tables, and
    veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
  - Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
    database. This allows Veriexec to produce slightly more accurate
    logs under certain circumstances. In the future, this can be either
    replaced by vnode->pathname translation, or combined with it.

  - Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
    This can be used to recover a database if the file was lost.
    Example usage:

        # veriexecctl dump > /etc/signatures

    Note that only entries with the filename kept (that is, were loaded
    with the '-k' flag) will be dumped.

    Idea from Brett Lymn.

  - Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
    usage:

        # veriexecctl flush

  - Add a 'veriexec_flags' rc(8) variable, and make its default have
    the '-k' flag. On systems using the default signatures file
    (generaetd from running 'veriexecgen' with no arguments), this will
    use additional 32kb of kernel memory on average.

  - Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
    load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
  - The code for veriexecctl was massively simplified as a result of
    eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
    pass of the signatures file, making the loading somewhat faster.

  - Lots of minor fixes found using the (still under development)
    Veriexec regression testsuite.

  - Some of the messages Veriexec prints were improved.

  - Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.
2007-05-15 19:47:43 +00:00
elad
119d4b5acd PR/35253: YAMAMOTO Takashi: fileassoc hash size problem
fileassoc_table_add() was removed from the KPI and made internal. From now
fileassoc(9) will manage the optimal table size internally.

Input from and okay yamt@.
2007-02-06 01:09:48 +00:00
elad
d2e4f7167b Remove advertising clause from all of my stuff. 2007-01-09 12:49:36 +00:00
wiz
0cbf97b519 Use HTML escapes. 2006-12-23 09:45:34 +00:00
yamt
e9e681eded remove the fileassoc "tabledata" functionality. 2006-12-23 08:36:14 +00:00
yamt
687483b208 update an example. 2006-12-11 15:33:01 +00:00
yamt
995d487942 FILEASSOC_NHOOKS has gone. 2006-12-11 15:30:23 +00:00
yamt
9858d82855 it's fileassoc, not verifiedexec. 2006-12-11 15:27:46 +00:00
yamt
c534201d82 sync with the implementation. 2006-12-11 15:27:09 +00:00
wiz
f31bc9e7e9 Bump date for previous. 2006-10-26 17:54:52 +00:00
drochner
cb7efd18c2 minor fixes and cleanup, reviewed by elad 2006-10-26 17:33:11 +00:00
blymn
c09e9ac5fb * Remove "hinted" interface
* Modify fileassoc internals to use fhandle_t instead of fileid
2006-09-06 13:37:49 +00:00
blymn
50abf3c730 Add functions to the fileassoc interface to allow a "hint" to be provided
instead of performing an implicit VOP_GETATTR() when adding/looking up
fileassoc entries.
2006-08-20 10:38:23 +00:00
christos
ce0ef6cfc4 Pretending to be Elad's keyboard:
fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.
2006-08-11 19:17:47 +00:00
wiz
d88803d5d9 Use standard section headers. Make HTML-ready. 2006-07-20 18:50:46 +00:00
elad
0553a6cee4 add caveats section mentioning that kpi routines can result in a call to
VOP_GETATTR() and note this should be considered when using the interface.
also say this limitation is planned on being removed.
2006-07-20 18:47:22 +00:00
elad
9be7229906 expose less api; prompted by yamt@. 2006-07-16 19:37:55 +00:00
elad
f8b95e308b sync examples with reality.. oops. 2006-07-15 07:19:51 +00:00
wiz
f475f1e3d6 Use Dv for defined values. Update history, this KPI appeared in 4.0.
Some other minor fixes.
2006-07-14 22:12:16 +00:00
elad
b5d09ef065 okay, since there was no way to divide this to two commits, here it goes..
introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
2006-07-14 18:41:40 +00:00