]> 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, 29 Oct 2020 16:13:29 +0000 (16:13 +0000)
commit677cbe1324c29294bb1d1b8454b3f214725e40fd
tree44500be806ee4e2cd75aec3d0b4b74cf12acf9e1
parent34aeb4f2cc190a99cde89d7ac13b805e009272d8
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)
(cherry picked from commit 269381bb635692856aa8789a3f322e543e0c648d)
util/main-loop.c