Bug 733600 - qemu-kvm doesn't report error when supplied negative vnc port value
qemu-kvm doesn't report error when supplied negative vnc port value
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.0
Unspecified Unspecified
low Severity low
: rc
: 7.0
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
: 1020611 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-26 04:03 EDT by langfang
Modified: 2015-03-05 04:41 EST (History)
10 users (show)

See Also:
Fixed In Version: qemu 2.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 04:41:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description langfang 2011-08-26 04:03:07 EDT
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 05:01:35 EDT
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 12:29:21 EDT
*** Bug 1020611 has been marked as a duplicate of this bug. ***
Comment 8 Ronen Hod 2013-10-30 05:48:25 EDT
Not urgent, will be fixed upstream.
Comment 9 Gerd Hoffmann 2013-12-11 07:01:46 EST
http://patchwork.ozlabs.org/patch/300022/
Comment 13 huiqingding 2014-08-04 01:09:14 EDT
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 01:11:41 EDT
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 01:12:15 EDT
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 05:28:41 EDT
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 04:41:02 EST
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.