Skip to content

Commit f81172e

Browse files
author
CKI KWF Bot
committed
Merge: acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/1175 JIRA: https://issues.redhat.com/browse/RHEL-76136 CVE: CVE-2024-56662 Pull in fix for CVE-2024-56662 Signed-off-by: Jeff Moyer <jmoyer@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: Ewan D. Milne <emilne@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents e3b2ce7 + ec3dfd1 commit f81172e

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)