Bug 1609015 (CVE-2018-18438) - CVE-2018-18438 Qemu: Integer overflow in ccid_card_vscard_read() allows memory corruption
Summary: CVE-2018-18438 Qemu: Integer overflow in ccid_card_vscard_read() allows memor...
Status: CLOSED NOTABUG
Alias: CVE-2018-18438
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20181011,repor...
Keywords: Security
Depends On: 1640005 1640006 1640007 1640008 1640009 1640010 1640011 1640012 1640013 1640019 1640020
Blocks: 1613564
TreeView+ depends on / blocked
 
Reported: 2018-07-26 18:06 UTC by Laura Pardo
Modified: 2019-06-08 23:04 UTC (History)
38 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2019-05-03 16:26:09 UTC


Attachments (Terms of Use)

Description Laura Pardo 2018-07-26 18:06:38 UTC
An integer overflow issue was found in the CCID Passthru card device emulation, while reading card data in ccid_card_vscard_read() function. The ccid_card_vscard_read() function accepts a signed integer 'size' argument, which is subsequently used as unsigned size_t value in memcpy(), copying large amounts of memory.

A user inside guest could use this flaw to crash the Qemu process resulting in DoS.

Upstream patch:
---------------
  -> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02396.html

Reference:
----------
  -> https://www.openwall.com/lists/oss-security/2018/10/17/3

Comment 1 Laura Pardo 2018-07-26 18:06:53 UTC
Acknowledgments:

Name: Arash Tohidi

Comment 2 Arash Tohidi 2018-07-26 18:42:41 UTC
The overflowed argument in ccid_card_vscard_read() is "int size". Another memory corruption may happen if a specially crafted buffer is fed to buf which will be passed to  ccid_card_vscard_handle_message() and eventually will result in another memory overwrite by calling memcpy().

Comment 4 Prasad J Pandit 2018-10-17 06:45:41 UTC
External References:

https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02396.html

Comment 6 Prasad J Pandit 2018-10-17 07:19:55 UTC
Created qemu tracking bugs for this issue:

Affects: fedora-all [bug 1640019]

Comment 11 Philippe Mathieu-Daudé 2019-05-03 16:26:09 UTC
The maintainer audited the code and can not find that memory corruption happens (see bug 1640020#c9).

Since there is no known reproducer (see bug 1640020#c7), all those issues have been closed as NOTABUG.


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