Commit Graph

64 Commits

Author SHA1 Message Date
elad 031bd982f9 Don't reset entry-type for every flag_spec. 2006-12-08 23:22:19 +00:00
elad 95513f79fe Support escaping characters in the path so that spaces etc. are allowed
in entries for Veriexec.

This has been requested for a long time, most recently by Brad Harder.

Thanks a lot to Michael van Elst for the patch, done during the latest
hackathon.
2006-11-29 14:28:30 +00:00
elad 6b6dc6a617 Type changed from size_t to uint64_t, adjust format string.
Pointed out by Tom Spindler, thanks!
2006-11-29 01:12:00 +00:00
elad 646f2112d3 Make Veriexec use proplib(3) for kernel-userland data passing.
Obviously, this breaks the already unstable Veriexec ABI, but that's
it. Some cool additions are planned to be introduced, and this just
makes it so that NetBSD 4.0 users will be able to easily use them as
well.

This also removes the fingerprint type name limit, so relevant code
was adjusted.

Thoroughly tested (even uncovered a bug in proplib! thanks for fixing
that cube@!). Documentation updated.
2006-11-28 22:22:02 +00:00
elad 0ba2154297 Update my email address. 2006-11-21 00:22:04 +00:00
elad 53ca07b4d7 If Veriexec enforces access type, don't allow mmap() to use PROT_EXEC on
files that don't have the "indirect" flag. Also change the "library" alias
in veriexecctl(8) to mean "file, indirect".

okay blymn@
2006-09-30 10:56:31 +00:00
elad 58375355b4 .Sh -> .Ss
mmm mdoclint. :)
2006-09-17 13:03:02 +00:00
elad efffcc37c4 Reference veriexecgen(8) instead of the old scripts. Bump date. 2006-09-16 21:06:13 +00:00
elad 3ea3b1e63e Scripts don't have to be *shell* scripts. 2006-09-16 17:17:23 +00:00
elad 95ed982c27 Fix two horrible bugs found during a routine audit session with Brett Lymn.
First one was incorrectly loading entries -- we were treating each file as
a mount, which resulted in huge mess. I have no excuse for how I didn't
catch this earlier.

Second, use the table name we create for the Veriexec sysctl node and not
the fixed "table0".

Both are fileassoc(9) integration fallout.
2006-09-05 13:02:16 +00:00
elad 0f70b7df59 no VERIFIED_EXEC anymore, just a pseudo-device. 2006-07-22 10:43:51 +00:00
elad b2b73a2973 misc cleanup: remove #if 0 code, unused var, and make pretty. 2006-07-14 23:00:09 +00:00
elad bb74ea2d6b oops, forgot to handle new abi for "query", noted by he@, thanks! 2006-07-14 22:42:05 +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
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
elad 9eed84a6ae Allow multiple lines entries using '\' at the end of the line.
Simplified by martin@, thanks. :)
2006-01-05 20:16:20 +00:00
dsl 24c43e28bb Use PRIu64 to print ino_t (maybe there should be a PRIino_t somewhere....) 2005-12-13 10:56:16 +00:00
wiz fe79b0c9bd Grammar improvement. 2005-12-12 22:29:37 +00:00
elad a9505be892 Add and document a "query" keyword to veriexecctl. Usage:
/sbin/veriexecctl query /path/to/file

will print out filename, device, inode, evaluation status, entry flags,
fingerprint, and fingerprinting algorithm.
2005-12-12 21:47:58 +00:00
elad f39afe3e47 Add and document a VERIEXEC_DELETE operation for Veriexec.
We can now delete an entry from the tables using

	veriexecctl delete /path/to/file

or remove an entire table using

	veriexecctl delete /mount_point

(any directory will work for the mount point it's on)
2005-12-10 02:10:00 +00:00
wiz 42c5a0b8fd Make sentence more readable. 2005-10-05 13:58:49 +00:00
elad 8fc0d7a9c3 Introduce per-page fingerprints in Veriexec.
This closes a hole pointed out by Thor Lancelot Simon on tech-kern ~3
years ago.

The problem was with running binaries from remote storage, where our
kernel (and Veriexec) has no control over any changes to files.

An attacker could, after the fingerprint has been verified and
program loaded to memory, inject malicious code into the backing
store on the remote storage, followed by a forced flush, causing
a page-in of the malicious data from backing store, bypassing
integrity checks.

Initial implementation by Brett Lymn.
2005-10-05 13:48:48 +00:00
wiz f309f02fd0 Bump date for previous; use more markup. 2005-08-07 11:17:31 +00:00
blymn b7550dc6d4 Add and document some convenience aliases for commonly required option
combinations.
2005-08-06 09:00:20 +00:00
elad 42735a8747 Sync with reality.
- Verified Exec -> Veriexec
- pseudo-device is `veriexec'
- veriexec.conf -> signatures, and mention /etc/signatures as the default
  location
- We use veriexec's strict level, not the system securelevel
- Mention the `direct' option
- Mention that the signatures file can have multiple options in a single
  entry, comma-separated
- Mention that both `direct' and `indirect' access modes are implied
  if no access modes are explicitly mention in the options
- Bump date
2005-08-02 18:06:14 +00:00
elad 6e4a854552 Support multiple entry types. Direct, indirect, and file can now be
combined in the signatures file using commas.
2005-08-02 16:14:10 +00:00
christos 2c6eadc9ce Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
2005-06-27 01:00:04 +00:00
elad db6ca056ee Some refactoring and bugfixes:
- Report line numbers correctly.
  - Don't perform a 2nd pass when there are were errors during 1st.
  - Support multiple, comma-separated flags. This is mostly a reworking of
    some parser internals preparing for planned features.
2005-06-13 15:18:44 +00:00
wiz 8dcbfbbb96 Bump date for previous. 2005-06-13 13:07:56 +00:00
elad 471eb59186 Remove bits about deprecated 'fingerprints' command. 2005-06-13 13:05:29 +00:00
elad 0f9ec14004 No need for this one, apparently. Reported by Hisashi T Fujinaka. 2005-06-03 16:12:07 +00:00
elad 055b86e224 Don't create duplicate tables for the same device. 2005-06-03 13:21:35 +00:00
elad 9a23dc795f Newline in end of usage. 2005-06-01 18:29:16 +00:00
elad 98425e4a9e Warn when failing to load an entry; don't fail the whole process. 2005-05-30 18:02:31 +00:00
elad 0f2f650859 Don't access a NULL pointer. 2005-05-27 15:46:23 +00:00
skrll ff8785b1da Remove unused variables. 2005-05-21 09:25:21 +00:00
elad 18afb98204 Remove leftovers from Vexec. 2005-05-20 20:06:34 +00:00
elad cd0c4134f1 Remove common code for returning supported fingerprints. This is done now
via sysctl(8) using kern.veriexec.algorithms.

Also add an entry for the 'algorithms' variable in sysctl.8 forgotten in
the last commit.
2005-05-20 19:52:52 +00:00
jmc 6e682c8cda Need -I. here as well so OBJDIR's work correctly in all cases 2005-05-06 21:51:21 +00:00
blymn 3c941b3ee9 Remove veriexec(4) man page. 2005-04-25 00:40:31 +00:00
blymn f83fbb398f Add bugs sub-heading to warn about whitespace in filenames. 2005-04-24 13:23:55 +00:00
blymn 05e15c389d Move veriexec(4) man page to correct place. 2005-04-24 13:14:50 +00:00
wiz d95a3672e0 Grammar, wording, and punctuation improvements. Sort SEE ALSO. Remove some superfluous .Pp. 2005-04-22 14:44:09 +00:00
wiz 35bf4cd6e6 Add Xr to veriexec.4. 2005-04-22 14:37:10 +00:00
wiz bb1cbe5e1c Mention command names in SYNOPSIS; add gen_rmd160 to SEE ALSO;
improve formatting; bump date.
2005-04-22 14:35:13 +00:00
blymn de3e1bac97 Fix format type error in yyerror printf. 2005-04-21 13:37:44 +00:00
christos 7391aafa62 Minor cleanups, KNF, error handling consistency. 2005-04-21 12:45:12 +00:00
he 271cfff6d5 Make this compile again after the latest overhaul.
Use -I${.CURDIR} instead of -I. to support placement of objects elsewhere.
Make sure arguments to ctype functions are unsigned char by changing the
type of one function argument.
Fix "local declaration shadows global" warnings by renaming variables.
Fix printing of size_t variable to use %zu format instead of %u.
2005-04-21 11:21:58 +00:00
blymn 0b0178626c Add missing header file. 2005-04-21 00:27:35 +00:00
blymn 8387760ed1 Rototill of the verified exec functionality.
* We now use hash tables instead of a list to store the in kernel
    fingerprints.
  * Fingerprint methods handling has been made more flexible, it is now
    even simpler to add new methods.
  * the loader no longer passes in magic numbers representing the
    fingerprint method so veriexecctl is not longer kernel specific.
  * fingerprint methods can be tailored out using options in the kernel
    config file.
  * more fingerprint methods added - rmd160, sha256/384/512
  * veriexecctl can now report the fingerprint methods supported by the
    running kernel.
  * regularised the naming of some portions of veriexec.
2005-04-20 13:44:45 +00:00