lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240701174805.1897344-2-andrii@kernel.org>
Date: Mon,  1 Jul 2024 10:48:05 -0700
From: Andrii Nakryiko <andrii@...nel.org>
To: linux-mm@...ck.org,
	akpm@...ux-foundation.org
Cc: linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	adobriyan@...il.com,
	Andrii Nakryiko <andrii@...nel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH v2 2/2] fs/procfs: improve PROCMAP_QUERY's compat mode handling

Kernel provides compat_ptr_ioctl() wrapper to sanitize pointers for
32-bit processes on 64-bit host architectures. Given procfs_procmap_ioctl()
always expects pointer argument, this is exactly what we need.

This has any effect only on 32-bit processes on s390 architecture.

Suggested-by: Arnd Bergmann <arnd@...db.de>
Fixes: 3757be498749 ("fs/procfs: implement efficient VMA querying API for /proc/<pid>/maps")
Signed-off-by: Andrii Nakryiko <andrii@...nel.org>
---
 fs/proc/task_mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 3f1d0d2f78fe..b7bb4d04e962 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -637,7 +637,7 @@ const struct file_operations proc_pid_maps_operations = {
 	.llseek		= seq_lseek,
 	.release	= proc_map_release,
 	.unlocked_ioctl = procfs_procmap_ioctl,
-	.compat_ioctl	= procfs_procmap_ioctl,
+	.compat_ioctl	= compat_ptr_ioctl,
 };
 
 /*
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ