<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cherryusb.git/core, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/cherryusb.git/atom/core?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/cherryusb.git/atom/core?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/'/>
<updated>2026-07-17T01:43:01Z</updated>
<entry>
<title>fix(usbh): bounds-check cur_ep before writing ep[] in parse_config_descriptor (#426)</title>
<updated>2026-07-17T01:43:01Z</updated>
<author>
<name>yi chen</name>
<email>87560781+94xhn@users.noreply.github.com</email>
</author>
<published>2026-07-17T01:43:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=5bfaf7e3fc542db6624fc51cceccbb1d92d8706c'/>
<id>urn:sha1:5bfaf7e3fc542db6624fc51cceccbb1d92d8706c</id>
<content type='text'>
* fix(usbh): check cur_ep against CONFIG_USBHOST_MAX_ENDPOINTS before writing ep[]

parse_config_descriptor() checks cur_ep_num (the interface descriptor's
self-declared bNumEndpoints) against CONFIG_USBHOST_MAX_ENDPOINTS when
the INTERFACE descriptor is parsed, but cur_ep (the actual write index,
incremented once per ENDPOINT sub-descriptor encountered in the byte
stream) is never bounds-checked in the USB_DESCRIPTOR_TYPE_ENDPOINT
case before the memcpy.

A non-conformant or malicious device can declare a small bNumEndpoints
while still emitting more ENDPOINT descriptors than declared in the
raw config descriptor byte stream, causing cur_ep to exceed
CONFIG_USBHOST_MAX_ENDPOINTS and the memcpy to write past the ep[]
array, past altsetting[], and potentially past the whole
usbh_configuration struct.

Add the same bounds check pattern already used for cur_iface and
cur_alt_setting two cases above, applied to cur_ep before the memcpy.

* Allow interfaces to use configured capacity

Endpoint counts are quantities, so a declaration equal to the endpoint array capacity is valid. The per-index guard still rejects descriptors that contain more endpoint records than the storage can hold.

Constraint: Preserve the new cur_ep index guard

Confidence: high

Scope-risk: narrow

Tested: Real parser matrix for declared/actual 3/3, 4/4, 5/5, and 3/5; MinGW and WSL GCC13 ASan+UBSan

Not-tested: Physical USB device enumeration</content>
</entry>
<entry>
<title>fix(security): check desc len overflow</title>
<updated>2026-07-14T02:54:43Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-07-14T02:54:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=bce3346209445d8e8f9d60860c3e7ff6936d12b3'/>
<id>urn:sha1:bce3346209445d8e8f9d60860c3e7ff6936d12b3</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>update(security): check null pointer and overflow</title>
<updated>2026-07-12T10:37:33Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-07-12T10:37:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=22b07a18fde0befcdb59d58de5ad62c6ab4ba88e'/>
<id>urn:sha1:22b07a18fde0befcdb59d58de5ad62c6ab4ba88e</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>update(core/usbh_otg): update usbh_initialize param</title>
<updated>2026-04-23T11:46:01Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-04-23T11:46:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=dce7491d171fd1f15fa840377aa343b7927f65df'/>
<id>urn:sha1:dce7491d171fd1f15fa840377aa343b7927f65df</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>fix(security): remove hport mutex safely</title>
<updated>2026-04-21T13:41:27Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-04-21T13:41:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=9ce1b1cee3ad712bbc3d2019f0f49d69987ce2d7'/>
<id>urn:sha1:9ce1b1cee3ad712bbc3d2019f0f49d69987ce2d7</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>fix(class/hub): remove bus mutex, replace with mq to exit thread</title>
<updated>2026-04-17T02:56:13Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-04-16T14:02:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=3bd79e23648ac522ebfe9b17768bce7ea359b4a5'/>
<id>urn:sha1:3bd79e23648ac522ebfe9b17768bce7ea359b4a5</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>fix(core): adjust init&amp;deinit event callback position</title>
<updated>2026-04-03T10:45:51Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-04-03T10:45:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=3d97aeebdef5d8a8ec3907d3f4f44816d49cd76e'/>
<id>urn:sha1:3d97aeebdef5d8a8ec3907d3f4f44816d49cd76e</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>fix(core/usbh_core): fix desc length parse</title>
<updated>2026-03-30T11:05:59Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-03-30T11:05:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=b53673c2dbfdb8860c3980fcc036f81c508f74d3'/>
<id>urn:sha1:b53673c2dbfdb8860c3980fcc036f81c508f74d3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor: move cherryrb and cherrymp into common dir, rename with usb_ringbuffer and usb_mempool</title>
<updated>2026-02-11T11:58:09Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-02-11T11:49:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=362fec943a386c8cf623108f5f9019904270156f'/>
<id>urn:sha1:362fec943a386c8cf623108f5f9019904270156f</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
<entry>
<title>update(demo): remove all old desc api</title>
<updated>2026-01-24T09:39:42Z</updated>
<author>
<name>sakumisu</name>
<email>1203593632@qq.com</email>
</author>
<published>2026-01-24T09:39:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/cherryusb.git/commit/?id=e44d44f5b6b54c9c86dfe272aa72c0af49afefd5'/>
<id>urn:sha1:e44d44f5b6b54c9c86dfe272aa72c0af49afefd5</id>
<content type='text'>
Signed-off-by: sakumisu &lt;1203593632@qq.com&gt;
</content>
</entry>
</feed>
