mm/mmap: fix crashes in dup_mmap() error path
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | mm/mmap: fix Use-After-Free of vma_iterator in dup_mmap() error pathmm/ | +2 | 1 reply | |
| 2/2 | mm/mmap: fix NULL pointer dereference in dup_mmap() error handlingmm/ | +18 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH mm-unstable 0/2] mm/mmap: fix crashes in dup_mmap() error path
From: Hui Zhu <[email protected]>
This series fixes two potential kernel panics in the dup_mmap() error path triggered during fork failures:
Fix Use-After-Free: Moves vma_iter_free() to the end of the cleanup block to ensure the iterator remains valid during rollback. Fix NULL Dereference: Adds a check for vma_next() results to prevent crashing when the maple tree is empty.
Hui Zhu (2):
mm/mmap: fix Use-After-Free of vma_iterator in dup_mmap() error path mm/mmap: fix NULL pointer dereference in dup_mmap() error handling
mm/mmap.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-)
Signature · 1 line
2.43.0