Bug 1540439 (CVE-2018-1000028)

Summary: CVE-2018-1000028 kernel: Improper sorting of GIDs in nfsd can lead to incorrect permissions being applied
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, airlied, ajax, aquini, bhu, blc, bmasney, brdeoliv, bskeggs, dhoward, dvlasenk, esammons, ewk, fhrbata, hdegoede, hkrzesin, iboverma, ichavero, itamar, jarodwilson, jforbes, jglisse, jlelli, john.j5live, jonathan, josef, jross, jshortt, jstancek, jwboyer, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, plougher, ptalbert, qzhao, rt-maint, rvrbovsk, skozina, steved, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.15 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-24 14:59:44 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: 1516978, 1540442    
Bug Blocks: 1856325    

Description Sam Fowler 2018-01-31 04:58:01 UTC
nfsd in the Linux kernel 4.15, does not properly sort gids when rootsquash is enabled. The groups_sort() function is called inside a loop that copies/squashes gids. he net result is that the highest numbered valid gids are replaced with any lower-valued garbage gids, possibly including 0.

This can corrupt group membership, leading to permission denials for the client.

Upstream Patch:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1995266727fa8143897e89b55f5d3c79aa828420