--- trunk/ccs-patch/README.ccs 2007/04/18 05:36:07 183 +++ trunk/1.5.x/ccs-patch/README.ccs 2008/01/15 01:30:33 893 @@ -769,7 +769,7 @@ @ Allow reuse of memory allocated for domain policy. - As with domain policy, unlike other policies, didn't have + Regarding domain policy, unlike other policies, didn't have "is_deleted" flag and new memory were allocated if the deleted entries are given again. But to allow administrators switch domain policy periodically, @@ -890,3 +890,248 @@ domain transition are done using /sbin/busybox (realpath of /bin/ls) and will be rejected since the administrator won't grant "1 /sbin/busybox". + +Fix 2007/05/07 + + @ Support pathname subtraction. + + There was no way to exclude specific pathnames when granting + permissions using wildcards. + There would be a need to exclude specific files and directories. + I introduced "\-" as subtraction operator. + + "A\-B" means "A" other than "B". + "A\-B\-C" means "A" other than "B" and "C". + "A\-B\-C\-D" means "A" other than "B" and "C" and "D". + + "A", "B", "C", "D" may contain wildcards. + + An example usage is "/home/\*/\*\-.ssh/\*", which means + "/home/\*/\*/\*" other than "/home/\*/.ssh/\*". + + "A" should contain wildcards because subtraction from constants + (e.g. "/usr\-usr/" or "/usr\-home/") is meaningless. + + Don't try "A\-B\+C" because "\+" is not addition operator. + +Fix 2007/05/24 + + @ Fix autobind hook. + + The location to call SAKURA_MayAutobind() in net/ipv4/udp.c + and net/ipv6/udp.c were wrong. + +Fix 2007/06/03 + + @ Add a space in MakeMountOptions(). + + I forgot to add a space after "atime" and "noatime". + +Version 1.4.1 2007/06/05 Minor update release. + +Fix 2007/07/04 + + @ Fix ReadAddressGroupPolicy() bug. + + ReadAddressGroupPolicy() fails if both "path_group" and "address_group" are used + because I forgot to set "head->read_var1 = NULL". + +Fix 2007/07/10 + + @ Add compat_sys_stime() hook. + + Some of 64bit kernels support compat_sys_stime() + but permission check was missing. + +Version 1.4.2 2007/07/13 Bug fix release. + +Fix 2007/08/06 + + @ Remove mount-flags manipulation. + + Until now, administrator is permitted to turn on/off specific mount options + regardless of mount options passed to kernel. + I removed this feature because "exact option matching" sounds better than + "automatic option enabler/disabler". + + @ Remove /proc/ccs/info/mapping . + + I removed /proc/ccs/info/mapping because nobody seems to use this feature. + + @ Call external policy loader automatically. + + Until now, users had to add init=/.init parameter to load policy + before /sbin/init starts. + I inserted call_usermodehelper() to call external policy loader when + execve("/sbin/init") is requested and external policy loader exists. + + This change will remove init=/.init parameter from most environment, + although call_usermodehelper() can't handle interactive operations. + + @ Move external policy loader from /.init to /sbin/ccs-init . + + Installing programs in / directory is not good for packaging. + +Fix 2007/08/13 + + @ Update external policy loader. + + It turned out that /sbin/ccs-init invoked via call_usermodehelper() + can handle interactive operations by opening /dev/console . + Now, there is no difference between init=/sbin/ccs-init and + call_usermodehelper("/sbin/ccs-init"), and users no longer need to + add init=/sbin/ccs-init parameter to load policy before /sbin/init starts. + +Fix 2007/08/14 + + @ Update recvmsg() hooks. + + Until now, it was impossible to apply network access control for + incoming UDP and RAW packets if they are brought to userland using + read() or recvmsg() with NULL address because address buffer is NULL. + I moved hooks from sock_recvmsg() to skb_recv_datagram() so that + network access control for incoming UDP and RAW packets always work. + +Fix 2007/08/16 + + @ Return appropriate error code for CheckMountPermission(). + + I was returning -EPERM if something is wrong with CheckMountPermission(). + But SELinux determines whether selinuxfs is supported by kernel + based on whether error code is -ENODEV or not. + So I stopped returning -EPERM unconditionally. + +Fix 2007/08/17 + + @ Remove initializer directive. + + Use "initialize_domain" instrad of "initializer". + +Fix 2007/08/21 + + @ Fix "allow_argv0 ... if if ..." bug. + + It was impossible to use a word "if" to the second argument of + allow_argv0 if condition part is used. + +Fix 2007/08/24 + + @ Move /proc/ccs/\*/\* to /proc/ccs/\* . + + Some pathnames for /proc/ccs/ interface were changed. + +Fix 2007/09/05 + + @ Drop MSG_PEEK'ed message before skb_free_datagram(). + + I need to remove head message from unwanted source + from socket's receive queue so that the caller can pick up + next message from wanted source with MSG_PEEK flags. + +Version 1.5.0 2007/09/20 Usability enhancement release. + +Fix 2007/09/27 + + @ Avoid eating memory after quota exceeded. + + Although ACL entries in a domain won't be added if the domain's quota + has exceeded, SaveName() in AddFileACL() is called anyway. + This caused unneeded memory consumption. + + Now, quota checking is done before getting domain_acl_lock lock. + This may exceed quota by one or two entries, but that won't matter. + +Fix 2007/10/16 + + @ Add environment variable check. + + There are environment variables that may cause dangerous behavior + like LD_\* . + So I introduced 'allow_env' directive that allows specified + environment variable inherited to next domain. + Unlike other permissions, this check is done at execve() time + using next domain's ACL information. + + To manage commonly inherited environments like PATH , + you can use 'allow_env' directive in exception policy + to globally grant specified environment variable. + +Fix 2007/11/05 + + @ Replace semaphore with mutex. + + I replaced semaphore with mutex. + + @ Add missing down() in AddReservedEntry(). + + Mutex debugging capability told me that I had forgotten to call down() + since TOMOYO version 1.3.2 . + This function is not called by learning mode, + so the semaphore's counter will not overflow for normal usage. + +Fix 2005/11/27 + + @ Fix ReadTable() truncation bug. + + "snprintf(str, size, format, ...) >= size" means truncated. + But I was checking for "snprintf(str, size, format, ...) > size". + As a result, some entries might be dumped without '\n'. + + @ Purge direct "->prev"/"->next" manipulation. + + All list manipulations use "struct list_head" or "struct list1_head". + "struct list1_head" doesn't have "->prev" member to save memory usage. + +Fix 2007/11/29 + + @ Add missing semaphore in GetEXE(). + + mm->mmap_sem was missing. + +Fix 2007/12/17 + + @ Remove unused EXPORT_SYMBOL(). + + Mark some functions static. + +Fix 2007/12/18 + + @ Fix AddMountACL() rejection bug. + + To my surprise, "mount --bind source dest" accepts + not only "both source and dest are directory" + but also "both source and dest are non-directory". + I was rejecting if dest is not a derectory in AddMountACL(). + + @ Change log format. + + Profile number and mode is added in audit logs. + +Fix 2008/01/03 + + @ Change directive for file's read/write/execute permission. + + Directives for file's read/write/execute permissions were + 4/2/1 respectively. But for easier understanding, they are now + replaced by read/write/execute (e.g. "allow_read" instead of "4"). + But for easier inputting, 4/2/1 are still accepted instead of + allow_read/allow_write/allow_execute respectively. + + @ Change internal data structure. + + Since I don't have more than 16 types of file permissions, + I combined them using bit-fields. + + Each entry had a field for conditional permission support. + But since this field is unlikely used, I separated the field from + common part. + + These changes will reduce memory used by policy. + +Fix 2008/01/15 + + @ Add ptrace() hook. + + To prevent attackers from controlling important processes using + ptrace(), I added a hook for ptrace(). + Most programs (except strace(1) and gdb(1)) won't use ptrace(2).