Re: [Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Laurent Vivier
Le 16/06/2016 à 23:09, Peter Maydell a écrit : > On 16 June 2016 at 20:01, Laurent Vivier wrote: >> If the structure pointed by NLMSG_DATA() is bigger >> than the size of NLMSG_DATA(), don't swap its fields >> to avoid memory corruption. >> >> Signed-off-by: Laurent Vivier >> --- > > Reviewed-

Re: [Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Peter Maydell
On 16 June 2016 at 20:01, Laurent Vivier wrote: > If the structure pointed by NLMSG_DATA() is bigger > than the size of NLMSG_DATA(), don't swap its fields > to avoid memory corruption. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Peter Maydell Can this actually happen in normal operat

[Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Laurent Vivier
If the structure pointed by NLMSG_DATA() is bigger than the size of NLMSG_DATA(), don't swap its fields to avoid memory corruption. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 72 ++-- 1 file changed, 42 insertions(+), 30 deletions(-)