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 8A1B61DB125 for ; Mon, 28 Jul 2025 11:23:31 +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=1753701811; cv=none; b=fSC4FvtrRCK7Wctzmnle4APVfoDtAcFzeGxmoRfhbriL5geI+lS8y0YXgUdUGdaalEN7LpBHtA+LfvJlcEjnci+c6Jg3iC/jVqNLRH80Azh5gW6u59bCPyljUjIqUbVaprzKHtx6pvkQiRxCKHUjow1RiU/+BPCZg6XCEQy0LUg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753701811; c=relaxed/simple; bh=xIdvYWGCe1dJSTwRrRypuBJfaRn/3L5TvzP4yI/xvfk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EKfg92JwfxIerlB/m0gYqa6E5VAxvBDhhgtAFO5965ae87jsZQ/AkZOKiUNCim4Go3mmV+Qzj2626jUi68t5wvxKKiboAhGUbNsGZS0QoO4Uj9syEMtkKQSqQQ/9rzzqJRTWmknbc+tdq7BJTV5SEfbRt58SvyfQJVhEBK7CWM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zfKeKHJn; 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="zfKeKHJn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC53AC4CEE7; Mon, 28 Jul 2025 11:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753701811; bh=xIdvYWGCe1dJSTwRrRypuBJfaRn/3L5TvzP4yI/xvfk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zfKeKHJnC9SVDXADG9oRIFGq6KFX8YNp0LU9akF4BjxC0gPfQqef1bq2MI5/k6wta wMZEMcTotvaCv6kRqHedqI+DopuHotp0vwyBrs90nkvw9yF99w/zwYA+9YC4cLJSWz NWkxKFI7QLa9INLMiIt7IEG0oo8OZJ+rweLe68MQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38497: usb: gadget: configfs: Fix OOB read on empty string write Date: Mon, 28 Jul 2025 13:22:39 +0200 Message-ID: <2025072818-CVE-2025-38497-b5c7@gregkh> X-Mailer: git-send-email 2.50.1 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=2449; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UsAXewmCo278YB+YErNmt4l9w8Aj8kyj/A3cypttDsg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBntsVmOzuy7mmeWb2A2rXx86klUCy+vqELE5CiVNUf6z CQuHtrTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABN5YMKwYO+Lg66G9tpTnrhI 68p9SZvyQObhd4b51TnV0zmY/fQkVz/iCj57o6cju/0kAA== 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: configfs: Fix OOB read on empty string write When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero. This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately. The Linux kernel CVE team has assigned CVE-2025-38497 to this issue. Affected and fixed versions =========================== Fixed in 6.1.147 with commit 2798111f8e504ac747cce911226135d50b8de468 Fixed in 6.6.100 with commit 58bdd5160184645771553ea732da5c2887fc9bd1 Fixed in 6.12.40 with commit 783ea37b237a9b524f1e5ca018ea17d772ee0ea0 Fixed in 6.15.8 with commit 22b7897c289cc25d99c603f5144096142a30d897 Fixed in 6.16 with commit 3014168731b7930300aab656085af784edc861f6 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-38497 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/configfs.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/2798111f8e504ac747cce911226135d50b8de468 https://git.kernel.org/stable/c/58bdd5160184645771553ea732da5c2887fc9bd1 https://git.kernel.org/stable/c/783ea37b237a9b524f1e5ca018ea17d772ee0ea0 https://git.kernel.org/stable/c/22b7897c289cc25d99c603f5144096142a30d897 https://git.kernel.org/stable/c/3014168731b7930300aab656085af784edc861f6