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-next>] [day] [month] [year] [list]
Message-ID: <20241115-vfs-usercopy-82de2c4b92b7@brauner>
Date: Fri, 15 Nov 2024 15:05:46 +0100
From: Christian Brauner <brauner@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Christian Brauner <brauner@...nel.org>,
	linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [GIT PULL] vfs copy_struct_to_user()

Hey Linus,

/* Summary */

This adds a copy_struct_to_user() helper which is a companion helper to
the already widely used copy_struct_from_user().

It copies a struct from kernel space to userspace, in a way that
guarantees backwards-compatibility for struct syscall arguments as long
as future struct extensions are made such that all new fields are
appended to the old struct, and zeroed-out new fields have the same
meaning as the old struct.

The first user is sched_getattr() system call but once the pidfs updates
for this cycle have landed the new extensible ioctl will be ported to it
as well.

/* Testing */

gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)

All patches are based on v6.12-rc3 and have been sitting in linux-next.
No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

No known conflicts.

The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354:

  Linux 6.12-rc3 (2024-10-13 14:33:32 -0700)

are available in the Git repository at:

  git@...olite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.usercopy

for you to fetch changes up to 112cca098a7010c02a4d535a253af72e4e5bbd06:

  sched_getattr: port to copy_struct_to_user (2024-10-21 16:51:31 +0200)

Please consider pulling these changes from the signed vfs-6.13.usercopy tag.

Thanks!
Christian

----------------------------------------------------------------
vfs-6.13.usercopy

----------------------------------------------------------------
Aleksa Sarai (2):
      uaccess: add copy_struct_to_user helper
      sched_getattr: port to copy_struct_to_user

 include/linux/uaccess.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++
 kernel/sched/syscalls.c | 42 +--------------------
 2 files changed, 99 insertions(+), 40 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ