The patch titled Subject: ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3 has been added to the -mm tree. Its filename is ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> Subject: ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3 Changelog v3: - include the ima_kexec_hdr size in the binary_runtime_measurement size. Link: http://lkml.kernel.org/r/1473170584-15094-4-git-send-email-zohar@xxxxxxxxxxxxxxxxxx Signed-off-by: Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- security/integrity/ima/ima_queue.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -puN security/integrity/ima/ima_queue.c~ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3 security/integrity/ima/ima_queue.c --- a/security/integrity/ima/ima_queue.c~ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3 +++ a/security/integrity/ima/ima_queue.c @@ -126,11 +126,15 @@ static int ima_add_digest_entry(struct i /* * Return the amount of memory required for serializing the - * entire binary_runtime_measurement list. + * entire binary_runtime_measurement list, including the ima_kexec_hdr + * structure. */ unsigned long ima_get_binary_runtime_size(void) { - return binary_runtime_size; + if (binary_runtime_size >= (ULONG_MAX - sizeof(struct ima_kexec_hdr))) + return ULONG_MAX; + else + return binary_runtime_size + sizeof(struct ima_kexec_hdr); }; static int ima_pcr_extend(const u8 *hash, int pcr) _ Patches currently in -mm which might be from zohar@xxxxxxxxxxxxxxxxxx are ima-on-soft-reboot-restore-the-measurement-list.patch ima-permit-duplicate-measurement-list-entries.patch ima-maintain-memory-size-needed-for-serializing-the-measurement-list.patch ima-maintain-memory-size-needed-for-serializing-the-measurement-list-v3.patch ima-serialize-the-binary_runtime_measurements.patch ima-store-the-builtin-custom-template-definitions-in-a-list.patch ima-store-the-builtin-custom-template-definitions-in-a-list-v3.patch ima-support-restoring-multiple-template-formats.patch ima-support-restoring-multiple-template-formats-v3.patch ima-define-a-canonical-binary_runtime_measurements-list-format.patch ima-define-a-canonical-binary_runtime_measurements-list-format-v3.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html