Bug 2298111 (CVE-2022-48775)

Summary: CVE-2022-48775 kernel: Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel 4.19.231, kernel 5.4.181, kernel 5.10.102, kernel 5.15.25, kernel 5.16.11, kernel 5.17 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel's Hyper-V VMBus driver, which involved a memory leak caused by improper handling of the kobject_init_and_add() function in vmbus_add_channel_kobj(). When this function fails, it still references the kobject, which must be released by calling kobject_put().
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:

Description OSIDB Bzimport 2024-07-16 12:22:25 UTC
In the Linux kernel, the following vulnerability has been resolved:

Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj

kobject_init_and_add() takes reference even when it fails.
According to the doc of kobject_init_and_add():

   If this function returns an error, kobject_put() must be called to
   properly clean up the memory associated with the object.

Fix memory leak by calling kobject_put().