Bug 1189864 (CVE-2015-4036) - CVE-2015-4036 kernel: potential memory corruption (denial of service) in vhost/scsi driver
Summary: CVE-2015-4036 kernel: potential memory corruption (denial of service) in vhos...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-4036
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:
Depends On: 1192079
Blocks: 1189866
TreeView+ depends on / blocked
 
Reported: 2015-02-05 16:44 UTC by Vasyl Kaigorodov
Modified: 2021-02-17 05:40 UTC (History)
32 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
A flaw exists in the kernels configfs interface to manipulate or control the vhost scsi subsection. Unchecked directory names in configfs may unintentionally corrupt memory or panic the system.
Clone Of:
Environment:
Last Closed: 2015-05-29 12:41:36 UTC
Embargoed:


Attachments (Terms of Use)
kernel_vhost_scsi.patch (1.01 KB, text/plain)
2015-02-05 16:44 UTC, Vasyl Kaigorodov
no flags Details

Description Vasyl Kaigorodov 2015-02-05 16:44:00 UTC
It was reported that in vhost_scsi_make_tpg() the limit for "tpgt" is UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.

In the context it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] array which has VHOST_SCSI_MAX_TARGET (256) elements, so anything higher than 255 then is invalid. Attached patch corrects this.
In vhost_scsi_send_evt() the values higher than 255 are masked, but now that the limit has changed, the mask is not needed.

Upstream fix:
http://www.spinics.net/lists/linux-scsi/msg82650.html

Discussion:
http://www.openwall.com/lists/oss-security/2015/05/13/4

Comment 1 Vasyl Kaigorodov 2015-02-05 16:44:56 UTC
Created attachment 988570 [details]
kernel_vhost_scsi.patch

Comment 2 Vasyl Kaigorodov 2015-02-12 15:21:21 UTC
Statement:

Not vulnerable. This issue did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 5, 6 and 7, and Red Hat Enterprise MRG as they do not have CONFIG_VHOST_SCSI directive enabled in the build configuration.

Comment 3 Vasyl Kaigorodov 2015-02-12 15:22:14 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1192079]

Comment 5 Petr Matousek 2015-02-20 14:02:40 UTC
References:

http://www.spinics.net/lists/linux-scsi/msg82650.html

Comment 6 Fedora Update System 2015-03-09 08:17:21 UTC
kernel-3.18.8-201.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-03-14 09:15:30 UTC
kernel-3.18.9-100.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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