Bug 9029

Summary: LILO does not fully initialize map file
Product: [Retired] Red Hat Linux Reporter: cac
Component: liloAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.1   
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: 2000-02-15 22:14:55 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 cac 2000-01-31 23:46:30 UTC
LILO fails to initialize the "name" and "password" strings of the
IMAGE_DESCR struct to zero. LILO relies on strcpy to put a trailing zero in
the field so that the boot loader correctly interprets the field, and
ignores any bytes after the trailing NUL.

This problem does not affect the operation of LILO or the boot process, but
in order to pass Quality Assurance, I need successive builds to produce
bit-wise identical results, and because of the problem the /boot/map file
ends up with random characters in the name and passwd fields.

I believe that a code change along the lines of:

bsect.c:
  static void bsect_common ( ....)
  {
      ...

-  *descr->password = 0;
+  memset (descr->password, 0, MAX_PW + 1);
+  memset (descr->name, 0, MAX_NAME + 1);

      ...
    }

would do the trick.

Comment 1 Jeremy Katz 2002-06-04 05:05:25 UTC
This is perfectly reasonable due to the way that data segments get initialized
on Linux