Bug 240777 - nash support for spaces in kernel command line
nash support for spaces in kernel command line
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd (Show other bugs)
4.5
All Linux
high Severity high
: ---
: ---
Assigned To: Martin Sivák
David Lawrence
: Reopened
Depends On:
Blocks: 240779 240785
  Show dependency treegraph
 
Reported: 2007-05-21 12:30 EDT by Brad Hinson
Modified: 2011-01-24 16:43 EST (History)
4 users (show)

See Also:
Fixed In Version: RHBA-2007-0835
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:29:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Add nash support for kernel args with spaces enclosed in quotes (780 bytes, patch)
2007-05-21 12:33 EDT, Brad Hinson
no flags Details | Diff

  None (edit)
Description Brad Hinson 2007-05-21 12:30:06 EDT
Description of problem:
The kernel is started with the command line:
 root=/dev/dasda1 selinux=0 vmhalt="CPU 0 CMD IPL CMS"

The kernel starts the init process from the initrd (which is nash) with the
following arguments / environment:
 argv[0] = /bin/bash
 argv[1] = /init
 envp[0] = HOME=/
 envp[1] = TERM=linux
 envp[2] = BOOT_IMAGE=0

Nash then starts the "real" init process from the root filesystem with:
 argv[0] = /sbin/init
 argv[1] = /root=/dev/dasda1
 argv[2] = selinux=0
 argv[3] = vmhalt="CPU
 argv[4] = 0
 argv[5] = CMD
 argv[6] = IPL
 argv[7] = CMS
 argv[8] = BOOT_IMAGE=0
 envp[0] = HOME=/
 envp[1] = TERM=linux
 envp[2] = BOOT_IMAGE=0
The vmhalt= parameter has been split into several elements. The "0" in argv[4]
is interpreted by init as the new run level. Run level 0 shuts down the system.


Version-Release number of selected component (if applicable):
mkinitrd-4.2.1.8


How reproducible:
Always.  Boot with kernel parmeter in the form vmhalt="something with a zero"
 
Actual results:
Since arguments aren't grouped due to spaces, zero is interpreted as runlevel
and system shuts down.


Additional info:
Originally reported on s/390, but affects all arches.
Comment 1 Brad Hinson 2007-05-21 12:33:10 EDT
Created attachment 155109 [details]
Add nash support for kernel args with spaces enclosed in quotes
Comment 3 RHEL Product and Program Management 2007-05-21 12:44:35 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 8 Peter Jones 2007-09-25 17:18:12 EDT
Fixed in mkinitrd-4.2.1.13-2 .
Comment 12 errata-xmlrpc 2007-11-15 11:11:39 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0835.html
Comment 14 Issue Tracker 2007-12-03 14:06:39 EST
Looking at bugzilla 240777 I don't see the attached patch in
mkinitrd-4.2.1.13-1.src.rpm, which is what is referenced in
RHBA-2007:0835-5.  Bug 240777 actually says it'll be fixed in 4.2.1.13-2,
which I don't see on RHN.

Did this one get missed?


This event sent from IssueTracker by bhinson 
 issue 120779
Comment 15 Issue Tracker 2007-12-03 14:07:19 EST
SEG;
    IBM's last posting says it all; mkinitrd-4.2.1.13-2* should have made
it in to 4.6 but apparently didn't; mkinitrd-4.2.1.13-1* are the packages
on engarchive


Internal Status set to 'Waiting on SEG'

This event sent from IssueTracker by bhinson 
 issue 120779
Comment 18 RHEL Product and Program Management 2008-09-05 13:12:53 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 20 Joel Andres Granados 2009-01-07 09:44:49 EST
The package has been rebuilt and has the patch in the new build.
Comment 25 errata-xmlrpc 2009-05-18 16:29:54 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1008.html

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