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 3BE4C3AEF5C for ; Fri, 1 May 2026 14:17:06 +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=1777645027; cv=none; b=bDZQuJOdZUV0mZ4/iYEsbDBqBWoYoChhdnfc11Bhicg5OkA87wpsVwXFbYLKxXSg0D6TN66O668ggR5SArgpop4y/euDcoTRAQfij7+BMW84CCmBJZsa/z27xoj8ynxmixiyoLI+W+aZ/Yy6PrmLUePkNygiHnIN53+k/xV5ePs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645027; c=relaxed/simple; bh=TXmiwa8tKDMMa6fhYvJ/OJ1U2MdfzJqbgz7xuEi7rQg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PwUgFxM3Q8h5qMmqz7zEU365fICQXXzAMMqEUai6ALZ5IlHiu4p4V8UoCeyBC9uEeeezBnK0FUZ7gH72raVHtvFJGXt85usreaJL5J4Ct2V2FG9IzQaaybOaZucx/wEI32MFYmO9HQkWdWt7iqWNNpkiUquhnIZC6pNvJhqPlvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kHlJmSHz; 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="kHlJmSHz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BCC7C2BCB4; Fri, 1 May 2026 14:17:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645026; bh=TXmiwa8tKDMMa6fhYvJ/OJ1U2MdfzJqbgz7xuEi7rQg=; h=From:To:Cc:Subject:Date:Reply-To:From; b=kHlJmSHzspo75VPxWokGkE7ELO8Ik4fRrpzSB+udMQD/+9RzXz0Jal7SxwvJFuwKm iCmvjnmmdgP0iNOplenvl8rOVfUWO7rtPWE/MP2epM6RVPcVOlC/6JFNG3yI9tRSvJ nvYJh+Z40BSVhJETNl0NsSb8xHhxrJZl56HWAAy0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31720: usb: gadget: f_uac1_legacy: validate control request size Date: Fri, 1 May 2026 16:14:31 +0200 Message-ID: <2026050131-CVE-2026-31720-3b60@gregkh> X-Mailer: git-send-email 2.54.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=2977; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UTbGz5+mZkR8+cRsN5iboOPd/IVhkqNm0Rkbi/0taGc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftrpzpdYYxpyoK8opXPOnKLx8dcnjDQ+PX9u8OG9ql krlw5++HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARH1mGeSrbTzZKLtVYsnP/ Zstzaxf4zj/2WJ9hfv6t2dJr9pQt55bo2H/6gpTb7dSnFwE= 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: usb: gadget: f_uac1_legacy: validate control request size f_audio_complete() copies req->length bytes into a 4-byte stack variable: u32 data = 0; memcpy(&data, req->buf, req->length); req->length is derived from the host-controlled USB request path, which can lead to a stack out-of-bounds write. Validate req->actual against the expected payload size for the supported control selectors and decode only the expected amount of data. This avoids copying a host-influenced length into a fixed-size stack object. The Linux kernel CVE team has assigned CVE-2026-31720 to this issue. Affected and fixed versions =========================== Fixed in 5.10.253 with commit 557d1d4e862eccd0b74cc377b66de3e1e8d49605 Fixed in 5.15.203 with commit 21b11e8581285c6f10ef43d05df349d445f24273 Fixed in 6.1.168 with commit 0d41772d98dcaf6c17e875b7d0ea0154ae1191ee Fixed in 6.6.134 with commit c6da4fed7537aec19880c24f6c3a95065adb1406 Fixed in 6.12.81 with commit be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8 Fixed in 6.18.22 with commit 8e5eb1d6e6a3d7bbea9c92132d0cda5793176426 Fixed in 6.19.12 with commit 26304d124e7f0383f8fe1168b5801a0ac7e16b1c Fixed in 7.0 with commit 6e0e34d85cd46ceb37d16054e97a373a32770f6c 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-2026-31720 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/usb/gadget/function/f_uac1_legacy.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/557d1d4e862eccd0b74cc377b66de3e1e8d49605 https://git.kernel.org/stable/c/21b11e8581285c6f10ef43d05df349d445f24273 https://git.kernel.org/stable/c/0d41772d98dcaf6c17e875b7d0ea0154ae1191ee https://git.kernel.org/stable/c/c6da4fed7537aec19880c24f6c3a95065adb1406 https://git.kernel.org/stable/c/be2d32f0c3fe333d14c0a9ca90328dacbc3e06b8 https://git.kernel.org/stable/c/8e5eb1d6e6a3d7bbea9c92132d0cda5793176426 https://git.kernel.org/stable/c/26304d124e7f0383f8fe1168b5801a0ac7e16b1c https://git.kernel.org/stable/c/6e0e34d85cd46ceb37d16054e97a373a32770f6c