[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for exe
P J P
Re: [Qemu-devel] [PATCH v2 2/2] linux-user: allocate heap memory for execve arguments
Tue, 7 Mar 2017 00:13:18 +0530 (IST)
+-- On Mon, 6 Mar 2017, Eric Blake wrote --+
| If you impose any limit smaller than _SC_ARG_MAX, you are needlessly
| limiting things. Furthermore, _SC_ARG_MAX may not always be the same
| value, depending on how the kernel was compiled. So it's probably
| asiest to just let execve() impose its own limits (and correctly report
| errors to the caller when execve() fails), rather than trying to impose
| limits yourself.
| In short, the bug that you are fixing is not caused by the guest
| requesting something beyond execve() limits, but caused by poor use of
| alloca() leading to a stack overrun.
| You only need to fix the bug (by switching alloca() to heap allocation),
Okay, I'll send just one revised patch.
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F