Bug 1694758 (CVE-2019-9857)

Summary: CVE-2019-9857 kernel: memory leak in inotify_update_existing_watch() leads to denial of service
Product: [Other] Security Response Reporter: msiddiqu
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, bhu, blc, brdeoliv, bskeggs, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jkacur, john.j5live, jonathan, josef, jross, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, plougher, rt-maint, rvrbovsk, steved, williams, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw in the inotify subsystem can allow a local attacker to create a denial of service (DOS) situation in which the memory use of watches on existing watchpoints were not accounted for correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-31 13:52:14 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: 1694759, 1711174, 1711178, 1711179    
Bug Blocks: 1694762    

Description msiddiqu 2019-04-01 15:13:41 UTC
In the Linux kernel through 5.0.2, the function inotify_update_existing_watch() in fs/notify/inotify/inotify_user.c neglects to call fsnotify_put_mark() with IN_MASK_CREATE after fsnotify_find_mark(), which will cause a memory leak (aka refcount leak). Finally, this will cause a denial of service.

Upstream patch: 
https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git/commit/?h=fsnotify&id=62c9d2674b31d4c8a674bee86b7edc6da2803aea

References:  
https://patchwork.kernel.org/patch/10836283/

Comment 1 msiddiqu 2019-04-01 15:13:58 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1694759]

Comment 2 Fedora Update System 2019-04-09 01:13:29 UTC
kernel-5.0.6-100.fc28, kernel-headers-5.0.6-100.fc28, kernel-tools-5.0.6-100.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2019-04-09 02:19:06 UTC
kernel-5.0.6-200.fc29, kernel-headers-5.0.6-200.fc29, kernel-tools-5.0.6-200.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.