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 93574382D5C for ; Tue, 16 Dec 2025 13:44:51 +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=1765892691; cv=none; b=RVM2qu3pm7eniDi2lG8lSgVlILwNKYqB+efEjXtpCYqb9O222/tkJSzWBVga2d0YEg7KRSs2pVjpThFzU8APuBKkXu0R+DyGP5okMB4ZcCOU3ofAV/HYPpi4ebDFskRNmgqazbQ2PXceV266gcL7NsjaY42DA4Lb9PJ16+GnUbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765892691; c=relaxed/simple; bh=cCyDsdziyWBTWOOxQWzoMsR3EuxItDr4lBoDkAkwxDU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A2gq2ZJVwo50DcFyIniG3r/xV+doggr9xZ1dpvJVKnApNPH+B8tAxVPvOnJ27ry/AgVSzuvi//DKlwsyLf8rjkpfJ3xarf9FYY1n3jZ+wAma3U9NZms/wTDZJPx5qwBE1C4EtW4YrbqCm1+hRZQSxqyGhBWrNjHIcQV1azem0c4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d/W9434O; 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="d/W9434O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02E09C4CEF1; Tue, 16 Dec 2025 13:44:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765892691; bh=cCyDsdziyWBTWOOxQWzoMsR3EuxItDr4lBoDkAkwxDU=; h=From:To:Cc:Subject:Date:Reply-To:From; b=d/W9434OkYplTIYI97j3ffh9lQdKracGfoJJ+n4Z8aO9LPav0lnwFcaVHsqY6f/im ieSrTFMJeu6GXjYK2sk7Y9Nw+oGZH5RtRGhSNeEPcRbH0iL3hAOievaHI/Ttl8VgQs yW5sPYddV875W62wzSIbn0HJKLaDfSUGFXkOb1KA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68194: media: imon: make send_packet() more robust Date: Tue, 16 Dec 2025 14:43:55 +0100 Message-ID: <2025121636-CVE-2025-68194-2b2f@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4754; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HFCJ2C97fO9Sp2tDV9Esvlyyh2vGgJbQ6dpmpVXYaLc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOSRwP+RZIbvDhkzu+JH3ez8jpU6wO1ai6LuM+lWGYv +jX7o02HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCREEWG+fXl05kUbPmsmjM+ vI4qrX/DGndoK8P8mk8r9bKf9u6Y4fQgXb5M6fuSJvYpAA== 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: media: imon: make send_packet() more robust syzbot is reporting that imon has three problems which result in hung tasks due to forever holding device lock [1]. First problem is that when usb_rx_callback_intf0() once got -EPROTO error after ictx->dev_present_intf0 became true, usb_rx_callback_intf0() resubmits urb after printk(), and resubmitted urb causes usb_rx_callback_intf0() to again get -EPROTO error. This results in printk() flooding (RCU stalls). Alan Stern commented [2] that In theory it's okay to resubmit _if_ the driver has a robust error-recovery scheme (such as giving up after some fixed limit on the number of errors or after some fixed time has elapsed, perhaps with a time delay to prevent a flood of errors). Most drivers don't bother to do this; they simply give up right away. This makes them more vulnerable to short-term noise interference during USB transfers, but in reality such interference is quite rare. There's nothing really wrong with giving up right away. but imon has a poor error-recovery scheme which just retries forever; this behavior should be fixed. Since I'm not sure whether it is safe for imon users to give up upon any error code, this patch takes care of only union of error codes chosen from modules in drivers/media/rc/ directory which handle -EPROTO error (i.e. ir_toy, mceusb and igorplugusb). Second problem is that when usb_rx_callback_intf0() once got -EPROTO error before ictx->dev_present_intf0 becomes true, usb_rx_callback_intf0() always resubmits urb due to commit 8791d63af0cf ("[media] imon: don't wedge hardware after early callbacks"). Move the ictx->dev_present_intf0 test introduced by commit 6f6b90c9231a ("[media] imon: don't parse scancodes until intf configured") to immediately before imon_incoming_packet(), or the first problem explained above happens without printk() flooding (i.e. hung task). Third problem is that when usb_rx_callback_intf0() is not called for some reason (e.g. flaky hardware; the reproducer for this problem sometimes prevents usb_rx_callback_intf0() from being called), wait_for_completion_interruptible() in send_packet() never returns (i.e. hung task). As a workaround for such situation, change send_packet() to wait for completion with timeout of 10 seconds. The Linux kernel CVE team has assigned CVE-2025-68194 to this issue. Affected and fixed versions =========================== Fixed in 5.4.302 with commit 519737af11c03590819a6eec2ad532cfdb87ea63 Fixed in 5.10.247 with commit f58ab83b7b7133e6baefe03a46846c4f6ce45e2f Fixed in 5.15.197 with commit 26f6a1dd5d81ad61a875a747698da6f27abf389b Fixed in 6.1.159 with commit 667afd4681781f60a644cd0d2ee6c59cb1c36208 Fixed in 6.6.117 with commit 8231e80118463be5598daaf266c1c83650f1948b Fixed in 6.12.58 with commit 0213e4175abbb9dfcbf7c197e3817d527f459ad5 Fixed in 6.17.8 with commit f7f3ecb4934fff782fa9bb1cd16e2290c041b22d Fixed in 6.18 with commit eecd203ada43a4693ce6fdd3a58ae10c7819252c 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-2025-68194 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/media/rc/imon.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/519737af11c03590819a6eec2ad532cfdb87ea63 https://git.kernel.org/stable/c/f58ab83b7b7133e6baefe03a46846c4f6ce45e2f https://git.kernel.org/stable/c/26f6a1dd5d81ad61a875a747698da6f27abf389b https://git.kernel.org/stable/c/667afd4681781f60a644cd0d2ee6c59cb1c36208 https://git.kernel.org/stable/c/8231e80118463be5598daaf266c1c83650f1948b https://git.kernel.org/stable/c/0213e4175abbb9dfcbf7c197e3817d527f459ad5 https://git.kernel.org/stable/c/f7f3ecb4934fff782fa9bb1cd16e2290c041b22d https://git.kernel.org/stable/c/eecd203ada43a4693ce6fdd3a58ae10c7819252c