Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-24 Thread P J P
+-- On Thu, 24 Jan 2019, Michael Roth wrote --+ | I would call a helper function like get_args_max() or whatever and have | the posix implementation in qga/commands-posix.c and a stub'd version | in qga/commands-win32.c. There's an article here that might be useful | for figuring out how we would i

Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-24 Thread Michael Roth
Quoting P J P (2019-01-13 11:28:03) > +-- On Fri, 11 Jan 2019, Daniel P. Berrangé wrote --+ > | qga/commands.c already includes qemu/osdep.h which includs unistd.h. > | > | The build problem patchew reported was from *mingw* builds where > | sysconf does not exist. > > I see; Not sure how to fix i

Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-13 Thread P J P
+-- On Fri, 11 Jan 2019, Daniel P. Berrangé wrote --+ | qga/commands.c already includes qemu/osdep.h which includs unistd.h. | | The build problem patchew reported was from *mingw* builds where | sysconf does not exist. I see; Not sure how to fix it. Maybe with conditional declaration? #ifdef __M

Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-11 Thread Daniel P . Berrangé
On Fri, Jan 11, 2019 at 03:22:51PM +0530, P J P wrote: > +-- On Mon, 7 Jan 2019, P J P wrote --+ > | Qemu guest agent while executing user commands does not seem to > | check length of argument list and/or environment variables passed. > | It may lead to integer overflow or infinite loop issues. Ad

Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-11 Thread P J P
+-- On Mon, 7 Jan 2019, P J P wrote --+ | Qemu guest agent while executing user commands does not seem to | check length of argument list and/or environment variables passed. | It may lead to integer overflow or infinite loop issues. Add check | to avoid it. | | -size_t str_size = 1; | +si

Re: [Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190107103426.2669-1-ppan...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

[Qemu-devel] [PATCH] qga: check length of command-line & environment variables

2019-01-07 Thread P J P
From: Prasad J Pandit Qemu guest agent while executing user commands does not seem to check length of argument list and/or environment variables passed. It may lead to integer overflow or infinite loop issues. Add check to avoid it. Reported-by: Niu Guoxiang Signed-off-by: Prasad J Pandit ---