Patch-ID# 100988-05 Keywords: ufs mapsearch corruption frag freeing unlink locking limits security Synopsis: SunOS 4.1.3: UFS File system and NFS locking Patch Date: May/20/96 Solaris Release: 1.1 SunOS Release: 4.1.3 Unbundled Product: Unbundled Release: Note: This patch is also available for 4.1.2 as 102703, 4.1.3_U1 as 101592 and for 4.1.4 as 102516. BugId's fixed with this patch: 1243416 1141100 1198894 1146022 1118195 1121151 1122110 1118195 1078521 1039693 1082206 1071839 1102884 1100860 1077035 1063470 1075369 1104800 1103986 1115612 1077402 1080359 1040406 1046373 1063692 1064183 1071435 1074757 1097368 1086371 1078771 1115083 1113852 1161351 1170583 1164993 1170918 1154882 1100013 1084207 1178842 1172008 1183488 Changes incorporated in this version: 1243416 Relevant Architecture: sparc NOTE: sun4(all) Patches which may conflict with this patch: 100505 100548 100575 100731 Patches required with this patch: 101832-02 NOTE: if a CD-ROM-based filesystem on the same machine will be NFS-exported. Other patches this accumulates and obsoletes: 100623 100075 100965 101021 Obsoleted by: Files included with this patch: etc/rpc.lockd etc/rpc.statd ufs/lockf.h sun4/ufs_lockf.o sun4/ufs_vnodeops.o sun4/ufs_bmap.o sun4/ufs_inode.o sun4/ufs_dir.o sun4/ufs_vfsops.o sun4/vfs.o sun4/fsirand sun4/quota_ufs.o sun4c/ufs_lockf.o sun4c/ufs_vnodeops.o sun4c/ufs_bmap.o sun4c/ufs_inode.o sun4c/ufs_dir.o sun4c/ufs_vfsops.o sun4c/vfs.o sun4c/fsirand sun4c/quota_ufs.o sun4m/ufs_lockf.o sun4m/ufs_vnodeops.o sun4m/ufs_bmap.o sun4m/ufs_inode.o sun4m/ufs_dir.o sun4m/ufs_vfsops.o sun4m/vfs.o sun4m/fsirand sun4m/quota_ufs.o sun4m/ufs_alloc.o NOTE: sun4m/ufs_alloc.o (sun4m only) Problem Descriptions: -05 Rev: 1243416 statd security problem -04 Rev: 1078521 Zero length directories can be left when a system is powered off 1039693 panic: ifree: freeing free inode 1082206 bmap references block after calling brelse 1071839 iget shouldn't hammer i_flag when reclaiming an inode 1102884 panic: iinactive: VN_HOLD not done in iget() when inode is not incache causing corruption of inode free list. 1100860 Use of sticky bit on plain files causes corrupt inodes 1077035 Files with the sticky bit turned on are not updating the inode cache when it is flushed due to heavy file system activity. 1063470 Non-random file handles can be guessed, leading to security hole. 1075369 panic in ufs_putpage hole when running application on an NFS client. 1104800 When a user's process has no controlling terminal and is the cause for the user exceeding his disk quotas, error messages are sent to the console. The messages now display the uid of the user and pid of offending process. 1078521 panic: dup ialloc 1106986 panic: umount on exported filesys 1115612 panic: alloccgblk: can't find blk in cyl occurred during LADDIS Benchmark run (sun4m only) 1183488 The system panics when the application which uses Informix version 5 is running. 1178842 Patch 101784-03: fixes bug 1178842 which caused Assertion failed panic 1172008 fcntl behaves differently between local and NFS locking 1170918 File locking on remotly mounted r/o cdrom fails. 1164993 Using a 4.X CDROM server for doing Solaris 2.x net installations fails due to a 4.X hsfs bug. 1170583 Read Locks on remotely mounted CDROM file systems. 1161351 Under a reasonable load the lock daemon deadlocks. 1086371 rpc.lockd does not respond correctly to lock requests from machines in other DNS 1078771 nfs locking can't crash recover across domains 1115083 PC client locks not freed on client reboot 1113852 rpc.lockd dumps core in routine proc_priv_crash() -03 Rev: 1141100 Machine panics with irele when doing a unlink -02 & -01 Rev: 1198894 System panics ( mapsearch,freeing free frag) when users it quota limits on 4.x. 1146022 Mandatory locking gets set when it shouldn't. 1118195 Panic: ifree: freeing free inode. 1121151 Panic: alloccgblk: can't find blk in cyl. 1126760 Write() requests which fail due to ENOSPC will still set the file size. 1122110 Fsck fails to fix a corrupted directory after a ufs panic. Patch Installation Instructions: AS ROOT: 1. Save FCS version of the file: mv /usr/etc/rpc.lockd /usr/etc/rpc.lockd.FCS mv /usr/etc/rpc.statd /usr/etc/rpc.statd.FCS mv /sys/ufs/lockf.h /sys/ufs/lockf.h.FCS mv /usr/include/ufs/lockf.h /usr/include/ufs/lockf.h.FCS mv /sys/`arch -k`/OBJ/ufs_vnodeops.o /sys/`arch -k`/OBJ/ufs_vnodeops.o.FCS mv /sys/`arch -k`/OBJ/ufs_lockf.o /sys/`arch -k`/OBJ/ufs_lockf.o.FCS mv /sys/`arch -k`/OBJ/ufs_bmap.o /sys/`arch -k`/OBJ/ufs_bmap.o.FCS mv /sys/`arch -k`/OBJ/ufs_inode.o /sys/`arch -k`/OBJ/ufs_inode.o.FCS mv /sys/`arch -k`/OBJ/ufs_dir.o /sys/`arch -k`/OBJ/ufs_dir.o.FCS mv /sys/`arch -k`/OBJ/ufs_vfsops.o /sys/`arch -k`/OBJ/ufs_vfsops.o.FCS mv /sys/`arch -k`/OBJ/vfs.o /sys/`arch -k`/OBJ/vfs.o.FCS mv /sys/`arch -k`/OBJ/quota_ufs.o /sys/`arch -k`/OBJ/quota_ufs.o.FCS mv /usr/etc/fsirand /usr/etc/fsirand.FCS For sun4m only: mv /sys/`arch -k`/OBJ/ufs_alloc.o /sys/`arch -k`/OBJ/ufs_alloc.o.FCS 2. Copy the patched file: cp etc/rpc.lockd /usr/etc/rpc.lockd cp etc/rpc.statd /usr/etc/rpc.statd cp ufs/lockf.h /usr/include/ufs cp ufs/lockf.h /sys/ufs cp `arch -k`/ufs_vnodeops.o /sys/`arch -k`/OBJ/ufs_vnodeops.o cp `arch -k`/ufs_lockf.o /sys/`arch -k`/OBJ/ufs_lockf.o cp `arch -k`/ufs_bmap.o /sys/`arch -k`/OBJ/ufs_bmap.o cp `arch -k`/ufs_inode.o /sys/`arch -k`/OBJ/ufs_inode.o cp `arch -k`/ufs_dir.o /sys/`arch -k`/OBJ/ufs_dir.o cp `arch -k`/ufs_vfsops.o /sys/`arch -k`/OBJ/ufs_vfsops.o cp `arch -k`/vfs.o /sys/`arch -k`/OBJ/vfs.o cp `arch -k`/quota_ufs.o /sys/`arch -k`/OBJ/quota_ufs.o cp `arch -k`/fsirand /usr/etc/fsirand For Sun4m only: cp `arch -k`/ufs_alloc.o /sys/`arch -k`/OBJ/ufs_alloc.o 3. Set proper permissions and ownership: chmod 755 /usr/etc/rpc.lockd /usr/etc/rpc.statd chown root.staff /usr/etc/rpc.lockd /usr/etc/rpc.statd chmod 444 /usr/include/ufs/lockf.h chown root.staff /usr/include/ufs/lockf.h chmod 444 /sys/ufs/lockf.h chown root.staff /sys/ufs/lockf.h chmod 444 /sys/`arch -k`/OBJ/ufs_*.o chown root.staff /sys/`arch -k`/OBJ/ufs_*.o chmod 444 /sys/`arch -k`/OBJ/vfs.o chown root.staff /sys/`arch -k`/OBJ/vfs.o chmod 444 /sys/`arch -k`/OBJ/quota_ufs.o chown root.staff /sys/`arch -k`/OBJ/quota_ufs.o chmod 755 /usr/etc/fsirand chown root.staff /usr/etc/fsirand 4. Rebuild the kernel and reboot the system with the new kernel. Please refer to the System and Networking Administration Manual for details on building and installing a custom kernel.