[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPcyv4h99vYcxgJ_9NKtYbhAGsifTG0JCRYq-j2t_CQinHZVcw@mail.gmail.com>
Date: Tue, 25 Feb 2020 09:40:17 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
linux-nvdimm <linux-nvdimm@...ts.01.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] libnvdimm: Out of bounds read in __nd_ioctl()
On Tue, Feb 25, 2020 at 8:21 AM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> The "cmd" comes from the user and it can be up to 255. It it's more
> than the number of bits in long, it results out of bounds read when we
> check test_bit(cmd, &cmd_mask). The highest valid value for "cmd" is
> ND_CMD_CALL (10) so I added a compare against that.
>
> Fixes: 62232e45f4a2 ("libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Looks good, applied.
Powered by blists - more mailing lists