Re: [PATCH] hw/usb/canokey: Fix buffer overflow for OUT packet

2025-01-27 Thread Hongren Zheng
On Mon, Jan 13, 2025 at 05:38:56PM +0800, Hongren Zheng wrote: > When USBPacket in OUT direction has larger payload > than the ep_out_buffer (of size 512), a buffer overflow > would occur. > > It could be fixed by limiting the size of usb_packet_copy > to be at most bu

[PATCH] hw/usb/canokey: Fix buffer overflow for OUT packet

2025-01-13 Thread Hongren Zheng
security bug. Reported-by: Juan Jose Lopez Jaimez Signed-off-by: Hongren Zheng --- hw/usb/canokey.c | 6 +++--- hw/usb/canokey.h | 4 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index fae212f053..e2d66179e0 100644 --- a/hw/usb/canokey.c

Re: [PATCH RESEND] target/riscv/cpu.c: fix Zvkb extension config

2024-05-16 Thread Hongren Zheng
On Mon, May 13, 2024 at 03:18:53PM +0800, Yangyu Chen wrote: > I think this patch also needs to back-port to stable-8.2. Indeed, downstream OpenSSL CI using Ubuntu 24.04, which ships QEMU 8.2.2, encountered this bug and that is quite confusing QEMU 9.0.0 is also affected Links https://github.com

Re: [PATCH for-7.1?] Fix some typos in documentation (most of them found by codespell)

2022-08-12 Thread Hongren Zheng
On Fri, Aug 12, 2022 at 09:56:42AM +0200, Stefan Weil wrote: > diff --git a/docs/system/devices/canokey.rst b/docs/system/devices/canokey.rst > index c2c58ae3e7..cfa6186e48 100644 > --- a/docs/system/devices/canokey.rst > +++ b/docs/system/devices/canokey.rst > @@ -28,9 +28,9 @@ With the same softw

Re: [PATCH v4 1/2] hw: canokey: Remove HS support as not compliant to the spec

2022-06-27 Thread Hongren Zheng
On Sat, Jun 25, 2022 at 10:21:37PM +0800, MkfsSion wrote: > Canokey core currently using 16 bytes as maximum packet size for > control endpoint, but to run the device in high-speed a 64 bytes > maximum packet size is required according to USB 2.0 specification. > Since we don't acutally need to run

Re: [PATCH v4] docs/system/devices/canokey: Document limitations on usb-ehci

2022-06-27 Thread Hongren Zheng
On Sat, Jun 25, 2022 at 10:26:51PM +0800, MkfsSion wrote: > Suggested-by: Hongren (Zenithal) Zheng > Signed-off-by: YuanYang Meng > --- > v4: > Adopt Zenithal's suggestion of repharsing the limitation > > docs/system/devices/canokey.rst | 5 + > 1 file changed, 5 insertions(+) > > d

Re: [PATCH v3 2/2] docs/system/devices/canokey: Document limitations on usb-ehci

2022-06-24 Thread Hongren Zheng
On Fri, Jun 24, 2022 at 11:29:40PM +0800, MkfsSion wrote: > > -Another limitation is that this device is not compatible with ``qemu-xhci``, > -in that this device would hang when there are FIDO2 packets (traffic on > -interrupt endpoints). If you do not use FIDO2 then it works as intended, > -but

Re: [PATCH] hw: canokey: Don't run the device in high-speed

2022-06-23 Thread Hongren Zheng
On Thu, Jun 23, 2022 at 09:58:43PM +0800, MkfsSion wrote: > * Canokey core currently using 16 bytes as maximum packet size for > * EP, but to run the device in full-speed a 64 bytes maximum size is > * required according to USB 2.0 specification. Since we don't acutally > * need to run the device i