Skip to content

Commit b043ae6

Browse files
ebiedermgregkh
authored andcommitted
coredump: Remove the WARN_ON in dump_vma_snapshot
commit 49c1866 upstream. The condition is impossible and to the best of my knowledge has never triggered. We are in deep trouble if that conditions happens and we walk past the end of our allocated array. So delete the WARN_ON and the code that makes it look like the kernel can handle the case of walking past the end of it's vma_meta array. Reviewed-by: Jann Horn <jannh@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 936c8be commit b043ae6

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

fs/coredump.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,12 +1128,6 @@ static bool dump_vma_snapshot(struct coredump_params *cprm)
11281128

11291129
mmap_write_unlock(mm);
11301130

1131-
if (WARN_ON(i != cprm->vma_count)) {
1132-
kvfree(cprm->vma_meta);
1133-
return false;
1134-
}
1135-
1136-
11371131
for (i = 0; i < cprm->vma_count; i++) {
11381132
struct core_vma_metadata *m = cprm->vma_meta + i;
11391133

0 commit comments

Comments
 (0)