From mboxrd@z Thu Jan 1 00:00:00 1970 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 4709418EFDE for ; Mon, 21 Oct 2024 20:12:09 +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=1729541529; cv=none; b=HRpi/R71pd/n/08JebnAVhd4tPuBmFDt8xy6+UjF/49VicYYPL1LfnHdCd6HsHvKg6iuBGm9hodV5V+DqNOiFzXJJEx9idlkpyHmbWhV8x4/5jLEcj31TK2MCp1NEjBInNQoteAPXvD9HDrzDU8T8BpjA8mM+Ylcpe2bG0Tht0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541529; c=relaxed/simple; bh=MwXAU2I2fAWbsWrnXRGGtp8RmlX5dEn2Q5JrQfL/eUE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=buJvbqwL5KD6CSGjZI4fmpbAf1hhw3eEMK+BzcTwe77tbss1dIiEFWAQ2BCcS6TsBBAHbaGDHbuNFDiRiVuR3VtPrzgMl9n5tx3ZftR2jRGPyxM9aQl/qKbNYsVbeTsaJo63K5aA51UwemGt/1oxNebeVjkiV+r+h28BMEy5U80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=I1Gm5MmR; 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="I1Gm5MmR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC27DC4CEC3; Mon, 21 Oct 2024 20:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541529; bh=MwXAU2I2fAWbsWrnXRGGtp8RmlX5dEn2Q5JrQfL/eUE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=I1Gm5MmR5WoRO12v3kdXXfBEgC1gMu1Wd7ex78vMZ/6KgUliL2sHhA1nZnzsrRR29 cnMOmR419YNhr5jHz+4DVY3P+Dmjz3aMrSHuFYJM8F+pM4wBFrwNq2CgkRwAkPKX4M 3T30yPDdJuWyk7Iv1rhD3YldPrDurZevimzdNKuM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48995: Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send() Date: Mon, 21 Oct 2024 22:06:27 +0200 Message-ID: <2024102149-CVE-2022-48995-8d2e@gregkh> X-Mailer: git-send-email 2.47.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=4603; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=MwXAU2I2fAWbsWrnXRGGtp8RmlX5dEn2Q5JrQfL/eUE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliW2TdbqXtYPZi+57CwSqv6r2t/OzH+qZ5lz9y/Z4V+ vPyFxX3jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIr5kMC+Y7H/yz8Qm/j90d qUlPhdrXsdZMMWSYH36rX1ptnc+ssIptov9eSrN+9uJ7DwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send() There is a kmemleak when test the raydium_i2c_ts with bpf mock device: unreferenced object 0xffff88812d3675a0 (size 8): comm "python3", pid 349, jiffies 4294741067 (age 95.695s) hex dump (first 8 bytes): 11 0e 10 c0 01 00 04 00 ........ backtrace: [<0000000068427125>] __kmalloc+0x46/0x1b0 [<0000000090180f91>] raydium_i2c_send+0xd4/0x2bf [raydium_i2c_ts] [<000000006e631aee>] raydium_i2c_initialize.cold+0xbc/0x3e4 [raydium_i2c_ts] [<00000000dc6fcf38>] raydium_i2c_probe+0x3cd/0x6bc [raydium_i2c_ts] [<00000000a310de16>] i2c_device_probe+0x651/0x680 [<00000000f5a96bf3>] really_probe+0x17c/0x3f0 [<00000000096ba499>] __driver_probe_device+0xe3/0x170 [<00000000c5acb4d9>] driver_probe_device+0x49/0x120 [<00000000264fe082>] __device_attach_driver+0xf7/0x150 [<00000000f919423c>] bus_for_each_drv+0x114/0x180 [<00000000e067feca>] __device_attach+0x1e5/0x2d0 [<0000000054301fc2>] bus_probe_device+0x126/0x140 [<00000000aad93b22>] device_add+0x810/0x1130 [<00000000c086a53f>] i2c_new_client_device+0x352/0x4e0 [<000000003c2c248c>] of_i2c_register_device+0xf1/0x110 [<00000000ffec4177>] of_i2c_notify+0x100/0x160 unreferenced object 0xffff88812d3675c8 (size 8): comm "python3", pid 349, jiffies 4294741070 (age 95.692s) hex dump (first 8 bytes): 22 00 36 2d 81 88 ff ff ".6-.... backtrace: [<0000000068427125>] __kmalloc+0x46/0x1b0 [<0000000090180f91>] raydium_i2c_send+0xd4/0x2bf [raydium_i2c_ts] [<000000001d5c9620>] raydium_i2c_initialize.cold+0x223/0x3e4 [raydium_i2c_ts] [<00000000dc6fcf38>] raydium_i2c_probe+0x3cd/0x6bc [raydium_i2c_ts] [<00000000a310de16>] i2c_device_probe+0x651/0x680 [<00000000f5a96bf3>] really_probe+0x17c/0x3f0 [<00000000096ba499>] __driver_probe_device+0xe3/0x170 [<00000000c5acb4d9>] driver_probe_device+0x49/0x120 [<00000000264fe082>] __device_attach_driver+0xf7/0x150 [<00000000f919423c>] bus_for_each_drv+0x114/0x180 [<00000000e067feca>] __device_attach+0x1e5/0x2d0 [<0000000054301fc2>] bus_probe_device+0x126/0x140 [<00000000aad93b22>] device_add+0x810/0x1130 [<00000000c086a53f>] i2c_new_client_device+0x352/0x4e0 [<000000003c2c248c>] of_i2c_register_device+0xf1/0x110 [<00000000ffec4177>] of_i2c_notify+0x100/0x160 After BANK_SWITCH command from i2c BUS, no matter success or error happened, the tx_buf should be freed. The Linux kernel CVE team has assigned CVE-2022-48995 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 3b384bd6c3f2 and fixed in 5.10.158 with commit a82869ac52f3 Issue introduced in 5.10 with commit 3b384bd6c3f2 and fixed in 5.15.82 with commit 53b9b1201e34 Issue introduced in 5.10 with commit 3b384bd6c3f2 and fixed in 6.0.12 with commit 097c1c7a28e3 Issue introduced in 5.10 with commit 3b384bd6c3f2 and fixed in 6.1 with commit 8c9a59939deb 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-48995 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/input/touchscreen/raydium_i2c_ts.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/a82869ac52f3d9db4b2cf8fd41edc2dee7a75a61 https://git.kernel.org/stable/c/53b9b1201e34ccc895971218559123625c56fbcd https://git.kernel.org/stable/c/097c1c7a28e3da8f2811ba532be6e81faab15aab https://git.kernel.org/stable/c/8c9a59939deb4bfafdc451100c03d1e848b4169b