Patch Name: PHKL_12081 Patch Description: s700 10.10 Auditing, chown, mknod, utime cumulative patch Creation Date: 97/08/20 Post Date: 97/08/29 Hardware Platforms - OS Releases: s700: 10.10 Products: N/A Filesets: OS-Core.CORE-KRN ProgSupport.C-INC Automatic Reboot?: Yes Status: General Superseded Critical: No Path Name: /hp-ux_patches/s700/10.X/PHKL_12081 Symptoms: PHKL_12081: The auditing commands would not function for system calls past number 314. User would see an error such as "Event=????????". Note: in order to take advantage of this change, the commands patches PHCO_12075 and PHCO_12076 must also be installed. PHKL_11825: When a user specifies the owner and group value of a file to be 60,000 (Decimal), the chown command fails. But when he specifies a value of 100,000, the chown command takes the last 16 bits and modifies the ownership of the file. (in this case chown command should fail). According to chown man page, the maximum value for uid and gid should be less than 60,000 and any specified value which is greater than or equal to UID_MAX (60,000) is INVALID and chown should return an error code (EINVAL). PHKL_7761: Setting a negative timestamp with utime() fails PHKL_7507: Submitted to meet ITSEC certification requirements PHKL_6486: mknod with mode S_IFSOCK appears to succeed, though the file it makes doesn't actually do anything. According to XPG4v2 mknod S_IFSOCK should return EINVAL. Defect Description: PHKL_12081: The system constant MAX_SYSCALL, used by auditing, was set to 315, rather then 389 as needed. PHKL_11825: There is NO check in chown() system call for values of uid/gid which are greater or equal to UID_MAX (60,000). uid and gid are of type int (signed) and when they are assigned to va_uid and va_gid for doing a vnode operation, they are casted to 16-bit shorts. So the truncated values are passed onto the file system. uid and gid are defined as: register struct a { char *fname; int uid; int gid; } *uap; And va_uid and va_uid are defined as: u_short va_uid; /* owner user id */ u_short va_gid; /* owner group id */ Now in chown() we are assigning va_uid to uid thus truncating those values to 16-bits. vattr.va_uid = uap->uid; vattr.va_gid = uap->gid; NOTE: Some signed uid/gids are valid. e.g. -2 is used by NFS for "nobody" or "anonymous". We should not be truncating this information by only allowing positive values. All valid negative values fall as unsigned positive values above 60000 and below 65536 (-1 translates to 65535 in 16-bit signed/unsigned conversion). PHKL_7761: Negative time values for file modtimes are not defined in standards. Release 10.0 opted to make such values invalid. Unfortunately, some vendors were using negative times as flags rather than timestamps, and disallowing such values broke the application. The fix was to allow negative timestamps again. PHKL_7507: No defect PHKL_6486: see above SR: 0000000000 1653138164 1653185116 4701311407 5003374389 Patch Files: /usr/conf/h/audit.h /usr/conf/h/audparam.h /usr/conf/lib/libhp-ux.a(audit.o) /usr/conf/lib/libhp-ux.a(getevent.o) /usr/conf/lib/libhp-ux.a(kern_acct.o) /usr/conf/lib/libhp-ux.a(vfs_scalls.o) /usr/include/sys/audit.h /usr/include/sys/audparam.h what(1) Output: /usr/conf/h/audit.h: audit.h $Date: 97/08/20 11:36:35 $ $Revision: 1.9.89.7 $ PATCH_10.10 (PHKL_12081) /usr/conf/h/audparam.h: audparam.h $Date: 97/08/20 11:40:39 $ $Revision: 1.7.89.2 $ PATCH_10.10 (PHKL_12081) /usr/conf/lib/libhp-ux.a(audit.o): audit.c $Date: 97/08/20 11:59:49 $ $Revision: 1.10.89.10 $ PATCH_10.10 (PHKL_12081) /usr/conf/lib/libhp-ux.a(getevent.o): getevent.c $Date: 97/08/20 12:01:56 $ $Revision: 1.8.89.3 $ PATCH_10.10 (PHKL_12081) /usr/conf/lib/libhp-ux.a(kern_acct.o): kern_acct.c $Date: 97/08/20 12:03:15 $ $Revision: 1.26.89.11 $ PATCH_10.10 (PHKL_12081) /usr/conf/lib/libhp-ux.a(vfs_scalls.o): vfs_scalls.c $Date: 97/08/20 12:06:11 $ $Revision: 1.14.89.29 $ PATCH_10.10 (PHKL_12081) /usr/include/sys/audit.h: audit.h $Date: 97/08/20 11:36:35 $ $Revision: 1.9.89.7 $ PATCH_10.10 (PHKL_12081) /usr/include/sys/audparam.h: audparam.h $Date: 97/08/20 11:40:39 $ $Revision: 1.7.89.2 $ PATCH_10.10 (PHKL_12081) cksum(1) Output: 526499695 12965 /usr/conf/h/audit.h 651800207 26412 /usr/conf/h/audparam.h 1155762624 12924 /usr/conf/lib/libhp-ux.a(audit.o) 1575861900 3516 /usr/conf/lib/libhp-ux.a(getevent.o) 1632317999 5756 /usr/conf/lib/libhp-ux.a(kern_acct.o) 2788777813 25268 /usr/conf/lib/libhp-ux.a(vfs_scalls.o) 526499695 12965 /usr/include/sys/audit.h 651800207 26412 /usr/include/sys/audparam.h Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: PHKL_6486 PHKL_7507 PHKL_7761 PHKL_11825 Equivalent Patches: PHKL_12082: s800: 10.10 Patch Package Size: 200 KBytes Installation Instructions: Please review all instructions and the Hewlett-Packard SupportLine User Guide or your Hewlett-Packard support terms and conditions for precautions, scope of license, restrictions, and, limitation of liability and warranties, before installing this patch. ------------------------------------------------------------ 1. Back up your system before installing a patch. 2. Login as root. 3. Copy the patch to the /tmp directory. 4. Move to the /tmp directory and unshar the patch: cd /tmp sh PHKL_12081 5a. For a standalone system, run swinstall to install the patch: swinstall -x autoreboot=true -x match_target=true \ -s /tmp/PHKL_12081.depot 5b. For a homogeneous NFS Diskless cluster run swcluster on the server to install the patch on the server and the clients: swcluster -i -b This will invoke swcluster in the interactive mode and force all clients to be shut down. WARNING: All cluster clients must be shut down prior to the patch installation. Installing the patch while the clients are booted is unsupported and can lead to serious problems. The swcluster command will invoke an swinstall session in which you must specify: alternate root path - default is /export/shared_root/OS_700 source depot path - /tmp/PHKL_12081.depot To complete the installation, select the patch by choosing "Actions -> Match What Target Has" and then "Actions -> Install" from the Menubar. 5c. For a heterogeneous NFS Diskless cluster: - run swinstall on the server as in step 5a to install the patch on the cluster server. - run swcluster on the server as in step 5b to install the patch on the cluster clients. By default swinstall will archive the original software in /var/adm/sw/patch/PHKL_12081. If you do not wish to retain a copy of the original software, you can create an empty file named /var/adm/sw/patch/PATCH_NOSAVE. Warning: If this file exists when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. It is recommended that you move the PHKL_12081.text file to /var/adm/sw/patch for future reference. To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHKL_12081.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None