[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] libxl: Check return value of libxl__xs_directory in name2bdf


  • To: "G.R." <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Jul 2022 17:44:20 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=QM+CLaN+xAkrTVHpV+K7R3DHHG8+aOMrHq0gIAWw6+Y=; b=mX15mLTwyf4x8l5OvfH/DRRBBdbln+xvgzDNQfUIWEHGqzNHwiXb9HZvzbJ02G+Bh52k1ihWzYC87TrUnuFsdCfbz3lDH5WPWh7G43ULZzc5lU84BuelJL2GCvpMRdokTU1mO66vkL9dP8YtY0iW0CD9LUpUpyL7U5RCFud03Ka8sZKCRnacEzjbSUz1s53fLrbooiULQ0OvDcWbKg+GmK2QWx5NKdNh1waMz0BJyUxOMWV7u9H4b/1oqlyL1Ns3sp3P3SsfEy7WdJ9dzCEIYLl/JkBwA7zdBZt/nGlQE5Xt9r73287tTT4KkJTfsKIdDMYkL4GJHxEsTew34NM/xA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cDg2RFjTn5CapAmR5LdY/oYORaO1gbs3118uGW9iwR/Zf8hDY2gpxfVvWIVUluEX35kWnwrb6nP4nHJDopA/ma/VsHugBNDR7g/59pZzAirkBt6Z1KULkbIijPeTUUC2cgacsIyC+f5iv5BapLiWW5u0gMPf7ebNAuKtw8v3MOxB2vAafBg2bamV4FmtCIbdFbG6OetO055WwD2q8mtpfJJxJ7ll9oab5n+4jE55RBx6e+PH9zGuQlanzzZRZTJGuUvBgoUeCf7ur3R2Xz3rPY7YZYfNrSJWzzyIY2HTT618QxMnVhdVqfvMFs+v6JNwjHR21P0yDDedgWhGNd5/Ow==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Mon, 11 Jul 2022 15:44:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.07.2022 17:35, G.R. wrote:
> On Mon, Jul 11, 2022 at 7:03 PM Juergen Gross <jgross@xxxxxxxx> wrote:
>>
>> On 11.07.22 12:38, Anthony PERARD wrote:
>>> libxl__xs_directory() can potentially return NULL without setting `n`.
>>> As `n` isn't initialised, we need to check libxl__xs_directory()
>>> return value before checking `n`. Otherwise, `n` might be non-zero
>>> with `bdfs` NULL which would lead to a segv.
>>>
>>> Reported-by: "G.R." <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
>>> Fixes: 57bff091f4 ("libxl: add 'name' field to 'libxl_device_pci' in the 
>>> IDL...")
>>> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
>>
>> Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
> 
> I can confirm that the change fixed the segment fault issue I observed
> on 4.16.1 release.

I'll take the liberty and transform this into a Tested-by:.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.