lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 24 Sep 2006 15:58:36 +0200
From:	Denis Vlasenko <vda.linux@...glemail.com>
To:	John Coffman <johninsd@....rr.com>
Cc:	linux-kernel@...r.kernel.org
Subject: lilo 22.7.3 corrupts initrd with large kernel images

Hello John,

It seems that lilo does something incorrectly with initrd image
if kernel image is around 3MB. I found this when I built Linux 2.6.18
and it failed to mount initrd. Previously I was using 2.6.17.11_64
and earlier kernels with no problems.

I tried loading the same image and initrd from DOS with linld and
it worked flawlessly. Then I loaded the image without initrd
using lilo (this worked) and compared dmesg with DOS one.
The obvious related difference is:

 testing NMI watchdog ... OK.
-checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
+checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
 Freeing initrd memory: 1460k freed

Then I built smaller 2.6.18 (excluded some stuff I can boot without)
and it was loaded with initrd using lilo just fine.

More details:

# lilo -V
LILO version 22.7.3

# cd /boot; ls -l */bzImage img-01.gz
-rw-r--r--  1 root root 2615417 Sep 21 21:34 2.6.17.11_64/bzImage (loads ok)
-rw-r--r--  1 root root 3024504 Sep 22 02:34 2.6.18_64/bzImage    (BAD)
-rw-r--r--  1 root root 2687906 Sep 24 15:35 2.6.18_64s/bzImage   (loads ok)
-r--r--r--  1 root root 1495860 Sep  2  2005 img-01.gz    (initrd image)

lilo.conf:

boot=/dev/hda5
lba32
compact
prompt
timeout=40
vga=ask

image=/boot/2.6.18_64/bzImage
    label=2.6.18_64
    initrd=/boot/img-01.gz
    root=/dev/hda5
    append="root=/dev/hda5 init=/bin/sh"
    vga=0

image=/boot/2.6.18_64s/bzImage
    label=2.6.18_64s
    initrd=/boot/img-01.gz
    append="root=/dev/ram init=/linuxrc ROOTMAJ=3 ROOTMIN=5 IPCFG=mac INIT=/init"
    vga=0

image=/boot/2.6.17.11_64/bzImage
    label=2.6.17.11_64
    initrd=/boot/img-01.gz
    append="root=/dev/ram init=/linuxrc ROOTMAJ=3 ROOTMIN=5 IPCFG=mac INIT=/init"
    vga=0

Attached are dmesg outputs from all three boot scenarios:
dmesg_bare    - 2.6.18_64 without initrd using lilo, init=/bin/sh
dmesg_dos     - 2.6.18_64 with initrd using linld, normal boot
dmesg_smaller - 2.6.18_64s with initrd using lilo, normal boot
--
vda

Download attachment "dmesg_bare.bz2" of type "application/x-bzip2" (4988 bytes)

Download attachment "dmesg_smaller.bz2" of type "application/x-bzip2" (5305 bytes)

Download attachment "dmesg_dos.bz2" of type "application/x-bzip2" (5291 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ