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 733600 - qemu-kvm doesn't report error when supplied negative vnc port value
Summary: qemu-kvm doesn't report error when supplied negative vnc port value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 7.0
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1020611 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-26 08:03 UTC by langfang
Modified: 2015-03-05 09:41 UTC (History)
10 users (show)

Fixed In Version: qemu 2.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 09:41:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0624 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2015-03-05 14:37:36 UTC

Description langfang 2011-08-26 08:03:07 UTC
Description of problem:
(1)qemu-kvm doesn't show any error when user supplies a negative port value to
-vnc
(2)

Version-Release number of selected component (if applicable):
#rpm -q qemu-kvm 
qemu-kvm-0.12.1.2-2.184.el6.x86_64
#uname -r
2.6.32-191.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. /usr/libexec/qemu-kvm .... -vnc :-123 or "-vnc :1023131"
 
Actual results:
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) 
for the "-vnc :1023131", we can boot the command line, but can not view the guest via VNC.

Expected results:
Qemu-kvm should give user a error tip:"vnc port is  out of range"

Additional info:

Comment 1 langfang 2011-08-26 09:01:35 UTC
Description of problem:
scenario 1) qemu-kvm doesn't show any error when user supplies a negative port value to -vnc
scenario 2) qemu-kvm doesn't show any error when user supplies a out of range port value to -vnc

Actual results:
scenario 1)for the "-vnc :-123",we can boot the command line,and can view the guest via VNC.
scenario 2)for the "-vnc :1023131",we can boot the command line,but can not view the guest via VNC.

Comment 7 Hai Huang 2013-10-22 16:29:21 UTC
*** Bug 1020611 has been marked as a duplicate of this bug. ***

Comment 8 Ronen Hod 2013-10-30 09:48:25 UTC
Not urgent, will be fixed upstream.

Comment 9 Gerd Hoffmann 2013-12-11 12:01:46 UTC
http://patchwork.ozlabs.org/patch/300022/

Comment 13 huiqingding 2014-08-04 05:09:14 UTC
Reproduce this bug using the following version:
qemu-kvm-1.5.3-66.el7.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Reproduce:
1. boot vm with "-vnc :-123"
# /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio
2. boot vm with "-vnc :1023131"
# /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio

Results:
after step1 and step2, qemu-kvm doesn't quit.

Comment 14 huiqingding 2014-08-04 05:11:41 UTC
Test this bug using the following version on an intel host:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Test:
1. boot vm with "-vnc :-123"
# /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio
2. boot vm with "-vnc :1023131"
# /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio

Results:
after step1, qemu-kvm quits with the error info:
(qemu) qemu-kvm: Failed to start VNC server on `:-123': can't convert to a number: -123

after step2, qemu-kvm quits with the error info:
(qemu) qemu-kvm: Failed to start VNC server on `:1023131': port 1023131 out of range

Comment 15 huiqingding 2014-08-04 05:12:15 UTC
Test this bug using the following version on an amd host:
qemu-kvm-rhev-2.1.0-3.el7ev.preview.x86_64
kernel-3.10.0-140.el7.x86_64

Steps to Test:
1. boot vm with "-vnc :-123"
# /usr/libexec/qemu-kvm -vnc :-123 -monitor stdio
2. boot vm with "-vnc :1023131"
# /usr/libexec/qemu-kvm -vnc :1023131 -monitor stdio

Results:
after step1, qemu-kvm quits with the error info:
(qemu) qemu-kvm: Failed to start VNC server on `:-123': can't convert to a number: -123

after step2, qemu-kvm quits with the error info:
(qemu) qemu-kvm: Failed to start VNC server on `:1023131': port 1023131 out of range

Comment 17 langfang 2014-08-25 09:28:41 UTC
Test this bug on latest version:
Host:
# uname -r
3.10.0-144.el7.x86_64
#rpm -q qemu-kvm-rhev
qemu-kvm-rhev-2.1.0-2.el7.x86_64

Steps:
1.Boot guest with

-vnc :111aaaaa/-vnc :-888/-vnc :aaaasss /

Results:
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) qemu-kvm: Failed to start VNC server on `:aaaasss': can't convert to a number: aaaasss


Addtional info:
 -vnc :22222222 -monitor stdio
QEMU 2.1.0 monitor - type 'help' for more information
(qemu) qemu-kvm: Failed to start VNC server on `:22222222': port 22222222 out of range


According to above test ,this bug fixed

Comment 20 errata-xmlrpc 2015-03-05 09:41:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0624.html


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