Re: [syzbot] [mm?] possible deadlock in upgrade_mmap_lock_carefully

From: Paul Moore
Date: Wed Oct 02 2024 - 21:32:42 EST


On Wed, Oct 2, 2024 at 8:14 AM Shu Han <ebpqwerty472123@xxxxxxxxx> wrote:
>
> It seems to be the same as [1].
> New LSM hook position for remap_file_pages + IMA = deadlock.
> The new LSM hook position is added for a bypass caused by
> no check in remap_file_pages + READ_IMPLIES_EXEC in do_mmap.

Thanks Shu Han, let's mark this as a dup and sort out a fix in the first report.

#syz dup: [syzbot] [integrity?] [lsm?] possible deadlock in
process_measurement (4)

> I suggest fix it by removing the check and moving READ_IMPLIES_EXEC
> out of do_mmap[2].
>
> Link: https://lore.kernel.org/lkml/20240928065620.7abadb2d8552f03d785c77c9@xxxxxxxxxxxxxxxxxxxx/
> [1]
> Link: https://lore.kernel.org/all/20240928180044.50-1-ebpqwerty472123@xxxxxxxxx/
> [2]

--
paul-moore.com