Re: [Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-26 Thread Paolo Bonzini
On 22/10/2018 14:09, P J P wrote: > From: Prasad J Pandit > > While performing gpio write via strongarm_gpio_handler_update > routine, the 'bit' index could access beyond s->handler[28] array. > Add check to avoid OOB access. > > Reported-by: Moguofang > Signed-off-by: Prasad J Pandit > --- >

Re: [Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-22 Thread P J P
+-- On Mon, 22 Oct 2018, liqsub1 wrote --+ | +if (bit < sizeof(s->handler) / sizeof(s->handler[0])) { | | Maybe you can use ARRAY_SIZE here. Yes, sent patch v1. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-22 Thread liqsub1
2018-10-22 liqsub1 发件人:P J P 发送时间:2018-10-23 01:39 主题:[Qemu-devel] [PATCH 1/3] arm: check bit index before use 收件人:"Qemu Developers" 抄送:"Peter Maydell","Moguofang","Prasad J Pandit" From: Prasad J Pandit While performing gpio write via str

[Qemu-devel] [PATCH 1/3] arm: check bit index before use

2018-10-22 Thread P J P
From: Prasad J Pandit While performing gpio write via strongarm_gpio_handler_update routine, the 'bit' index could access beyond s->handler[28] array. Add check to avoid OOB access. Reported-by: Moguofang Signed-off-by: Prasad J Pandit --- hw/arm/strongarm.c | 4 +++- 1 file changed, 3 insert