]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Tue, 10 Jun 2025 02:12:26 +0000 (07:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:19 +0000 (11:05 +0100)
commit81260c41b518b6f32c701425f1427562fa92f293
tree6329549c48cd964a46743faa9f76915b48c3448f
parent5814a7fc3abb41f63f2d44c9d3ff9d4e62965b72
powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap

[ Upstream commit cd097df4596f3a1e9d75eb8520162de1eb8485b2 ]

memtrace mmap issue has an out of bounds issue. This patch fixes the by
checking that the requested mapping region size should stay within the
allocated region size.

Reported-by: Jonathan Greental <yonatan02greental@gmail.com>
Fixes: 08a022ad3dfa ("powerpc/powernv/memtrace: Allow mmaping trace buffers")
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250610021227.361980-1-maddy@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/platforms/powernv/memtrace.c