Subject: + vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2.patch added to -mm tree To: greg.pearson@xxxxxx,d.hatayama@xxxxxxxxxxxxxx,ebiederm@xxxxxxxxxxxx,holzheu@xxxxxxxxxxxxxxxxxx,vgoyal@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 03 Feb 2014 13:21:52 -0800 The patch titled Subject: vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2 has been added to the -mm tree. Its filename is vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2.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: Greg Pearson <greg.pearson@xxxxxx> Subject: vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2 Signed-off-by: Greg Pearson <greg.pearson@xxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Cc: HATAYAMA Daisuke <d.hatayama@xxxxxxxxxxxxxx> Cc: Michael Holzheu <holzheu@xxxxxxxxxxxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/vmcore.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff -puN fs/proc/vmcore.c~vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2 fs/proc/vmcore.c --- a/fs/proc/vmcore.c~vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2 +++ a/fs/proc/vmcore.c @@ -472,9 +472,10 @@ static int __init update_note_header_siz sz = sizeof(Elf64_Nhdr) + ((nhdr_ptr->n_namesz + 3) & ~3) + ((nhdr_ptr->n_descsz + 3) & ~3); - /* Silently drop further PT_NOTE entries */ - if ((real_sz + sz) > max_sz) + if ((real_sz + sz) > max_sz) { + pr_warn("Warning: dropping PT_NOTE entry\n"); break; + } real_sz += sz; nhdr_ptr = (Elf64_Nhdr*)((char*)nhdr_ptr + sz); } @@ -653,9 +654,10 @@ static int __init update_note_header_siz sz = sizeof(Elf32_Nhdr) + ((nhdr_ptr->n_namesz + 3) & ~3) + ((nhdr_ptr->n_descsz + 3) & ~3); - /* Silently drop further PT_NOTE entries */ - if ((real_sz + sz) > max_sz) + if ((real_sz + sz) > max_sz) { + pr_warn("Warning: dropping PT_NOTE entry\n"); break; + } real_sz += sz; nhdr_ptr = (Elf32_Nhdr*)((char*)nhdr_ptr + sz); } _ Patches currently in -mm which might be from greg.pearson@xxxxxx are vmcore-prevent-pt_note-p_memsz-overflow-during-header-update.patch vmcore-prevent-pt_note-p_memsz-overflow-during-header-update-v2.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