Bug 168177

Summary: nash uses uninitialised memory.
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-25 20:45:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Jones 2005-09-13 08:57:06 UTC
export MALLOC_PERTURB_=204 
install a kernel, and you'll see this..

ls:
/dev/mapper/VolGroup00-LogVol003333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333:
File name too long

It happens here, in mkinitrd (line 487 or so)

rootdev=$(echo "readlink $rootdev" | /sbin/nash --quiet)

filling in the blanks, and getting a command line that proves this..

(04:51:23:root@nwo:~)# echo "readlink /dev/VolGroup00/LogVol00" | /sbin/nash --quiet
/dev/mapper/VolGroup00-LogVol003333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333


I've not looked at the nash code yet, but this is likely a malloc that needs to
be a calloc someplace.

Comment 1 Peter Jones 2005-09-25 20:45:12 UTC
Fixed, thanks.