[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: fix segfault on uninitialized xch->fmem
commit c4bdbec00c9063736361124a3492ebceabfaed06 Author: Seraphime Kirkovski <kirkseraph@xxxxxxxxx> AuthorDate: Tue Apr 4 14:40:48 2017 +0200 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Tue Apr 4 14:51:23 2017 +0100 libxc: fix segfault on uninitialized xch->fmem Currently in xc_interface_open, xch->fmem is not initialized and in some rare case the code fails before ever assigning a value to it. I got this in master: $ sudo ./xl/xl run xencall: error: Could not obtain handle on privileged command interface: No such file or directory Segmentation fault This initializes the whole xch_buff to 0. Signed-off-by: Seraphime Kirkovski <kirkseraph@xxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxc/xc_private.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 72e6242..f395594 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -30,7 +30,7 @@ struct xc_interface_core *xc_interface_open(xentoollog_logger *logger, xentoollog_logger *dombuild_logger, unsigned open_flags) { - struct xc_interface_core xch_buf, *xch = &xch_buf; + struct xc_interface_core xch_buf = { 0 }, *xch = &xch_buf; xch->flags = open_flags; xch->dombuild_logger_file = 0; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |