RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 628805 - Fix hot-unplug handling of virtio-console ports
Summary: Fix hot-unplug handling of virtio-console ports
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.1
Hardware: All
OS: Linux
urgent
medium
Target Milestone: rc
: 6.1
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580954 628828 662721
TreeView+ depends on / blocked
 
Reported: 2010-08-31 05:25 UTC by Amit Shah
Modified: 2013-07-25 09:08 UTC (History)
8 users (show)

Fixed In Version: kernel-2.6.32-84.el6
Doc Type: Bug Fix
Doc Text:
The virtio-console device did not handle the hot-unplug operation properly. As a result, virtio-console could access the memory outside the driver's memory area and cause kernel panic on the guest. With this update, multiple fixes to the virtio-console device resolved this issue and the hot-unplug operation works as expected.
Clone Of:
: 628828 (view as bug list)
Environment:
Last Closed: 2011-05-19 12:44:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0542 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6.1 kernel security, bug fix and enhancement update 2011-05-19 11:58:07 UTC

Comment 3 Amit Shah 2010-09-23 03:37:33 UTC
The current version of virtio-console doesn't handle hot-unplug properly: it
leads to accessing memory outside the driver's memory area and can cause guest kernel panics.

There are a few ways to trigger this, one of them:

1. Open a virtio-console port in the guest (eg /dev/vport0p1)
2. Block the port on read (eg cat /dev/vport0p1 with host chardev connected)
3. Hot-unplug the port (using the device_del command for the qemu monitor)
4. Close the port in the guest

Patches are queued for inclusion upstream.

The patches also should be backported to 6.0 z-stream kernel.

Note that by default only root is allowed to open a virtio-console port, so
this can't be triggered by an unprivileged user in the default setup.

Comment 4 RHEL Program Management 2010-10-05 01:51:29 UTC
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 5 Aristeu Rozanski 2010-12-13 15:08:12 UTC
Patch(es) available on kernel-2.6.32-89.el6

Comment 13 Golita Yue 2011-01-19 08:05:03 UTC
Reproduced in kernel 2.6.32-83.el6.x86_64

steps:
1. start guest with cmd
2. run the following in host
#dd if=/dev/sda bs=1M count=1024|nc -U /home/rhel6.channel0
3. block the port on read in guest 
# cat /dev/vport0p1 
4. hot-unplug the port in monitor during the date transferring
(qemu) device_del port1

cmd:
/usr/libexec/qemu-kvm -m 2G -smp 2  -uuid `uuidgen` -rtc base=utc,clock=host,driftfix=slew -boot c -drive file=/home/image/rhel6.qcow2,index=0,if=none,id=drive-virtio-disk1,media=disk,cache=none,format=qcow2 -device virtio-blk-pci,bus=pci.0,drive=drive-virtio-disk1,id=virtio-disk0 -netdev tap,id=hostnet0,script=/etc/qemu-ifup-switch -device virtio-net-pci,netdev=hostnet0,mac=00:10:12:20:77:0c,bus=pci.0,addr=0x7,id=hostnet0 -monitor stdio -vnc :1 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -chardev socket,id=channel0,path=/home/rhel6.channel0,server,nowait -device virtserialport,chardev=channel0,name=org.linux-kvm.port.0,bus=virtio-serial0.0,id=port1

Verified in kernel 2.6.32-89.el6.x86_64.

The guest running normally after hot-unplug the virito-serial port during data transferring.

Comment 14 Martin Prpič 2011-02-23 15:11:44 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:
The virtio-console device did not handle the hot-unplug operation properly. As a result, virtio-console could access the memory outside the driver's memory area and cause kernel panic on the guest. With this update, multiple fixes to the virtio-console device resolved this issue and the hot-unplug operation works as expected.

Comment 16 errata-xmlrpc 2011-05-19 12:44:48 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/RHSA-2011-0542.html


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