Bug 1272132

Summary: kernel: Heap corruption in debug_read_tlb
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: agordeev, aquini, bhu, dhoward, esammons, fhrbata, gansalmon, iboverma, itamar, jforbes, jkacur, joelsmith, jonathan, jross, jwboyer, kernel-maint, kernel-mgr, kstutsma, lgoncalv, lwang, madhu.chinakonda, matt, mchehab, mcressma, mguzik, mrg-program-list, nmurray, pholasek, plougher, rvrbovsk, vdronov, 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: 2015-12-03 13:36: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:
Embargoed:
Bug Depends On: 1272141    
Bug Blocks: 1272140    

Description Adam Mariš 2015-10-15 14:37:30 UTC
A vulnerability in debug_read_tlb() function was found leading to possible buffer overflow. The debug_read_tlb() uses the sprintf() functions directly on the buffer allocated by buf = kmalloc(count), without taking into account the size of the buffer, with the consequence corrupting the heap, depending on the count requested by the user.

Upstream patch:

https://patchwork.kernel.org/patch/6853351/

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e203db293863fa15b4b1917d4398fb5bd63c4e88

CVE request:

http://seclists.org/oss-sec/2015/q4/82

Comment 1 Adam Mariš 2015-10-15 14:43:31 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1272141]

Comment 2 Josh Boyer 2015-10-15 16:52:25 UTC
As far as I'm aware, this is only present in the omap-iommu-debug.c file.  That limits it to:

1) 32-bit ARM
2) The omap2plus machine type for 32-bit ARM
3) Only built if the OMAP_IOMMU_DEBUG option is enabled.

Comment 3 Vladis Dronov 2015-12-03 13:36:12 UTC
Statement:

This issue does not affect the Linux kernel packages as shipped with Red Hat Enterprise Linux 5, 6, 7 and MRG-2 as the code introduced the flaw is not present in these products.