Bug 1187534 (CVE-2015-1420)

Summary: CVE-2015-1420 kernel: fs/fhandle.c race condition
Product: [Other] Security Response Reporter: Vasyl Kaigorodov <vkaigoro>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: agordeev, aquini, bhu, ccoleman, dhoward, dmcphers, esammons, fhrbata, gansalmon, iboverma, itamar, jforbes, jialiu, jkacur, joelsmith, jokerman, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, kseifried, lgoncalv, lmeyer, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, mmccomas, nmurray, pholasek, plougher, pmatouse, rt-maint, rvrbovsk, slawomir, williams, wmealing
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: 2015-06-02 15:45:23 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: 1189424, 1189425, 1189426, 1189427, 1227417    
Bug Blocks: 1187535    

Description Vasyl Kaigorodov 2015-01-30 11:11:29 UTC
A specially crafted user space application may exploit a bug in handle_to_path to copy additional data to a target application.  This defect is caused by the kernel incorrectly assuming that the arguments provided do not change.

This is problematic since the kernel does size verifications only after the first
read, so if the number of extra bytes changes in userspace between the first
and second calls, we'll have an incoherent view of file_handle.

The fix is to read the size once, and copy that over to the final
structure referencing it from that point rather than the value from the application which may change.


The patch is not yet present in official kernel tree:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/fs/fhandle.c

Proposed Patch:
http://marc.info/?l=linux-kernel&m=142247707318982&w=2

Comment 4 Wade Mealing 2015-04-27 10:24:39 UTC
Statement:

This problem does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5. This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 6, 7 and Red Hat Enterprise MRG-2 kernels.

This has been rated as having Low security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

Comment 5 Wade Mealing 2015-04-27 11:17:21 UTC
This original issue was introduced in commit becfd1f37544798cbdfd788f32c827160fab98c1.  This commit was introduced in Red Hat Enterprise Linux 6 and included in Red Hat Enterprise Linux 7 kernel, Red Hat Enterprise Linux 7 kernel-rt and MRG-2 kernels.  

This does not affect Red Hat Enterprise Linux 5 as it does not contain the commit that introduced the issue.

Comment 6 Petr Matousek 2015-06-02 15:44:29 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1227417]

Comment 8 Fedora Update System 2015-06-20 23:59:19 UTC
kernel-4.0.5-200.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-06-21 00:31:52 UTC
kernel-4.0.5-300.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.