summaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/stable/sysfs-block
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-11-14 09:59:32 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-11-15 07:43:48 +0100
commit669b0cb81e4e4e78cff77a5b367c7f70c0c6c05e (patch)
treed4dd283a7330b0a37d9a447f25fbba0d0bd330f5 /Documentation/ABI/stable/sysfs-block
parentsched/task_stack: fix object_is_on_stack() for KASAN tagged pointers (diff)
downloadlinux-669b0cb81e4e4e78cff77a5b367c7f70c0c6c05e.tar.xz
linux-669b0cb81e4e4e78cff77a5b367c7f70c0c6c05e.zip
fs/proc/task_mmu: prevent integer overflow in pagemap_scan_get_args()
The "arg->vec_len" variable is a u64 that comes from the user at the start of the function. The "arg->vec_len * sizeof(struct page_region))" multiplication can lead to integer wrapping. Use size_mul() to avoid that. Also the size_add/mul() functions work on unsigned long so for 32bit systems we need to ensure that "arg->vec_len" fits in an unsigned long. Link: https://lkml.kernel.org/r/39d41335-dd4d-48ed-8a7f-402c57d8ea84@stanley.mountain Fixes: 52526ca7fdb9 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Cc: Andrei Vagin <avagin@google.com> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: David Hildenbrand <david@redhat.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Cc: Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Peter Xu <peterx@redhat.com> Cc: Ryan Roberts <ryan.roberts@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions