[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR2101MB0867C3F885E41BA86EBF6339CA560@CY4PR2101MB0867.namprd21.prod.outlook.com>
Date: Wed, 8 Nov 2017 14:21:56 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Long Li <longli@...rosoft.com>, KY Srinivasan <kys@...rosoft.com>,
"Stephen Hemminger" <sthemmin@...rosoft.com>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Paul Meyer <Paul.Meyer@...rosoft.com>,
Long Li <longli@...rosoft.com>
Subject: RE: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
from KVP file
> -----Original Message-----
> From: Long Li [mailto:longli@...hange.microsoft.com]
> Sent: Wednesday, November 1, 2017 2:45 PM
> To: KY Srinivasan <kys@...rosoft.com>; Haiyang Zhang
> <haiyangz@...rosoft.com>; Stephen Hemminger
> <sthemmin@...rosoft.com>; devel@...uxdriverproject.org; linux-
> kernel@...r.kernel.org
> Cc: Paul Meyer <Paul.Meyer@...rosoft.com>; Long Li
> <longli@...rosoft.com>
> Subject: [Revised PATCH v2] hv: kvp: Avoid reading past allocated blocks
> from KVP file
>
> [This sender failed our fraud detection checks and may not be who they
> appear to be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
>
> From: Paul Meyer <Paul.Meyer@...rosoft.com>
>
> While reading in more than one block (50) of KVP records, the allocation
> goes per block, but the reads used the total number of allocated records
> (without resetting the pointer/stream). This causes the records buffer to
> overrun when the refresh reads more than one block over the previous
> capacity (e.g. reading more than 100 KVP records whereas the in-memory
> database was empty before).
>
> Fix this by reading the correct number of KVP records from file each time.
>
> Changes since v1:
> 1. Properly wrapped comment texts.
> 2. Added the 2nd Signed-off-by.
>
> Signed-off-by: Paul Meyer <Paul.Meyer@...rosoft.com>
> Signed-off-by: Long Li <longli@...rosoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
Powered by blists - more mailing lists