Bug 658712 - xend: Add syntax check for block devices
Summary: xend: Add syntax check for block devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Xen Maintainance List
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-01 03:33 UTC by Yufang Zhang
Modified: 2011-07-21 11:59 UTC (History)
2 users (show)

Fixed In Version: xen-3.0.3-122.el5
Doc Type: Bug Fix
Doc Text:
Previously, the xend daemon did not perform syntax checks for block devices either in configuration files or on the command line. As a consequence, the guest was exposed to a kernel panic or the "xm block-attach" command failed. With this update, a patch has been provided, and xend now checks the format of block device entries and parameters before adding the information into XenStore storage space, fixing these issues.
Clone Of:
Environment:
Last Closed: 2011-07-21 09:15:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for this bug (775 bytes, patch)
2010-12-01 03:38 UTC, Yufang Zhang
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1070 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2011-07-21 09:12:56 UTC

Description Yufang Zhang 2010-12-01 03:33:28 UTC
Description of problem:
Xend should do syntax check for block devices for either config file(using when create guest ) and command line(using when attach disk to guest), otherwise guest would expose to kernel panic or can not see the attached disk. Such as:

1. disk = ['files:/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w']
2. disk = [':/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w']
3. disk = ['/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w']
4. # xm block-attach vm1 /xen-autotest/images/RHEL-Server-5.5-64-pv.raw xvdc:disk r

Version-Release number of selected component (if applicable):
xen-3.0.3-120.el5

How reproducible:
Always

Steps to Reproduce:
Please refer to Description.
  
Actual results:
Guest panics or block-attach fails.

Expected results:
xend check the syntax and report warnings. 

Additional info:
A patch in upstream would fix this problem. It would be back-ported into RHEL soon.

Comment 1 Yufang Zhang 2010-12-01 03:38:01 UTC
Created attachment 463883 [details]
patch for this bug

This is the patch back-ported from upstream. It does syntax check before adding information into xenstore.

Comment 3 RHEL Program Management 2011-01-11 19:50:22 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2011-01-12 15:22:33 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 8 Yufang Zhang 2011-03-18 06:43:03 UTC
QA verified this bug on xen-3.0.3-126.el5:

1. Create a guest with error block device syntax, like:

disk = ['files:/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w']

or 

disk = [':/xen-autotest/images/RHEL-Server-5.5-64-pv.raw,xvda,w']

xend checks the error and prevent you from creating the guest.

2. Try to attach a block device to a PV guest, with a wrong format, like: 

# xm block-attach vm1 /xen-autotest/images/RHEL-Server-5.5-64-pv.raw xvdc:disk r

xend/xm output shows that the syntax is error.

So change this bug to VERIFIED.

Comment 9 Tomas Capek 2011-07-13 13:21:57 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the xend daemon did not perform syntax checks for block devices either in configuration files or on the command line. As a consequence, the guest was exposed to a kernel panic or the "xm block-attach" command failed. With this update, a patch has been provided, and xend now checks the format of block device entries and parameters before adding the information into XenStore storage space, fixing these issues.

Comment 10 errata-xmlrpc 2011-07-21 09:15:58 UTC
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-2011-1070.html

Comment 11 errata-xmlrpc 2011-07-21 11:59:41 UTC
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-2011-1070.html


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