Skip to contentSkip to conversation

CVE-2026-93120: usb: gadget: configfs: fix out-of-bounds read of qw_sign

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

usb: gadget: configfs: fix out-of-bounds read of qw_sign

os_desc_qw_sign_show() passes OS_STRING_QW_SIGN_LEN as the input length to utf16s_to_utf8s(), but that argument counts UTF-16 code units while OS_STRING_QW_SIGN_LEN (14) is the byte size of qw_sign[]. The array holds only OS_STRING_QW_SIGN_LEN / 2 (7) code units, so the conversion reads up to 7 units (14 bytes) past the end of qw_sign[] into the following members of struct gadget_info when the stored signature fills the array without a NUL terminator, exposing those bytes through the configfs attribute.

The store path halves the count for its input bound but passes the full byte count as the utf8s_to_utf16s() output limit; use the destination code-unit count in both directions.

The Linux kernel CVE team has assigned CVE-2026-93120 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 5.10.270 with commit b895dbed8ac9e12a5ffa1a2165575a8469f8340d
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 5.15.221 with commit 9b45125501aad2dff7730970461b455b0e0658ee
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 6.1.188 with commit f6da500b0f8106882598b6dec87fe37d653946cf
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 6.6.157 with commit a28c486434634f6d1e120711d2b09f3eddea6c98
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 6.12.110 with commit 7e94cb967778e074411940db4db97f22ed77560c
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 6.18.52 with commit afbf39c0f2297c6abef6d670a82a2079b0836191
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 7.2.6 with commit 36315a330e067f7773196940552feacb1debbef1
	Issue introduced in 4.13 with commit 76180d716f91f035d9c8639497cf5459b44e1a51 and fixed in 7.3-rc1 with commit f63edb54d8f738f9c21e2068c777ae1c097df6b7

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-93120

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/b895dbed8ac9e12a5ffa1a2165575a8469f8340d
	https://git.kernel.org/stable/c/9b45125501aad2dff7730970461b455b0e0658ee
	https://git.kernel.org/stable/c/f6da500b0f8106882598b6dec87fe37d653946cf
	https://git.kernel.org/stable/c/a28c486434634f6d1e120711d2b09f3eddea6c98
	https://git.kernel.org/stable/c/7e94cb967778e074411940db4db97f22ed77560c
	https://git.kernel.org/stable/c/afbf39c0f2297c6abef6d670a82a2079b0836191
	https://git.kernel.org/stable/c/36315a330e067f7773196940552feacb1debbef1
	https://git.kernel.org/stable/c/f63edb54d8f738f9c21e2068c777ae1c097df6b7