File xsa178-0002-libxl-Do-not-trust-backend-in-libxl__device_exists.patch of Package xen.2959
References: bsc#979670 CVE-2016-4963 XSA-178
From 24a66d54e50f93059c37a62c40cb957324196cd2 Mon Sep 17 00:00:00 2001
From: Ian Jackson <ian.jackson@eu.citrix.com>
Date: Wed, 4 May 2016 15:04:35 +0100
Subject: [PATCH 02/21] libxl: Do not trust backend in libxl__device_exists
To determine whether a device is supposed to exist, look in /libxl,
rather than the backend.
This is part of XSA-178.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
---
tools/libxl/libxl_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: xen-4.5.3-testing/tools/libxl/libxl_device.c
===================================================================
--- xen-4.5.3-testing.orig/tools/libxl/libxl_device.c
+++ xen-4.5.3-testing/tools/libxl/libxl_device.c
@@ -54,7 +54,7 @@ int libxl__device_exists(libxl__gc *gc,
libxl__device *device)
{
int rc;
- char *be_path = libxl__device_backend_path(gc, device);
+ char *be_path = libxl__device_libxl_path(gc, device);
const char *dir;
rc = libxl__xs_read_checked(gc, t, be_path, &dir);