[lkml]   [2020]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] libnvdimm: Out of bounds read in __nd_ioctl()
On Tue, Feb 25, 2020 at 8:21 AM Dan Carpenter <> 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 <>

Looks good, applied.

 \ /
  Last update: 2020-02-25 18:41    [W:0.038 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site