Skip to content

Commit 49c1866

Browse files
committed
coredump: Remove the WARN_ON in dump_vma_snapshot
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>
1 parent 95c5436 commit 49c1866

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
@@ -1139,12 +1139,6 @@ static bool dump_vma_snapshot(struct coredump_params *cprm)
11391139

11401140
mmap_write_unlock(mm);
11411141

1142-
if (WARN_ON(i != cprm->vma_count)) {
1143-
kvfree(cprm->vma_meta);
1144-
return false;
1145-
}
1146-
1147-
11481142
for (i = 0; i < cprm->vma_count; i++) {
11491143
struct core_vma_metadata *m = cprm->vma_meta + i;
11501144

0 commit comments

Comments
 (0)