Bug 2155196 (CVE-2022-3606)

Summary: CVE-2022-3606 kernel: libbpf: NULL pointer dereference in find_prog_by_sec_insn
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: acaringi, bhu, chwhite, crwood, ddepaula, debarbos, dfreiber, dhoward, drow, dvlasenk, ezulian, hkrzesin, jarod, jburrell, jfaracco, jferlan, jforbes, jlelli, joe.lawrence, jshortt, jstancek, jwyatt, kcarcia, kernel-mgr, lgoncalv, lleshchi, lzampier, nmurray, ptalbert, qzhao, rogbas, rvrbovsk, scweaver, tyberry, vkumar, vmalik, 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 was found in libbpf. When there are no program sections, obj->programs is left unallocated, causing a NULL pointer dereference in the following access to prog->sec_idx in find_prog_by_sec_insn. A local user could use this flaw to cause a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-07 18:00:39 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: 2155222, 2155223, 2155224, 2155225, 2155227, 2155228, 2155229, 2155230    
Bug Blocks: 2136147    

Description Mauro Matteo Cascella 2022-12-20 11:21:36 UTC
A NULL pointer dereference issue was found in libbpf. When there are no program sections, obj->programs is left unallocated, and find_prog_by_sec_insn()'s search lands on &obj->programs[0] == NULL, and will cause a NULL pointer dereference in the following access to prog->sec_idx.

Upstream patch & commit:
https://lore.kernel.org/bpf/20221012022353.7350-4-shung-hsi.yu@suse.com/
https://github.com/torvalds/linux/commit/d0d382f95a9270dcf803539d6781d6bd67e3f5b2

Comment 1 Mauro Matteo Cascella 2022-12-20 13:12:49 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2155222]


Created libbpf tracking bugs for this issue:

Affects: fedora-all [bug 2155228]

Comment 5 Product Security DevOps Team 2023-01-07 18:00:36 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-3606