2441 |
permissions (e.g. allow_env PATH if symlink.target="/"), it triggered |
permissions (e.g. allow_env PATH if symlink.target="/"), it triggered |
2442 |
NULL pointer dereference. |
NULL pointer dereference. |
2443 |
|
|
2444 |
Fix 2010/09/01 |
Fix 2010/10/28 |
2445 |
|
|
2446 |
|
@ Fix umount() pathname calculation. |
2447 |
|
|
2448 |
|
"mount --bind /path/to/file1 /path/to/file2" is legal. |
2449 |
|
Therefore, "umount /path/to/file2" is also legal. |
2450 |
|
Do not automatically append trailing '/' if pathname to be unmounted |
2451 |
|
does not end with '/'. |
2452 |
|
|
2453 |
|
@ Add preserve KABI compatibility option. (2.6 kernels only) |
2454 |
|
|
2455 |
|
TOMOYO needs "struct ccs_domain_info *" and "u32" for each |
2456 |
|
"struct task_struct". But embedding these variables into |
2457 |
|
"struct task_struct" breaks KABI for prebuilt kernel modules (which |
2458 |
|
means that you will need to rebuild prebuilt kernel modules). |
2459 |
|
|
2460 |
|
Since KABI is commonly used (compared to 5 years ago), asking users to |
2461 |
|
rebuild kernel modules which are not included in kernel package is no |
2462 |
|
longer preferable. Therefore, I added a new option that keeps |
2463 |
|
"struct task_struct" unmodified in order to keep KABI. |
2464 |
|
|
2465 |
|
Note that you have to use ccs-patch-2.6.\*.diff which patches |
2466 |
|
kernel/fork.c in order to use this option. Otherwise, TOMOYO will leak |
2467 |
|
memory whenever "struct task_struct" is released. |
2468 |
|
|
2469 |
@ Change directives. |
@ Change directives. |
2470 |
|
|
2503 |
when you have to disable access control for recv() operation due to |
when you have to disable access control for recv() operation due to |
2504 |
application breakage by discarding incoming datagram. |
application breakage by discarding incoming datagram. |
2505 |
|
|
|
@ Wait for next connection/datagram if current connection/datagram was |
|
|
discarded. |
|
|
|
|
|
Regarding "network inet stream accept", "network inet dgram recv", |
|
|
"network inet raw recv" directives, I modified to wait for next |
|
|
connection/datagram if current connection/datagram was discarded. |
|
|
LSM hooks for these directives are currently missing because this |
|
|
behavior may break applications. If you found applications broken by |
|
|
this behavior, you can set CONFIG::network::inet_stream_accept and/or |
|
|
CONFIG::network::inet_dgram_recv and/or CONFIG::network::inet_raw_recv |
|
|
to mode=disabled in order to only disable filtering for incoming |
|
|
connection/datagram. |
|
|
|
|
2506 |
@ Add Unix domain socket restriction support. |
@ Add Unix domain socket restriction support. |
2507 |
|
|
2508 |
Until now, it was possible to restrict only inet domain sockets (i.e. |
Until now, it was possible to restrict only inet domain sockets (i.e. |
2580 |
"ignore_global_allow_read" and "ignore_global_allow_env" directives were |
"ignore_global_allow_read" and "ignore_global_allow_env" directives were |
2581 |
removed from domain policy and "use_group" keyword was added. |
removed from domain policy and "use_group" keyword was added. |
2582 |
|
|
2583 |
|
@ Remove "if" and "; set" keyword. |
2584 |
|
|
2585 |
|
I removed need for specifying these keyword. |
2586 |
|
You can simply specify like below. |
2587 |
|
|
2588 |
|
file read /etc/shadow task.uid=0 |
2589 |
|
|
2590 |
|
@ Remove "file_pattern" keyword. |
2591 |
|
|
2592 |
|
I removed "file_pattern" keyword because it is impossible to predefine |
2593 |
|
all possible pathname patterns. Also, learning pathnames using incomplete |
2594 |
|
patterns makes it difficult to later replace using "path_group" keyword. |
2595 |
|
|
2596 |
|
@ Replace verbose= parameter with statistic interface. |
2597 |
|
|
2598 |
|
Since it is noisy if a lot of policy violation messages are printed, |
2599 |
|
I removed printk(). To be able to check whether policy violation occurred |
2600 |
|
or not, I introduced /proc/ccs/stat interface which counts number of |
2601 |
|
policy violations occurred. You can firstly check /proc/ccs/stat and then |
2602 |
|
check /proc/ccs/reject_log . |
2603 |
|
|
2604 |
|
@ Remove global preference. |
2605 |
|
|
2606 |
|
I removed global preference in order to make code simpler. |
2607 |
|
|
2608 |
@ Allow controlling generation of access granted logs for per an entry |
@ Allow controlling generation of access granted logs for per an entry |
2609 |
basis. |
basis. |
2610 |
|
|
2611 |
I added per-entry flag which controls generation of grant logs because |
I added per-entry flag which controls generation of grant logs because |
2612 |
Xen and KVM issues ioctl requests so frequently. For example, |
Xen and KVM issues ioctl requests so frequently. For example, |
2613 |
|
|
2614 |
file ioctl /dev/null 0x5401 if audit=no |
file ioctl /dev/null 0x5401 grant_log=no |
2615 |
|
|
2616 |
will suppress /proc/ccs/grant_log even if profile says grant_log=yes . |
will suppress /proc/ccs/grant_log even if preference says grant_log=yes . |
2617 |
|
|
2618 |
file ioctl /dev/null 0x5401 if audit=yes |
file ioctl /dev/null 0x5401 grant_log=yes |
2619 |
|
|
2620 |
will generate /proc/ccs/grant_log even if profile says grant_log=no . |
will generate /proc/ccs/grant_log even if preference says grant_log=no . |
2621 |
|
|
2622 |
file ioctl /dev/null 0x5401 |
file ioctl /dev/null 0x5401 |
2623 |
|
|
2624 |
will generate /proc/ccs/grant_log only if profile says grant_log=yes . |
will generate /proc/ccs/grant_log only if preference says grant_log=yes . |
2625 |
|
|
2626 |
This flag is intended for frequently accessed resources like |
This flag is intended for frequently accessed resources like |
2627 |
|
|
2628 |
file read /var/www/html/\{\*\}/\*.html if audit=no |
file read /var/www/html/\{\*\}/\*.html grant_log=no |
2629 |
|
|
2630 |
. |
. |
2631 |
|
|
|
@ Change profile structure. |
|
|
|
|
|
To make it clear that preferences can be specified by per-profile basis, |
|
|
I removed global preference ("PREFERENCE::"). Now, you need to explicitly |
|
|
specify per-profile preference ("$profilenumber-PREFERENCE::"). |
|
|
|
|
|
I changed default mode for access grant logs from "yes" to "no". |
|
|
You may change mode to "yes" if you want all grant logs to be generated. |
|
|
You may override mode using "if audit=yes" if you want specific grant |
|
|
logs to be generated. |
|
|
|
|
|
Since printing all warning/error messages to console is noisy, |
|
|
I changed verbose mode control from per-preference basis to |
|
|
per-functionality basis. Now, you can selectively print warning/error |
|
|
messages. |
|
|
|
|
2632 |
@ Automatically create domain by execve() even if enforcing mode. |
@ Automatically create domain by execve() even if enforcing mode. |
2633 |
|
|
2634 |
Until now, new domains are not created if the domain was not defined and |
Until now, new domains are not created if the domain was not defined and |
2662 |
@ Add "task auto_domain_transition". |
@ Add "task auto_domain_transition". |
2663 |
|
|
2664 |
This is similar to "task manual_domain_transition", but is automatically |
This is similar to "task manual_domain_transition", but is automatically |
2665 |
applied if conditions are met. For example, |
applied whenever conditions are met. For example, |
2666 |
|
|
2667 |
task auto_domain_transition <kernel> //./non-root if task.uid!=0 |
task auto_domain_transition <kernel> //./non-root task.uid!=0 |
2668 |
|
|
2669 |
will automatically jump to "<kernel> //./non-root" domain if current |
will automatically jump to "<kernel> //./non-root" domain if current |
2670 |
process's UID is not 0 whereas |
process's UID is not 0 whereas |
2671 |
|
|
2672 |
task manual_domain_transition <kernel> //./non-root if task.uid!=0 |
task manual_domain_transition <kernel> //./non-root task.uid!=0 |
2673 |
|
|
2674 |
will jump to "<kernel> //./non-root" domain if current process's UID is |
will jump to "<kernel> //./non-root" domain if current process's UID is |
2675 |
not 0 and current process wrote "<kernel> //./non-root" + '\n' to |
not 0 and current process wrote "<kernel> //./non-root" + '\n' to |