]> xenbits.xensource.com Git - people/dariof/qemu-xen.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>
Thu, 26 May 2016 16:35:36 +0000 (17:35 +0100)
commit44a072f0de0d57c95c2212bbce02888832b7b74f
tree78aa05e348357a7f71b79e0ea8818f04c5ef1d68
parentc2092c20d6ad5e26375ec680c504fe584ae5d4b5
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>
main-loop.c