[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdwnL_=En1soZX_STdrWY86rm2zqsPLx4pv0NK52SDgkw@mail.gmail.com>
Date: Sat, 9 Jan 2021 20:43:22 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Dexuan Cui <decui@...rosoft.com>,
"rafael@...nel.org" <rafael@...nel.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"len.brown@...el.com" <len.brown@...el.com>,
Michael Kelley <mikelley@...rosoft.com>,
"rui.zhang@...el.com" <rui.zhang@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
KY Srinivasan <kys@...rosoft.com>,
"dwaipayanray1@...il.com" <dwaipayanray1@...il.com>
Subject: Re: [PATCH] ACPI: scan: Fix a Hyper-V Linux VM panic caused by buffer overflow
On Sat, Jan 9, 2021 at 7:08 PM Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> On Saturday, January 9, 2021 10:37:41 AM CET Dexuan Cui wrote:
...
> > Do you want a simple strlen() check like the below, or a full
> > check of the AAA#### or NNNN#### format?
>
> It would be good to check the format too while at it.
Let me summarize. It seems from my perspective that the best is to
have two checks here (as far as I got word "too" in Rafael's reply):
- per length with a message that "length is exceeded"
- per format with probably different messages depending on the checks
(like "vendor prefix has incorrect format" and "device id has
incorrect format").
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists