]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/ntfs3: Do copy_to_user out of run_lock
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 17 Jun 2024 12:14:07 +0000 (15:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Aug 2024 04:05:38 +0000 (06:05 +0200)
commite8473e125aad45a798f67df96709dc890c835302
tree5474dcc9af6ec4b68b6e24d54fb6b4cdbd0bed27
parent234e6ea0855cdb5673d54ecaf7dc5c78f3e84630
fs/ntfs3: Do copy_to_user out of run_lock

[ Upstream commit d57431c6f511bf020e474026d9f3123d7bfbea8c ]

In order not to call copy_to_user (from fiemap_fill_next_extent)
we allocate memory in the kernel, fill it and copy it to user memory
after up_read(run_lock).

Reported-by: syzbot+36bb70085ef6edc2ebb9@syzkaller.appspotmail.com
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/frecord.c