diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-02-25 19:20:56 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2020-02-28 18:21:52 -0800 |
commit | f84afbdd3a9e5e10633695677b95422572f920dc (patch) | |
tree | 6a29d775d3d3623ae8068ba8105f2f96cb2fe520 /drivers/misc/vmw_vmci | |
parent | 01091c496f920e634ea84b689f480c39016752a8 (diff) | |
download | lwn-f84afbdd3a9e5e10633695677b95422572f920dc.tar.gz lwn-f84afbdd3a9e5e10633695677b95422572f920dc.zip |
libnvdimm: Out of bounds read in __nd_ioctl()
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@oracle.com>
Link: https://lore.kernel.org/r/20200225162055.amtosfy7m35aivxg@kili.mountain
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/misc/vmw_vmci')
0 files changed, 0 insertions, 0 deletions