Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Hi Han,
The immediate issue here is that qemu's ssh driver expects the "port" argument to be an integer and not a string. So it should work if you replace "file.port":"22" by "file.port":22.
The segfault itself is rather "safe" in that it will always only dereference NULL, so it can be used for DoS at most. However, it still is an issue that needs fixing, of course.
The problem is that the type of options passed via -drive or JSON are not validated like options passed via blockdev-add are. However, many block drivers assume they are, including SSH. The issue can be reproduced even simpler like so:
$ qemu-system-x86_64 -drive if=none,driver=ssh,host=foo,port=22
[1] 7996 segmentation fault (core dumped) qemu-system-x86_64 -drive if=none,driver=ssh,host=foo,port=22
This is because each value is treated as a string but ssh expects the port to be set to an integer.
But the issue exists for other block drivers as well, e.g. NBD expects all of its arguments to be strings, so we can do this:
$ qemu-img info "json:{'driver':'nbd', 'host':42}"
[1] 7103 segmentation fault (core dumped) ./qemu-img info "json:{'driver':'nbd', 'host':42}"
Or it will ignore a port specified as an integer:
$ qemu-img info "json:{'driver':'nbd', 'host':'foo', 'port':42}"
qemu-img: Could not open 'json:{'driver':'nbd', 'host':'foo', 'port':42}': address resolution failed for foo:10809: Name or service not known
Which is better than crashing, admittedly, but not really good still.
So because I do not consider this issue absolutely critical (it will always result in a NULL pointer getting dereferenced which is certain to result in a plain crash), because the fix will not be trivial, and because we're rather late in the release process, I'd rather move this BZ to 7.4.
Max
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://access.redhat.com/errata/RHSA-2017:2392
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://access.redhat.com/errata/RHSA-2017:2392
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://access.redhat.com/errata/RHSA-2017:2392
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://access.redhat.com/errata/RHSA-2017:2392
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://access.redhat.com/errata/RHSA-2017:2392
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://access.redhat.com/errata/RHSA-2017:2392
Hi Han, The immediate issue here is that qemu's ssh driver expects the "port" argument to be an integer and not a string. So it should work if you replace "file.port":"22" by "file.port":22. The segfault itself is rather "safe" in that it will always only dereference NULL, so it can be used for DoS at most. However, it still is an issue that needs fixing, of course. The problem is that the type of options passed via -drive or JSON are not validated like options passed via blockdev-add are. However, many block drivers assume they are, including SSH. The issue can be reproduced even simpler like so: $ qemu-system-x86_64 -drive if=none,driver=ssh,host=foo,port=22 [1] 7996 segmentation fault (core dumped) qemu-system-x86_64 -drive if=none,driver=ssh,host=foo,port=22 This is because each value is treated as a string but ssh expects the port to be set to an integer. But the issue exists for other block drivers as well, e.g. NBD expects all of its arguments to be strings, so we can do this: $ qemu-img info "json:{'driver':'nbd', 'host':42}" [1] 7103 segmentation fault (core dumped) ./qemu-img info "json:{'driver':'nbd', 'host':42}" Or it will ignore a port specified as an integer: $ qemu-img info "json:{'driver':'nbd', 'host':'foo', 'port':42}" qemu-img: Could not open 'json:{'driver':'nbd', 'host':'foo', 'port':42}': address resolution failed for foo:10809: Name or service not known Which is better than crashing, admittedly, but not really good still. So because I do not consider this issue absolutely critical (it will always result in a NULL pointer getting dereferenced which is certain to result in a plain crash), because the fix will not be trivial, and because we're rather late in the release process, I'd rather move this BZ to 7.4. Max