Bug 1566407 (CVE-2018-10021)

Summary: CVE-2018-10021 kernel: ata qc leak in drivers/scsi/libsas/sas_scsi_host.c allows local users to cause denial-of-service
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acaringi, airlied, allarkin, aquini, bhu, blc, bskeggs, cye, dbohanno, dhoward, dvlasenk, esammons, esandeen, ewk, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarod, jarodwilson, jfaracco, jforbes, jglisse, jkacur, joe.lawrence, john.j5live, jonathan, josef, jross, jshortt, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, lwang, lzampier, matt, mchehab, mcressma, mguzik, mjg59, mlangsdo, mleitner, mmilgram, nmurray, plougher, ptalbert, rparrazo, rrobaina, rt-maint, rvrbovsk, rysulliv, scweaver, skozina, slawomir, steved, sukulkar, vdronov, williams, wmealing, ycote, ykopkova, yozone, zhijwang
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.16 Doc Type: If docs needed, set a value
Doc Text:
[Disputed] A memory leak was identified in the Serial Attached SCSI (SAS) implementation in the Linux kernel, specifically in the libsas component. This issue occurs when ATA devices in error handling (EH) fail to properly pass commands to libata, causing ATA queued commands (qc) to leak and triggering warnings. If enough ATA qcs are leaked, it can lead to allocation failures, causing I/O to block indefinitely, potentially resulting in a denial of service (DoS) due to memory exhaustion. However, this issue has been disputed, with claims that the vulnerability only arises under specific failure conditions that require physical proximity, such as unplugging SAS Host Bus Adapter cables.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-06 19:02:04 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: 1566408, 1566409    
Bug Blocks: 1566413    

Description Adam Mariš 2018-04-12 09:14:33 UTC
The code in the drivers/scsi/libsas/sas_scsi_host.c file in the Linux allows a physically proximate attacker to cause a memory leak in ATA command queue and thus a denial of service by triggering certain failure conditions.

References:

https://marc.info/?t=152047601000001&r=1&w=2

An upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=318aaf34f1179b39fa9c30fa0f3288b645beee39

Comment 1 Adam Mariš 2018-04-12 09:15:38 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1566409]

Comment 3 Fedora Update System 2018-04-18 01:04:04 UTC
kernel-4.15.17-200.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Vladis Dronov 2018-05-06 15:16:05 UTC
Note:

An analysis shows, this bug is a memory leak via the ATA Error Handler for a device behind a SAS HBA. The Error Handler can be triggered by someone physically unplugging the drive. So the failure can only occur for physically proximate attackers who unplug SAS Host Bus Adapter cables. Red Hat does not consider this bug to be a security flaw, as a physically proximate attacker can cause more harm to a system than just a memory leak.