1 # This file contains a description of the test cases used to verify
2 # auditing of security relevant syscalls. The information was pulled
3 # from the comment headers in each of the syscall test cases.
9 Verify audit of attempts to check file access permissions.
15 Check read access permissions on a file with read permissions.
17 TESTCASE: unsuccessful
18 Attempt to check write access permissions on a file with read-only
27 Verify audit of attempts to tune kernel clock.
35 TESTCASE: unsuccessful
36 Attempt to set timex mode as test user.
44 Verify audit of attempts to bind a name to a socket.
50 Bind to a privileged port as the super user.
52 TESTCASE: unsuccessful
53 Attempt to bind to a privileged port as a non-privileged user.
61 Verify audit of attempts to set process capabilities.
67 Set capabilities as obtained from capget().
69 TESTCASE: unsuccessful
70 Attempt to set a capability in the effective set that is not in
79 Verify audit of attempts to change working directory.
85 Change working directory to one for which user has access
88 TESTCASE: unsuccessful
89 Attempt to change working directory to one for which user does not
90 have access permissions.
98 Verify audit of attempts to change file access permissions.
104 Modify file access permissions for a file for which user has
105 appropriate permissions to do so.
107 TESTCASE: unsuccessful
108 Attempt to modify file access permissions for a file for which
109 user does not have appropriate permissions to do so.
117 Verify audit of attempts to change file owner and group.
123 Change a file's owner and group as the superuser.
125 TESTCASE: unsuccessful
126 Attempt to change a file's owner and group as regular user.
134 Verify audit of attempts to change system time.
140 Set system time as root user.
142 TESTCASE: unsuccessful
143 Attempt to set system time as test user.
151 Verify audit of attempts to create child processes.
157 Create a child process with CLONE_NEWNS as root user.
159 TESTCASE: unsuccessful
160 Attempt to create a child process with CLONE_NEWNS as test user.
168 Verify audit of attempts to create files.
174 Create a file in a directory for which user has appropriate
177 TESTCASE: unsuccessful
178 Attempt to create a file in a directory for which user does not
179 have appropriate permissions.
187 Verify audit of attempts to delete kernel module entries.
192 Delete module entry as root user.
194 TESTCASE: unsuccessful
195 Attempt to delete module entry as test user.
203 Verify audit of attempts to execute a program.
211 TESTCASE: unsuccessful
212 Attempt to execute a file which does have execute access
221 Verify audit of attempts to change file access permissions.
227 Modify file access permissions for a file for which user has
228 appropriate permissions to do so.
230 TESTCASE: unsuccessful
231 Attempt to modify file access permissions for a file for which
232 user does not have appropriate permissions to do so.
240 Verify audit of attempts to change file owner and group.
246 Change a file's owner and group as the superuser.
248 TESTCASE: unsuccessful
249 Attempt to change a file's owner and group as regular user.
257 Verify audit of attempts to create a child process.
263 Create a child process as root user.
265 TESTCASE: unsuccessful
266 With RLIMIT_NPROC set to 1, attempt to create a child process as
275 Verify audit of attempts to remove extended attributes via a file
282 Remove an extended attribute for a file for which user has
283 appropriate permissions.
285 TESTCASE: unsuccessful
286 Attempt to remove an extended attribute for a file for which
287 user does not have appropriate permissions.
295 Verify audit of attempts to set extended attribute values via a
302 Set an extended attribute value for a file for which user has
303 appropriate permissions.
305 TESTCASE: unsuccessful
306 Attempt to set an extended attribute value for a file for which
307 user does not have appropriate permissions.
315 Verify audit of attempts to initialize loadable kernel modules.
320 Load kernel module as root user.
322 TESTCASE: unsuccessful
323 Attempt to load kernel module as test user.
331 Verify audit of device control operations.
337 Get tty attributes of DEFAULT_DEVICE_FILE.
339 TESTCASE: unsuccessful
340 Attempt to get tty attributes for invalid descriptor.
348 Verify audit of changes to port input/output permissions.
354 Set port permissions as root user.
356 TESTCASE: unsuccessful
357 Attempt to set port permissions as test user.
365 Verify audit of changes to process I/O privilege level.
371 Set I/O privilege level as root user.
373 TESTCASE: unsuccessful
374 Attempt to set I/O privilege level as test user.
382 Verify audit of attempts to change file owner and group.
387 TESTCASE: file successful
388 Change a file's owner and group as the superuser.
390 TESTCASE: file unsuccessful
391 Attempt to change a file's owner and group as regular user.
393 TESTCASE: symlink successful
394 Change a symlink's owner and group as the superuser.
396 TESTCASE: symlink unsuccessful
397 Attempt to change a symlink's owner and group as regular user.
405 Verify audit of attempts to create hard links.
411 Create a hard link in a directory for which user has appropriate
414 TESTCASE: unsuccessful
415 Attempt to create a hard link in a directory for which user does
416 not have appropriate permissions.
424 Verify audit of attempts to remove extended attributes.
429 TESTCASE: file successful
430 Remove an extended attribute for a file for which user has
431 appropriate permissions.
433 TESTCASE: file unsuccessful
434 Attempt to remove an extended attribute for a file for which
435 user does not have appropriate permissions.
437 TESTCASE: symlink successful
438 Remove an extended attribute for a symlink for which user has
439 appropriate permissions.
441 TESTCASE: symlink unsuccessful
442 Attempt to remove an extended attribute for a symlink for which
443 user does not have appropriate permissions.
451 Verify audit of attempts to set extended attribute values.
456 TESTCASE: file successful
457 Set an extended attribute value for a file for which user has
458 appropriate permissions.
460 TESTCASE: file unsuccessful
461 Attempt to set an extended attribute value for a file for which
462 user does not have appropriate permissions.
464 TESTCASE: symlink successful
465 Set an extended attribute value for a symlink for which user has
466 appropriate permissions.
468 TESTCASE: symlink unsuccessful
469 Attempt to set an extended attribute value for a symlink for which
470 user does not have appropriate permissions.
478 Verify audit of attempts to create directories.
484 Create a directory within a directory for which user has
485 appropriate permissions.
487 TESTCASE: unsuccessful
488 Attempt to create a directory within a directory for which user
489 does not have appropriate permissions.
497 Verify audit of attempts to create special files.
503 Create a special file in a directory for which user has
504 appropriate permissions.
506 TESTCASE: unsuccessful
507 Attempt to create a special file in a directory for which user
508 does not have appropriate permissions.
516 Verify audit of attempts to mount filesystems.
522 Mount a filesystem at a directory for which user has appropriate
525 TESTCASE: unsuccessful
526 Attempt to mount a filesystem at a directory for which user
527 does not have appropriate permissions.
535 Verify audit of attempts perform message control operations.
540 TESTCASE: remove successful
541 Remove a message queue.
543 TESTCASE: remove unsuccessful
544 Attempt to remove a message queue with insufficient access
547 TESTCASE: setperms successful
548 Change message queue permissions.
550 TESTCASE: setperms unsuccessful
551 Attempt to change message queue permissions, while having
552 insufficient access permissions.
560 Verify audit of attempts to create/get message queue identifiers.
566 Get identifier for an existing message queue.
568 TESTCASE: unsuccessful
569 Attempt to create a new message queue with the key of an existing
570 message queue (specifying IPC_EXCL).
578 Verify audit of attempts to read messages from a message queue.
584 Read a message from a message queue.
586 TESTCASE: unsuccessful
587 Attempt to read a message from a message queue with
588 insufficient access permissions.
596 Verify audit of attempts to append messages to a message queue.
602 Append a message to a message queue.
604 TESTCASE: unsuccessful
605 Attempt to append a message to a message queue with insufficient
614 Verify audit of attempts to open files.
620 Open a file for which user has access permissions.
622 TESTCASE: unsuccessful
623 Attempt to open a file for which user does not have access
632 Verify audit of attempts to trace a process.
638 Perform a PTRACE_ATTACH to a new child process.
640 TESTCASE: unsuccessful
641 Attempt to PTRACE_ATTACH to the init process.
649 Verify audit of attempts to remove extended attributes.
654 TESTCASE: file successful
655 Remove an extended attribute for a file for which user has
656 appropriate permissions.
658 TESTCASE: file unsuccessful
659 Attempt to remove an extended attribute for a file for which
660 user does not have appropriate permissions.
662 TESTCASE: symlink successful
663 Remove an extended attribute for a symlink for which user has
664 appropriate permissions.
666 TESTCASE: symlink unsuccessful
667 Attempt to remove an extended attribute for a symlink for which
668 user does not have appropriate permissions.
676 Verify audit of attempts change the name or location of a file.
682 Rename a file to the name of an existing file.
684 TESTCASE: unsuccessful
685 Attempt to rename a file to the name of an existing file for which
686 user does not have appropriate permissions to modify.
694 Verify audit of attempts to remove a directory.
700 Remove a directory for which user has appropriate permissions.
702 TESTCASE: unsuccessful
703 Attempt to remove a directory for which user does not
704 have appropriate permissions.
712 Verify audit of attempts to perform semaphore control operations.
717 TESTCASE: remove successful
718 Remove a semaphore set.
720 TESTCASE: remove unsuccessful
721 Attempt to remove a semaphore set with insufficient access
724 TESTCASE: setperms successful
725 Change semaphore set permissions.
727 TESTCASE: setperms unsuccessful
728 Attempt to change semaphore set permissions, while having
729 insufficient access permissions.
737 Verify audit of attempts to create/get semaphore set identifiers.
743 Get identifier for an existing semaphore set.
745 TESTCASE: unsuccessful
746 Attempt to create a new semaphore set with the key of an existing
747 semaphore set (specifying IPC_EXCL).
755 Verify audit of attempts to perform semaphore operations.
758 semop(), semtimedop()
761 Perform a semaphore operation.
763 TESTCASE: unsuccessful
764 Attempt to perform a semaphore operation with insufficient access
765 permissions to the set.
773 Verify audit of attempts to set filesystem group identity.
776 setfsgid(), setfsgid32()
778 TESTCASE: modify successful
779 As root, attempt to set fsgid to test user's gid.
781 TESTCASE: nomodify successful
782 As test user with test user gids, attempt to set fsgid to root's gid.
785 A process's fsgid is equivalent to its egid, unless
786 explicitly set by setfsgid().
788 setfsgid() fails when the caller's euid is not root, and the
789 specified fsgid does not match the caller's current real gid,
792 The setfsgid() syscalls do not return any error codes.
800 Verify audit of attempts to set filesystem user identity.
803 setfsuid(), setfsuid32()
805 TESTCASE: modify successful
806 As root, attempt to set fsuid to test user's uid.
808 TESTCASE: nomodify successful
809 As test user attempt to set fsuid to test user's uid+1;
812 A process's fsuid is equivalent to its euid, unless
813 explicitly set by setfsuid().
815 setfsuid() fails when the caller's euid is not root, and the
816 specified fsuid does not match the caller's current real uid,
819 The setfsuid() syscalls do not return any error codes.
827 Verify audit of attempts to set effective group identity.
833 As root, attempt to set egid to test user's gid.
835 TESTCASE: unsuccessful
836 As test user with test user gids, attempt to set egid to root's gid.
844 Verify audit of attempts to set a process's list of supplementary
848 setgroups(), setgroups32()
851 As root, set the list of supplementary group IDs to the values in
852 the list returned by getgroups().
854 TESTCASE: unsuccessful
855 As test user, attempt to set the list of supplementary group IDs
856 to the list obtained as root user.
864 Verify audit of attempts to set real group identity.
867 setregid(), setregid32()
870 As root, attempt to set rgid to the test user's gid.
871 Effective gid is left unchanged.
873 TESTCASE: unsuccessful
874 As test user with test user gids, attempt to set rgid to root's
875 gid. Effective gid is left unchanged.
883 Verify audit of attempts to set saved group identity.
886 setresgid(), setresgid32()
889 As root, attempt to set saved gid to test user's gid. Real and
890 effective gids are left unchanged.
892 TESTCASE: unsuccessful
893 AS test user with test user gids, attempt to set saved gid to
894 root's gid. Real and effective gids are left unchanged.
902 Verify audit of attempts to set saved user identity.
905 setresuid(), setresuid32()
908 As root, attempt to set saved uid to test user's uid. Real and
909 effective uids are left unchanged.
911 TESTCASE: unsuccessful
912 AS test user, attempt to set saved uid to test user's uid+1;
913 Real and effective uids are left unchanged.
921 Verify audit of attempts to set real user identity.
924 setreuid(), setreuid32()
927 As root, attempt to set real uid to test user's uid.
928 Effective uid is left unchanged.
930 TESTCASE: unsuccessful
931 As test user, attempt to set real uid to test user's uid+1;
932 Effective uid is left unchanged.
940 Verify audit of attempts to change system time.
946 Set system time as root user.
948 TESTCASE: unsuccessful
949 Attempt to set system time as test user.
957 Verify audit of attempts to set effective user identity.
963 As root, attempt to set euid to root uid. Dropping priveleges
964 with setuid() would result in not being able to resume priveleges
965 to search the audit log for the resulting record.
967 TESTCASE: unsuccessful
968 As test user, attempt to set euid to test user's uid+1;
976 Verify audit of attempts to set extended attribute values.
981 TESTCASE: file successful
982 Set an extended attribute value for a file for which user has
983 appropriate permissions.
985 TESTCASE: file unsuccessful
986 Attempt to set an extended attribute value for a file for which
987 user does not have appropriate permissions.
989 TESTCASE: symlink successful
990 Set an extended attribute value for a symlink for which user has
991 appropriate permissions.
993 TESTCASE: symlink unsuccessful
994 Attempt to set an extended attribute value for a symlink for which
995 user does not have appropriate permissions.
1003 Verify audit of attempts to attach to a shared memory segment.
1008 TESTCASE: remove successful
1009 Attach to an existing shared memory segment.
1011 TESTCASE: remove unsuccessful
1012 Attempt to attach to an existing shared memory segment with
1013 insufficient access permissions.
1021 Verify audit of attempts to perform shared memory control operations.
1026 TESTCASE: remove successful
1027 Mark a shared memory segment as destroyed.
1029 TESTCASE: remove unsuccessful
1030 Attempt to mark a shared memory segment as destroyed with
1031 insufficient access permissions.
1033 TESTCASE: setperms successful
1034 Change shared memory segment permissions.
1036 TESTCASE: setperms unsuccessful
1037 Attempt to change shared memory segment permissions, while having
1038 insufficient access permissions.
1046 Verify audit of attempts to create/get identifiers for shared
1052 TESTCASE: successful
1053 Get identifier for an existing shared memory segment.
1055 TESTCASE: unsuccessful
1056 Attempt to create a new shared memory segment with the key of an
1057 existing shared memory segment (specifying IPC_EXCL).
1065 Verify audit of attempts to change system time.
1070 TESTCASE: successful
1071 Set system time as root user.
1073 TESTCASE: unsuccessful
1074 Attempt to set system time as test user.
1082 Verify audit of attempts to start swapping to a file/device.
1087 TESTCASE: successful
1088 Start swapping to a file as the super user.
1090 TESTCASE: unsuccessful
1091 Attempt to start swapping to a file as an unprivileged user.
1097 This program is free software: you can redistribute it and/or modify
1098 it under the terms of version 2 the GNU General Public License as
1099 published by the Free Software Foundation.
1101 This program is distributed in the hope that it will be useful,
1102 but WITHOUT ANY WARRANTY; without even the implied warranty of
1103 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1104 GNU General Public License for more details.
1106 You should have received a copy of the GNU General Public License
1107 along with this program. If not, see <http://www.gnu.org/licenses/>.
1109 Implementation written by HP, based on original code from IBM.
1115 Verify audit of attempts to create symbolic links.
1120 TESTCASE: successful
1121 Create a symlink in a directory for which user has appropriate
1124 TESTCASE: unsuccessful
1125 Attempt to create a symlink in a directory for which user does
1126 not have appropriate permissions.
1134 Verify audit of attempts to truncate a file to a specified length.
1137 truncate(), truncate64()
1139 TESTCASE: successful
1140 Trucate a file for which user has appropriate permissions.
1142 TESTCASE: unsuccessful
1143 Attempt to truncate a file for which user does not have
1144 appropriate permissions.
1152 Verify audit of changes to file creation mask.
1157 TESTCASE: successful
1158 Set umask to current umask value.
1161 umask() always succeeds.
1169 Verify audit of attempts to remove a name from the filesystem.
1174 TESTCASE: successful
1175 Remove a name for which user has appropriate permissions.
1177 TESTCASE: unsuccessful
1178 Attempt to remove a name for which user does not have appropriate
1187 Verify audit of attempts to change file access/modification times.
1192 TESTCASE: successful
1193 Change file access and modification times for a file for which
1194 user has appropriate permissions.
1196 TESTCASE: unsuccessful
1197 Attempt to change file access and modification times for a file
1198 for which user does not have appropriate permissions.