diff options
author | Eric W. Biederman <[email protected]> | 2022-03-08 13:04:19 -0600 |
---|---|---|
committer | Eric W. Biederman <[email protected]> | 2022-03-08 13:04:19 -0600 |
commit | 390031c942116d4733310f0684beb8db19885fe6 (patch) | |
tree | e9f3a4fbb850a5c973b31d66eb77878065fd71aa /net/lapb/lapb_in.c | |
parent | 9ec7d3230717b4fe9b6c7afeb4811909c23fa1d7 (diff) |
coredump: Use the vma snapshot in fill_files_note
Matthew Wilcox reported that there is a missing mmap_lock in
file_files_note that could possibly lead to a user after free.
Solve this by using the existing vma snapshot for consistency
and to avoid the need to take the mmap_lock anywhere in the
coredump code except for dump_vma_snapshot.
Update the dump_vma_snapshot to capture vm_pgoff and vm_file
that are neeeded by fill_files_note.
Add free_vma_snapshot to free the captured values of vm_file.
Reported-by: Matthew Wilcox <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Cc: [email protected]
Fixes: a07279c9a8cd ("binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot")
Fixes: 2aa362c49c31 ("coredump: extend core dump note section to contain file names of mapped files")
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions