]> git.ipfire.org Git - thirdparty/linux.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)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Tue, 10 Jun 2025 02:14:27 +0000 (07:44 +0530)
commitcd097df4596f3a1e9d75eb8520162de1eb8485b2
tree36fd73c0fb54e4e2982aa15eecb5a39b6d9a1c55
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494
powerpc/powernv/memtrace: Fix out of bounds issue in memtrace mmap

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
arch/powerpc/platforms/powernv/memtrace.c