Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-12 Thread Eduardo Habkost
On Mon, Jan 08, 2018 at 11:50:07PM +0200, Marcel Apfelbaum wrote: > When all the fw_cfg slots are used, a write is made outside the > bounds of the fw_cfg files array as part of the sort algorithm. > > Fix it by avoiding an unnecessary array element move. > Fix also an assert while at it. > > Sig

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Marcel Apfelbaum
Hi Laszlo, On 09/01/2018 14:51, Laszlo Ersek wrote: On 01/08/18 22:50, Marcel Apfelbaum wrote: When all the fw_cfg slots are used, a write is made outside the bounds of the fw_cfg files array as part of the sort algorithm. Fix it by avoiding an unnecessary array element move. Fix also an asse

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Marcel Apfelbaum
On 09/01/2018 15:36, Laszlo Ersek wrote: On 01/09/18 14:35, Laszlo Ersek wrote: On 01/09/18 14:33, Laszlo Ersek wrote: On 01/09/18 14:18, Marcel Apfelbaum wrote: On 09/01/2018 15:09, Laszlo Ersek wrote: Hi Laszlo, I'll respond first to this mail' I'll take my time with the rest :) On 01/08

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/09/18 14:35, Laszlo Ersek wrote: > On 01/09/18 14:33, Laszlo Ersek wrote: >> On 01/09/18 14:18, Marcel Apfelbaum wrote: >>> On 09/01/2018 15:09, Laszlo Ersek wrote: >>> >>> Hi Laszlo, >>> >>> I'll respond first to this mail' I'll take my time with the rest :) >>> On 01/08/18 22:50, Marce

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/09/18 14:33, Laszlo Ersek wrote: > On 01/09/18 14:18, Marcel Apfelbaum wrote: >> On 09/01/2018 15:09, Laszlo Ersek wrote: >> >> Hi Laszlo, >> >> I'll respond first to this mail' I'll take my time with the rest :) >> >>> On 01/08/18 22:50, Marcel Apfelbaum wrote: When all the fw_cfg slots

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/09/18 14:18, Marcel Apfelbaum wrote: > On 09/01/2018 15:09, Laszlo Ersek wrote: > > Hi Laszlo, > > I'll respond first to this mail' I'll take my time with the rest :) > >> On 01/08/18 22:50, Marcel Apfelbaum wrote: >>> When all the fw_cfg slots are used, a write is made outside the >>> bou

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Marcel Apfelbaum
On 09/01/2018 15:09, Laszlo Ersek wrote: Hi Laszlo, I'll respond first to this mail' I'll take my time with the rest :) On 01/08/18 22:50, Marcel Apfelbaum wrote: When all the fw_cfg slots are used, a write is made outside the bounds of the fw_cfg files array as part of the sort algorithm. F

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/08/18 22:50, Marcel Apfelbaum wrote: > When all the fw_cfg slots are used, a write is made outside the > bounds of the fw_cfg files array as part of the sort algorithm. > > Fix it by avoiding an unnecessary array element move. > Fix also an assert while at it. > > Signed-off-by: Marcel Apfe

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/09/18 13:36, Marcel Apfelbaum wrote: > On 09/01/2018 13:15, Marc-André Lureau wrote: >> Hi >> > > Hi Marc-André, > >> On Mon, Jan 8, 2018 at 10:50 PM, Marcel Apfelbaum >> wrote: >>> When all the fw_cfg slots are used, a write is made outside the >>> bounds of the fw_cfg files array as part

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Laszlo Ersek
On 01/08/18 22:50, Marcel Apfelbaum wrote: > When all the fw_cfg slots are used, a write is made outside the > bounds of the fw_cfg files array as part of the sort algorithm. > > Fix it by avoiding an unnecessary array element move. > Fix also an assert while at it. > > Signed-off-by: Marcel Apfe

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Marcel Apfelbaum
On 09/01/2018 13:15, Marc-André Lureau wrote: Hi Hi Marc-André, On Mon, Jan 8, 2018 at 10:50 PM, Marcel Apfelbaum wrote: When all the fw_cfg slots are used, a write is made outside the bounds of the fw_cfg files array as part of the sort algorithm. Fix it by avoiding an unnecessary array

Re: [Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-09 Thread Marc-André Lureau
Hi On Mon, Jan 8, 2018 at 10:50 PM, Marcel Apfelbaum wrote: > When all the fw_cfg slots are used, a write is made outside the > bounds of the fw_cfg files array as part of the sort algorithm. > > Fix it by avoiding an unnecessary array element move. > Fix also an assert while at it. > > Signed-of

[Qemu-devel] [PATCH] fw_cfg: fix memory corruption when all fw_cfg slots are used

2018-01-08 Thread Marcel Apfelbaum
When all the fw_cfg slots are used, a write is made outside the bounds of the fw_cfg files array as part of the sort algorithm. Fix it by avoiding an unnecessary array element move. Fix also an assert while at it. Signed-off-by: Marcel Apfelbaum --- hw/nvram/fw_cfg.c | 6 -- 1 file changed,