Bug 9029 - LILO does not fully initialize map file
LILO does not fully initialize map file
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: lilo (Show other bugs)
6.1
All Linux
medium Severity low
: ---
: ---
Assigned To: Michael K. Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-31 18:46 EST by cac
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-15 17:14:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description cac 2000-01-31 18:46:30 EST
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 01:05:25 EDT
This is perfectly reasonable due to the way that data segments get initialized
on Linux

Note You need to log in before you can comment on or make changes to this bug.