Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 198E9286D7A for ; Wed, 18 Jun 2025 11:03:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244612; cv=none; b=UDgxyv3BbRMQFxiEg4k9z37QshZyb3UVzpdop40YVp9mBU+Q/rHK+jBUKHWt7Ze0R8wQP7/uNxA6k3nQe/5SbEw3QQvNFWePNRlpUeFHBg10dxU23vCUw6ILv1M2reg67llwc2comMEtlOQOAxHDn+40Ed59SiuXCNpkhIVGgts= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244612; c=relaxed/simple; bh=8Afx/YxAMYLFEqy9pIZrzQVzLxHTzLfIT+gqbYy/eSI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=H4hOVOgpAFrD4vlumlFtBkERrIf01VSPBRQEWmn0uwWXvIT9o206H1S26NhFPNNnoMu1NG3xkV49hdQ4M0n/qgwtD1qcg3B8CxTrKLe2O0a4SXEu6h3k7uhDzw7FrdwXt3+lLDM5SSOa1XhqFjlSeZI6mABQMFIgcNVoAyFZaF0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z70ENfDU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z70ENfDU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A07B3C4CEE7; Wed, 18 Jun 2025 11:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244612; bh=8Afx/YxAMYLFEqy9pIZrzQVzLxHTzLfIT+gqbYy/eSI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=z70ENfDUTXB295Tfkv9coF9yVLMYWX0V4gTXlHEVnRsGWjuXGpd5zE/w+F+vB9eCR 9BZ14Ko0i7hvOUUwme3lLybkNAirlPyMmLNU/Uok35ZN2D9zazG5HLxhFixhxD7kgt nkyocjzIuO199C+UlAaMfYYxcGo53N6aFTu907+Q= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49981: HID: hidraw: fix memory leak in hidraw_release() Date: Wed, 18 Jun 2025 13:00:46 +0200 Message-ID: <2025061821-CVE-2022-49981-305f@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4797; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=B/uj7TCw2B6Ppn4Z9ar82lRtNVYacWuraO5mzHVxOtM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc1xv13/nLhJ0u+x5pvI8w5UPYcfdIqv6NZ+x3uzt/ vH+VYp3RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk9FaGeRqbK16dYigwP/tj yQvxuNamidesnBgWHD9SWu6QGrsxrPT4ydTXLDWdx9OfAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: HID: hidraw: fix memory leak in hidraw_release() Free the buffered reports before deleting the list entry. BUG: memory leak unreferenced object 0xffff88810e72f180 (size 32): comm "softirq", pid 0, jiffies 4294945143 (age 16.080s) hex dump (first 32 bytes): 64 f3 c6 6a d1 88 07 04 00 00 00 00 00 00 00 00 d..j............ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmemdup+0x23/0x50 mm/util.c:128 [] kmemdup include/linux/fortify-string.h:440 [inline] [] hidraw_report_event+0xa2/0x150 drivers/hid/hidraw.c:521 [] hid_report_raw_event+0x27d/0x740 drivers/hid/hid-core.c:1992 [] hid_input_report+0x1ae/0x270 drivers/hid/hid-core.c:2065 [] hid_irq_in+0x1ff/0x250 drivers/hid/usbhid/hid-core.c:284 [] __usb_hcd_giveback_urb+0xf9/0x230 drivers/usb/core/hcd.c:1670 [] usb_hcd_giveback_urb+0x1b6/0x1d0 drivers/usb/core/hcd.c:1747 [] dummy_timer+0x8e4/0x14c0 drivers/usb/gadget/udc/dummy_hcd.c:1988 [] call_timer_fn+0x38/0x200 kernel/time/timer.c:1474 [] expire_timers kernel/time/timer.c:1519 [inline] [] __run_timers.part.0+0x316/0x430 kernel/time/timer.c:1790 [] __run_timers kernel/time/timer.c:1768 [inline] [] run_timer_softirq+0x44/0x90 kernel/time/timer.c:1803 [] __do_softirq+0xe6/0x2ea kernel/softirq.c:571 [] invoke_softirq kernel/softirq.c:445 [inline] [] __irq_exit_rcu kernel/softirq.c:650 [inline] [] irq_exit_rcu+0xc0/0x110 kernel/softirq.c:662 [] sysvec_apic_timer_interrupt+0xa2/0xd0 arch/x86/kernel/apic/apic.c:1106 [] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649 [] native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline] [] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline] [] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] [] acpi_idle_do_entry+0xc0/0xd0 drivers/acpi/processor_idle.c:554 The Linux kernel CVE team has assigned CVE-2022-49981 to this issue. Affected and fixed versions =========================== Fixed in 4.9.327 with commit 1bea0bbf66001b0c7bf239a4d70eaf47824d3feb Fixed in 4.14.292 with commit c06b013f5cbfeafe0a9cfa5a7128604c34e0e517 Fixed in 4.19.257 with commit f5b7e9611cffec345d62d5bdd8b6e30e89956818 Fixed in 5.4.212 with commit 53c7c4d5d40b45c127cb1193bf3e9670f844c3cf Fixed in 5.10.141 with commit 7e2fa79226580b035b00260d9f240ab9bda4af5d Fixed in 5.15.65 with commit dfd27a737283313a3e626e97b9d9b2d8d6a94188 Fixed in 5.19.7 with commit 52a3c62a815161c2dcf38ac421f6c41d8679462b Fixed in 6.0 with commit a5623a203cffe2d2b84d2f6c989d9017db1856af Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-49981 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/hid/hidraw.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/1bea0bbf66001b0c7bf239a4d70eaf47824d3feb https://git.kernel.org/stable/c/c06b013f5cbfeafe0a9cfa5a7128604c34e0e517 https://git.kernel.org/stable/c/f5b7e9611cffec345d62d5bdd8b6e30e89956818 https://git.kernel.org/stable/c/53c7c4d5d40b45c127cb1193bf3e9670f844c3cf https://git.kernel.org/stable/c/7e2fa79226580b035b00260d9f240ab9bda4af5d https://git.kernel.org/stable/c/dfd27a737283313a3e626e97b9d9b2d8d6a94188 https://git.kernel.org/stable/c/52a3c62a815161c2dcf38ac421f6c41d8679462b https://git.kernel.org/stable/c/a5623a203cffe2d2b84d2f6c989d9017db1856af