On 13/06/14 16:07, Andres Lagar Cavilla
wrote:
calling xc_evtchn_open() is *not* something which should ever be
relieved from the caller.
I realise I am not a maintainer, so ultimately it is Ian/Ian you
have to convince in this matter.
If I were doing this, there would be two patches. The first touches
libxc alone and introduces this setup function and a teardown
function, both written correctly and bugfree. The second patch
modifies xenpaging to use the new setup and teardown functions.
As it currently stands, this is a halfbaked copy and paste of too
much setup code, moving into a library without its equivalent
teardown, and a promise of a fixup patch.
I don't know how exactly the security policy applies here. My
understanding is that the hypervisor side paging code has been
declared stable and therefore subject to XSAs.
The libxc codes is, is far as I can tell, just thin wrappers around
the hypercalls. At the moment, the xenpaging utility is just
example code, so is probably fine from an XSA point of view.
However, moving code from xenpaging into libxc changes this split.
Speaking now with my XenServer security hat on,
Irrespective of whether it would technically be declared an XSA or
not, it is stupid to knowingly put a latent security bug in a
library. The best case is that the development tree has a security
bug in it for a while. The worst case is that you forget to fix it
before the next Xen release and everyone in the world picks up the
security bug as part of their stable code.
So no - this is absolutely the place to fix it.
~Andrew
|