Bug 796829 (CVE-2012-0879)

Summary: CVE-2012-0879 kernel: block: CLONE_IO io_context refcounting issues
Product: [Other] Security Response Reporter: Petr Matousek <pmatouse>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arozansk, bhu, dhoward, fhrbata, gansalmon, itamar, jkacur, jonathan, jwboyer, kernel-maint, kernel-mgr, lgoncalv, madhu.chinakonda, nobody, rt-maint, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-19 21:52:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 791125, 796846    
Bug Blocks: 796839    

Description Petr Matousek 2012-02-23 18:05:09 UTC
With CLONE_IO, copy_io() increments both ioc->refcount and ioc->nr_tasks. However exit_io_context() only decrements ioc->refcount if ioc->nr_tasks reaches 0.

With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents xit_io_context() from calling IO schedulers exit functions.

An unprivileged local user could use these flaws cause denial of service.

Upstream fixes:
http://git.kernel.org/linus/61cc74fbb87af6aa551a06a370590c9bc07e29d9
http://git.kernel.org/linus/b69f2292063d2caf37ca9aec7d63ded203701bf3

References:
http://comments.gmane.org/gmane.linux.kernel/922519

Comment 3 Petr Matousek 2012-02-23 18:40:22 UTC
Statement:

This issue affects the Linux kernel as shipped with Red Hat Enterprise Linux 6. This issue does not affect the Linux kernel as shipped with Red Hat Enterprise Linux 4 and 5 as they did not provide support for CLONE_IO. This issue does not affect the Linux kernel as shipped with Red Hat Enterprise MRG as they already contain the fix. This has been addressed in Red Hat Enterprise Linux 6 via https://rhn.redhat.com/errata/RHSA-2012-0481.html.

Comment 4 Kurt Seifried 2012-02-23 21:49:26 UTC
Added CVE as per http://www.openwall.com/lists/oss-security/2012/02/23/5

Comment 5 errata-xmlrpc 2012-04-17 18:56:35 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:0481 https://rhn.redhat.com/errata/RHSA-2012-0481.html