Skip to content

Commit 1c021e7

Browse files
committed
Merge tag 'libnvdimm-fixes-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fix from Ira Weiny: - sysbot fix for out of bounds access * tag 'libnvdimm-fixes-6.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl
2 parents 4800575 + 265e98f commit 1c021e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/acpi/nfit/core.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
454454
if (cmd_rc)
455455
*cmd_rc = -EINVAL;
456456

457-
if (cmd == ND_CMD_CALL)
457+
if (cmd == ND_CMD_CALL) {
458+
if (!buf || buf_len < sizeof(*call_pkg))
459+
return -EINVAL;
460+
458461
call_pkg = buf;
462+
}
463+
459464
func = cmd_to_func(nfit_mem, cmd, call_pkg, &family);
460465
if (func < 0)
461466
return func;

0 commit comments

Comments
 (0)