diff options
author | Douglas Miller <[email protected]> | 2022-04-08 09:35:23 -0400 |
---|---|---|
committer | Jason Gunthorpe <[email protected]> | 2022-04-08 15:40:06 -0300 |
commit | 2bbac98d0930e8161b1957dc0ec99de39ade1b3c (patch) | |
tree | 55c9b2381d8313681ee4d9d1492a2fd3b8776230 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 4d809f69695d4e7d1378b3a072fa9aef23123018 (diff) |
RDMA/hfi1: Fix use-after-free bug for mm struct
Under certain conditions, such as MPI_Abort, the hfi1 cleanup code may
represent the last reference held on the task mm.
hfi1_mmu_rb_unregister() then drops the last reference and the mm is freed
before the final use in hfi1_release_user_pages(). A new task may
allocate the mm structure while it is still being used, resulting in
problems. One manifestation is corruption of the mmap_sem counter leading
to a hang in down_write(). Another is corruption of an mm struct that is
in use by another task.
Fixes: 3d2a9d642512 ("IB/hfi1: Ensure correct mm is used at all times")
Link: https://lore.kernel.org/r/[email protected]
Cc: <[email protected]>
Signed-off-by: Douglas Miller <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions