[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] tools/xl: Fix potential deallocation bug
- To: Elliott Mitchell <ehem+xen@xxxxxxx>
- From: Luca Fancellu <luca.fancellu@xxxxxxx>
- Date: Wed, 29 Dec 2021 17:20:02 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hP0UbL67XX71k8RwTGfBw4XY9FE3938TDoiR++fX5bQ=; b=CRXnFNbFp7A0pD+Vrw63yTLycKkCSO4ew3qvpi3elRGE88ouumWv3gr1VYgoOtweoOcl/NRYlclvjaTq0esWH8IK3ZTzJMBgV0WZsl8jTM0IPAfPGKXV59T6/UbRvF2Yp4x5mDvYsq1tcfkxnhd9uO/WF6waG3WDwiGD9nPmHDYJOSg0o3pXqwL/XmXID7/oqLf1ZZulkCHGmplHdzVrMPmZF+JVJMBw4gAVOXzr6fSGBURhv4jzJFh33lvmktT4HMYLFJtZwph39M5jUC3nATBWdBlCMQB7X451fER8TYGs8+VZxZ4mmTYPmt1p8j28gfQXsJbhFzYXlWo9gdbM/Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CotMeWHKuZbK+04Z2hd/O26rpzkdK0REXBMDHILVMVclhzWFV5Y7ASiRXzoDyTj02Pdzr7NiLzkldXmLXsHCvUBGVeixmhBp9x6cWCGcm7xmkUEHefiM3FtVKEpePm72fBAgeGClWwGAz705RggqgYvRRTs4D/I5I2gJGG03Xy1LwlaaaKYXLXXKVeN4N2negTSnpBpNOEXIUubZb3Pqg++SOKx3/92lqA/Pv95oK7lPA+STBJU1HEywnTylJ9m0ww7l/Pwztb6/GNnXfx98Q8AnJqkVEH8mmisIRRwHbsnrCQmtHJOEZbGW30w6xDB9VicLVVwflnm/OXBXN3y6zA==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Wed, 29 Dec 2021 17:20:25 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
> On 10 Dec 2020, at 23:09, Elliott Mitchell <ehem+xen@xxxxxxx> wrote:
>
> There is potential for the info and info_free variable's purposes to
> diverge. If info was overwritten with a distinct value, yet info_free
> still needed deallocation a bug would occur on this line. Preemptively
> address this issue (making use of divergent info/info_free values is
> under consideration).
>
Looks ok to me
Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>
> Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
> ---
> tools/xl/xl_info.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/xl/xl_info.c b/tools/xl/xl_info.c
> index 3647468420..938f06f1a8 100644
> --- a/tools/xl/xl_info.c
> +++ b/tools/xl/xl_info.c
> @@ -579,7 +579,7 @@ int main_list(int argc, char **argv)
> info, nb_domain);
>
> if (info_free)
> - libxl_dominfo_list_free(info, nb_domain);
> + libxl_dominfo_list_free(info_free, nb_domain);
>
> libxl_dominfo_dispose(&info_buf);
>
> --
> 2.30.2
>
>
|