Bug 2124061

Summary: kernel: eBPF verifier bug: Mishandling in release_reg_references() cause a PTR leak vulnerability
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bhu, brdeoliv, bskeggs, chwhite, ddepaula, debarbos, dfreiber, dvlasenk, ezulian, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jburrell, jfaracco, jferlan, jforbes, jglisse, jlelli, joe.lawrence, josef, jshortt, jstancek, jwboyer, jwyatt, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lleshchi, lzampier, masami256, mchehab, nmurray, ptalbert, qzhao, rogbas, rvrbovsk, scweaver, steved, swood, tyberry, vkumar, walters, williams
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 possible leak of data in the Linux kernel's BPF subsystem was found in the way user triggers release_reg_references() of BPF in the way that release fails. A local user could use this flaw to get unprivileged access to some data or potentially escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2151552, 2151560, 2151561, 2151562, 2151563    
Bug Blocks: 2109540    

Description Alex 2022-09-04 11:17:44 UTC
A flaw found in the Linux Kernel in kernel/bpf/verifier.c.
Leak of data from pointer possible because of the possibility to call BPF_FUNC_ringbuf_discard after BPF_FUNC_ringbuf_reserve where SCALAR_VALUE assigned to data previously contained a pointer value at runtime.

Reference:
https://lore.kernel.org/bpf/8f4c3e52-ce86-cbfc-5e76-884596ec11d7@fb.com/

Comment 1 Alex 2022-12-07 13:50:45 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2151552]