485 |
domain ACL. For example, |
domain ACL. For example, |
486 |
|
|
487 |
"1 /bin/sh if task.euid!=0" |
"1 /bin/sh if task.euid!=0" |
488 |
|
|
489 |
allows the domain to execute /bin/sh only when the process's euid |
allows the domain to execute /bin/sh only when the process's euid |
490 |
is not 0, and |
is not 0, and |
491 |
|
|
871 |
based on realpath while argv[0] check is done based on the symlink's |
based on realpath while argv[0] check is done based on the symlink's |
872 |
pathname and argv[0], this specification will allow attackers behave |
pathname and argv[0], this specification will allow attackers behave |
873 |
as /bin/cat in the domain of /bin/ls if "/bin/ls and /bin/cat are |
as /bin/cat in the domain of /bin/ls if "/bin/ls and /bin/cat are |
874 |
links to /sbin/busybox" and "the attacker is permitted to create |
links to /sbin/busybox" and "the attacker is permitted to create |
875 |
a symlink named ~/cat that points to /bin/ls" and "the attacker is |
a symlink named ~/cat that points to /bin/ls" and "the attacker is |
876 |
permitted to run /bin/ls". |
permitted to run /bin/ls". |
877 |
So, I changed to compare the basename of realpath and argv[0]. |
So, I changed to compare the basename of realpath and argv[0]. |
959 |
|
|
960 |
Until now, users had to add init=/.init parameter to load policy |
Until now, users had to add init=/.init parameter to load policy |
961 |
before /sbin/init starts. |
before /sbin/init starts. |
962 |
I inserted call_usermodehelper() to call external policy loader when |
I inserted call_usermodehelper() to call external policy loader when |
963 |
execve("/sbin/init") is requested and external policy loader exists. |
execve("/sbin/init") is requested and external policy loader exists. |
964 |
|
|
965 |
This change will remove init=/.init parameter from most environment, |
This change will remove init=/.init parameter from most environment, |
1003 |
|
|
1004 |
@ Remove initializer directive. |
@ Remove initializer directive. |
1005 |
|
|
1006 |
Use "initialize_domain" instrad of "initializer". |
Use "initialize_domain" instead of "initializer". |
1007 |
|
|
1008 |
Fix 2007/08/21 |
Fix 2007/08/21 |
1009 |
|
|
2046 |
kernel 2.6.31 introduced memory leak detection mechanism |
kernel 2.6.31 introduced memory leak detection mechanism |
2047 |
( CONFIG_DEBUG_KMEMLEAK ), TOMOYO no longer needs to use own list. |
( CONFIG_DEBUG_KMEMLEAK ), TOMOYO no longer needs to use own list. |
2048 |
|
|
2049 |
I removed the list to ruduce use of spinlocks. |
I removed the list to reduce use of spinlocks. |
2050 |
|
|
2051 |
@ Rewrite ccs-patch-2.\*.diff . |
@ Rewrite ccs-patch-2.\*.diff . |
2052 |
|
|
2053 |
ccs-patch-2.\*.diff was rewriteen like LSM hooks. |
ccs-patch-2.\*.diff was rewritten like LSM hooks. |
2054 |
|
|
2055 |
@ Don't check "allow_read/write" for open-for-ioctl-only. |
@ Don't check "allow_read/write" for open-for-ioctl-only. |
2056 |
|
|
2066 |
|
|
2067 |
@ Move files from fs/ to security/ccsecurity. |
@ Move files from fs/ to security/ccsecurity. |
2068 |
|
|
2069 |
Config menu section changed from "File systems" to "Security options". |
Config menu section changed from "File systems" to "Security options". |
2070 |
|
|
2071 |
Kernel config symbols changed from CONFIG_SAKURA CONFIG_TOMOYO |
Kernel config symbols changed from CONFIG_SAKURA CONFIG_TOMOYO |
2072 |
CONFIG_SYAORAN to CONFIG_CCSECURITY . |
CONFIG_SYAORAN to CONFIG_CCSECURITY . |
2084 |
the domain which the process belongs to. |
the domain which the process belongs to. |
2085 |
|
|
2086 |
Thus, I added global PID in audit logs. |
Thus, I added global PID in audit logs. |
2087 |
|
|
2088 |
@ Transit to new domain before do_execve() succeeds. |
@ Transit to new domain before do_execve() succeeds. |
2089 |
|
|
2090 |
Permission checks for interpreters and environment variables are |
Permission checks for interpreters and environment variables are |
2173 |
@ Fix size truncation bug at ccs_memcmp(). |
@ Fix size truncation bug at ccs_memcmp(). |
2174 |
|
|
2175 |
ccs_memcmp() was using "u8" for size parameter by error. Therefore, when |
ccs_memcmp() was using "u8" for size parameter by error. Therefore, when |
2176 |
size >= 256 was passed to ccs_memcmp(), it was doing partial comarison |
size >= 256 was passed to ccs_memcmp(), it was doing partial comparison |
2177 |
(incorrect result) or read overrun (CPU stall). |
(incorrect result) or read overrun (CPU stall). |
2178 |
|
|
2179 |
ccs_memcmp() should use "size_t" for size parameter because size of |
ccs_memcmp() should use "size_t" for size parameter because size of |
2218 |
atomic_dec_and_test() for removing an element from a list. |
atomic_dec_and_test() for removing an element from a list. |
2219 |
I moved that operation to garbage collector in order to reduce frequency |
I moved that operation to garbage collector in order to reduce frequency |
2220 |
of mutex_lock()/mutex_unlock() calls. |
of mutex_lock()/mutex_unlock() calls. |
2221 |
|
|
2222 |
|
@ Escape from nested loops correctly. |
2223 |
|
|
2224 |
|
In ccs_read_address_group_policy(), I was escaping from nested loops |
2225 |
|
correctly. But in ccs_read_path_group_policy() and |
2226 |
|
ccs_read_number_group_policy(), I wasn't. |
2227 |
|
|
2228 |
|
As a result, reading path_group and number_group caused kernel oops |
2229 |
|
when they were not read atomically. |
2230 |
|
|
2231 |
|
Fix 2009/11/06 |
2232 |
|
|
2233 |
|
@ Fix incorrect allow_mount audit log. |
2234 |
|
|
2235 |
|
Audit log for allow_mount was using decimal format. |
2236 |
|
It needs to use hexadecimal format. |
2237 |
|
|
2238 |
|
Fix 2009/11/09 |
2239 |
|
|
2240 |
|
@ Add profile version check. |
2241 |
|
|
2242 |
|
To avoid upgrading from TOMOYO 1.6.x to TOMOYO 1.7.x without upgrading |
2243 |
|
/proc/ccs/profile (which results in not protecting the system at all), |
2244 |
|
I added a check for PROFILE_VERSION= . |
2245 |
|
|
2246 |
|
Version 1.7.1 2009/11/11 Fourth anniversary release. |
2247 |
|
|
2248 |
|
Fix 2009/11/13 |
2249 |
|
|
2250 |
|
@ Don't use core_initcall() for initializing lock for GC. |
2251 |
|
|
2252 |
|
Some kernels call TOMOYO's hooks before processing core_initcall(). |
2253 |
|
Thus, I can't use core_initcall() for initializing lock for GC. |
2254 |
|
|
2255 |
|
Fix 2009/11/18 |
2256 |
|
|
2257 |
|
@ Don't check "allow_write" permission for open(O_RDONLY | O_TRUNC). |
2258 |
|
|
2259 |
|
Since TOMOYO checks "allow_truncate" permission rather than "allow_write" |
2260 |
|
permission for O_TRUNC, I need to distinguish open(O_RDONLY | O_TRUNC) |
2261 |
|
and open(O_RDWR | O_TRUNC). But I made a mistake between TOMOYO 1.7.0 and |
2262 |
|
1.7.1 which made it impossible for TOMOYO for kernels 2.6.14 and earlier |
2263 |
|
to distinguish them. |
2264 |
|
|
2265 |
|
Fix 2009/11/27 |
2266 |
|
|
2267 |
|
@ Use newly created domain's name for domain creation audit log. |
2268 |
|
|
2269 |
|
Since 1.7.0 , /proc/ccs/reject_log was by error using existing domain's |
2270 |
|
name when auditing newly created domain's "use_profile" line. |
2271 |
|
|
2272 |
|
Fix 2009/12/12 |
2273 |
|
|
2274 |
|
@ Use rcu_read_lock() for find_task_by_pid(). |
2275 |
|
|
2276 |
|
Since kernel 2.6.18 , caller of find_task_by_pid() needs to call |
2277 |
|
rcu_read_lock() rather than read_lock(&tasklist_lock) because find_pid() |
2278 |
|
uses RCU primitives but spinlock does not prevent RCU callback if |
2279 |
|
preemptive RCU ( CONFIG_PREEMPT_RCU or CONFIG_TREE_PREEMPT_RCU ) is |
2280 |
|
enabled. |
2281 |
|
|
2282 |
|
Fix 2009/12/15 |
2283 |
|
|
2284 |
|
@ Don't check DAC permission if disabled mode. |
2285 |
|
|
2286 |
|
I was checking DAC permissions regarding directory entry modification |
2287 |
|
operations (e.g. mkdir()) even if mode=disabled . It is a waste of CPU |
2288 |
|
resource to check DAC permissions when MAC permissions are not checked. |
2289 |
|
Thus, I modified to skip DAC permission checks if mode=disabled . |
2290 |
|
|
2291 |
|
@ Allow deleting "quota_exceeded" and "transition_failed" entries. |
2292 |
|
|
2293 |
|
To notify users of "this domain has too many entries to hold" and "some |
2294 |
|
process in this domain was not able to perform domain transition", |
2295 |
|
"quota_exceeded" and "transition_failed" messages are used respectively. |
2296 |
|
These messages were not deletable. But it is more convenient for users |
2297 |
|
to be notified again if such events occurred again after tuning policy. |
2298 |
|
Thus, I made these messages deletable. |
2299 |
|
|
2300 |
|
Fix 2009/12/17 |
2301 |
|
|
2302 |
|
@ Don't check read permission in ccs_try_alt_exec(). |
2303 |
|
|
2304 |
|
While I was trying to remove ccs_execve_list list for GC optimization |
2305 |
|
between 1.7.0 and 1.7.1 , a regression which caused TOMOYO to require |
2306 |
|
allow_read permission of the programs specified by execute_handler and |
2307 |
|
denied_execute_handler keywords was introduced. |