]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.git/commit
main loop: Big hammer to fix logfile disk DoS in Xen setups
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 26 May 2016 15:21:56 +0000 (16:21 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Fri, 10 Jun 2016 11:06:46 +0000 (12:06 +0100)
commitca3d95113903ccffe52af3922bbf7bd14a9acc78
tree923f3e37b3cda0a93ad50e12e9405f6807b29bff
parent215e147975de7a53f9828f027b8252628ea6d527
main loop: Big hammer to fix logfile disk DoS in Xen setups

Each time round the main loop, we now fstat stderr.  If it is too big,
we dup2 /dev/null onto it.  This is not a very pretty patch but it is
very simple, easy to see that it's correct, and has a low risk of
collateral damage.

There is no limit by default but can be adjusted by setting a new
environment variable.

This fixes CVE-2014-3672.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Tested-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Set the default to 0 so that it won't affect non-xen installation. The
limit will be set by Xen toolstack.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
(cherry picked from commit 44a072f0de0d57c95c2212bbce02888832b7b74f)
main-loop.c