Patch Name: PHCO_31246 Patch Description: s700_800 11.11 sed(1) cumulative patch Creation Date: 04/08/02 Post Date: 04/08/30 Hardware Platforms - OS Releases: s700: 11.11 s800: 11.11 Products: N/A Filesets: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP Automatic Reboot?: No Status: General Release Critical: Yes PHCO_31246: ABORT Category Tags: defect_repair general_release critical halts_system Path Name: /hp-ux_patches/s700_800/11.X/PHCO_31246 Symptoms: PHCO_31246: ( SR:8606369189 CR:JAGaf29733 ) sed (1) dumps core if the hold space required increases beyond 4096 bytes. Defect Description: PHCO_31246: ( SR:8606369189 CR:JAGaf29733 ) When the hold space of sed(1) grows beyond 4096 bytes one of the pointers to this buffer gets dereferenced resulting in further writes to hold space corrupting the heap and causing sed(1) to coredump. The defect can be reproduced with the following steps: 1. Create a 'testfile' which has size greater than 4k. For example, use the following script: I=0 while [[ $I -lt 100 ]] do echo "This is line $I, and this is to make the \ line a bit longer" I=$(($I+1)) done > testfile 2. Use sed(1) on the testfile and reverse the lines as follows: $ sed -n -e '2,$ G' -e '1,$ h' -e '$ g' -e '$ p' testfile Memory fault(coredump) In step 2, sed(1) core dumps when sed(1) should have continued to reverse the lines. Resolution: Now sed(1) has been modified in such a way that it can handle hold space greater than 4096 bytes. Enhancement: No SR: 8606369189 Patch Files: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/sed what(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: /usr/bin/sed: sed1.c $Date: 2004/07/21 12:18:57 $Revision: r11.11/ 1 PATCH_11.11 (PHCO_31246) $Revision: vw: -f selectors: R11.11_BL2004_0802_2 PHCO_31246 'R11.11_BL2004_0802_2' cksum(1) Output: OS-Core.UX-CORE,fr=B.11.11,fa=HP-UX_B.11.11_32/64,v=HP: 2275464824 40960 /usr/bin/sed Patch Conflicts: None Patch Dependencies: None Hardware Dependencies: None Other Dependencies: None Supersedes: None Equivalent Patches: None Patch Package Size: 40 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 PHCO_31246 5. Run swinstall to install the patch: swinstall -x autoreboot=true -x patch_match_target=true \ -s /tmp/PHCO_31246.depot By default swinstall will archive the original software in /var/adm/sw/save/PHCO_31246. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above: -x patch_save_files=false WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature. For future reference, the contents of the PHCO_31246.text file is available in the product readme: swlist -l product -a readme -d @ /tmp/PHCO_31246.depot To put this patch on a magnetic tape and install from the tape drive, use the command: dd if=/tmp/PHCO_31246.depot of=/dev/rmt/0m bs=2k Special Installation Instructions: None