libxl: correctly dispose of dominfo list in libxl_name_to_domid
PATCH 1/1 libxl: correctly dispose of dominfo list in libxl_name_to_domid
Tamas reported ssid_label was leaked. Use the designated function to free dominfo list to fix the leakage.
---
Backport candidate.
--- tools/libxl/libxl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/libxl_utils.c +1 -1
@@ -90,7 +90,7 @@ int libxl_name_to_domid(libxl_ctx *ctx, const char *name, }free (domname); } -free (dominfo); +libxl_dominfo_list_free (dominfo, nb_domains);return ret; }
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 6 lines · Wei Liu
Tamas reported
ssid_labelwas leaked. Use the designated function to free dominfo list to fix the leakage.Reported-by Tamas K Lengyel <[email protected]>Signed-off-by Wei Liu <[email protected]>Tested-by Tamas K Lengyel <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Wei Liu writes ("[PATCH for-4.12] libxl: correctly dispose of dominfo list in libxl_name_to_domid"):
Quoted 6 lines
Tamas reported
ssid_labelwas leaked. Use the designated function to free dominfo list to fix the leakage.Reported-by Tamas K Lengyel <[email protected]>Signed-off-by Wei Liu <[email protected]>Tested-by Tamas K Lengyel <[email protected]>
Quoted 1 line
Backport candidate.
Noted.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Ian Jackson writes ("Re: [PATCH for-4.12] libxl: correctly dispose of dominfo list in libxl_name_to_domid"):
Quoted 8 lines
Wei Liu writes ("[PATCH for-4.12] libxl: correctly dispose of dominfo list in
libxl_name_to_domid"):Quoted 6 lines
Tamas reported
ssid_labelwas leaked. Use the designated function to free dominfo list to fix the leakage.Reported-by Tamas K Lengyel <[email protected]>Signed-off-by Wei Liu <[email protected]>Tested-by Tamas K Lengyel <[email protected]>
Quoted 5 lines
Acked-by Ian Jackson <[email protected]>Quoted 1 line
Backport candidate.
Noted.
For reference:
This bug was first introduced in
35c1498503216510095745d06d09f0f01ddf800e
libxenlight: fix name to domid conversion
where the call to libxl_domain_list was introduced. A fix was attempted in
cbc97d570c09ff9a1db5af18f5e5db5565ab3506
libxenlight: fix memory leaks
which is where the `free(dominfo)' call was introduced, but that was not right. That latter commit is in staging-3.4. So all supported (and security-supported) versions are affected. I have backported this to 4.10 and 4.11. (As it doesn't seem to me to be a security issue I have not fixed it on earlier branches.)
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel