Bug 1460170 (CVE-2017-9524)

Summary: CVE-2017-9524 Qemu: nbd: segmentation fault due to client non-negotiation
Product: [Other] Security Response Reporter: Prasad Pandit <ppandit>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: ailan, amit, apevec, areis, ayoung, berrange, cfergeau, chrisw, cvsbot-xmlrpc, ddepaula, drjones, dwmw2, eblake, imammedo, itamar, jen, jjoyce, jschluet, kbasil, knoel, lhh, lpeer, markmc, m.a.young, mkenneth, mrezanin, mst, pbonzini, rbryant, rjones, rkrcmar, robinlee.sysu, sclewis, slong, srevivo, tdecacqu, virt-maint, virt-maint, vkuznets, xen-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Quick Emulator (QEMU) built with Network Block Device (NBD) Server support was vulnerable to a null-pointer dereference issue. The flaw could occur when releasing a client that was not initialized due to failed negotiation. A remote user or process could exploit this flaw to crash the qemu-nbd server (denial of service).
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 03:14:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1451614, 1460172, 1460173, 1460179, 1460180, 1460181, 1460182, 1460184, 1460185, 1460186, 1460187, 1460188, 1460192, 1476024    
Bug Blocks: 1460107    

Description Prasad Pandit 2017-06-09 10:15:05 UTC
Quick Emulator(Qemu) built with the Network Block Device(NBD) Server support
is vulnerable to a null pointer dereference issue. It could occur while
releasing a client, which was not initialised due to failed negotiation.

A remote user/process could use this flaw to crash the qemu-nbd server
resulting in DoS.

Upstream patch:
---------------
  -> https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg06240.html
  -> https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg02321.html

Reference:
----------
  -> http://www.openwall.com/lists/oss-security/2017/06/12/1

Comment 1 Prasad Pandit 2017-06-09 10:28:02 UTC
Created xen tracking bugs for this issue:

Affects: fedora-all [bug 1460173]

Comment 2 Prasad Pandit 2017-06-09 10:28:26 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1460172]

Comment 6 Eric Blake 2017-06-09 11:15:01 UTC
(In reply to Prasad J Pandit from comment #0)
> Quick Emulator(Qemu) built with the Network Block Device(NBD) Server support
> is vulnerable to a null pointer dereference issue. It could occur while
> releasing a client, which was not initialised due to failed negotiation.
> 
> A remote user/process could use this flaw to crash the qemu-nbd server
> resulting in DoS.
> 
> Upstream patch:
> ---------------
>   -> https://lists.gnu.org/archive/html/qemu-devel/2017-05/msg06240.html
>   -> https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg02321.html

The description, while factually correct, is incomplete. The real problem is that qemu-nbd must NOT exit due to a port scan. The fact that it was exiting due to a segmentation fault makes it a little more obvious that the code was buggy, but even if NO null pointer dereference occurred, there is STILL a denial of service if a well-timed port scan is able to cause qemu-nbd to exit prior to an actual client being able to connect.

Comment 10 errata-xmlrpc 2017-07-05 08:16:25 UTC
This issue has been addressed in the following products:

  RHEV 3.X Hypervisor and Agents for RHEL-7
  RHEV 4.X RHEV-H and Agents for RHEL-7

Via RHSA-2017:1682 https://access.redhat.com/errata/RHSA-2017:1682

Comment 11 errata-xmlrpc 2017-07-05 09:47:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1681 https://access.redhat.com/errata/RHSA-2017:1681

Comment 15 errata-xmlrpc 2017-08-02 01:02:41 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Platform 10.0 (Newton)
  Red Hat OpenStack Platform 11.0 (Ocata)
  Red Hat Enterprise Linux OpenStack Platform 6.0 (Juno) for RHEL 7
  Red Hat Enterprise Linux OpenStack Platform 7.0 (Kilo) for RHEL 7
  Red Hat OpenStack Platform 8.0 (Liberty)
  Red Hat OpenStack Platform 9.0 (Mitaka)

Via RHSA-2017:2408 https://access.redhat.com/errata/RHSA-2017:2408