acpi/nfit: ensure that intel passphrase length is not larger than nvdimm
Subsystems (2)
PATCH 1/1 acpi/nfit: ensure that intel passphrase length is not larger than nvdimm
Both are same now, but if length of nvdimm passphrase is changed to less than intel passphrase length, OOB access will happen
Signed-off-by Li RongQing <[email protected]>
--- drivers/acpi/nfit/intel.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/nfit/intel.c +2 -0
@@ -248,6 +248,8 @@ static int __maybe_unused intel_security_erase(struct nvdimm *nvdimm, }, }; +BUILD_BUG_ON (NVDIMM_PASSPHRASE_LEN <ND_INTEL_PASSPHRASE_SIZE ); +if (!test_bit (cmd, &nfit_mem->dsm_mask))return -ENOTTY ;
Signature · 6 lines
2.16.2 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm