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
| ||
|
Date: Mon, 29 Jun 2020 11:17:21 -0400 From: Sasha Levin <sashal@...nel.org> To: linux-kernel@...r.kernel.org, stable@...r.kernel.org Cc: Jiri Slaby <jslaby@...e.cz>, Thomas Gleixner <tglx@...utronix.de>, Brian Gerst <brgerst@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org> Subject: [PATCH 5.7 208/265] syscalls: Fix offset type of ksys_ftruncate() From: Jiri Slaby <jslaby@...e.cz> commit 8e742aa79780b13cd300a42198c1a4cea9c89905 upstream. After the commit below, truncate() on x86 32bit uses ksys_ftruncate(). But ksys_ftruncate() truncates the offset to unsigned long. Switch the type of offset to loff_t which is what do_sys_ftruncate() expects. Fixes: 121b32a58a3a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments) Signed-off-by: Jiri Slaby <jslaby@...e.cz> Signed-off-by: Thomas Gleixner <tglx@...utronix.de> Reviewed-by: Brian Gerst <brgerst@...il.com> Cc: stable@...r.kernel.org Link: https://lkml.kernel.org/r/20200610114851.28549-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org> --- include/linux/syscalls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 1815065d52f37..1b0c7813197b0 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -1358,7 +1358,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user, extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small); -static inline long ksys_ftruncate(unsigned int fd, unsigned long length) +static inline long ksys_ftruncate(unsigned int fd, loff_t length) { return do_sys_ftruncate(fd, length, 1); } -- 2.25.1
Powered by blists - more mailing lists