Re: fs: Expand __fd_install_received() to accept fd

2020-06-22 Thread Kees Cook
8 2020 -0700 > > fs: Expand __fd_install_received() to accept fd > > Calling __fd_install_received() with fd >= 0 and ufd being non-null will > cause a put_user of an uninitialized new_fd hence potentially leaking > data on the stack back to the user. > > static analysis

re: fs: Expand __fd_install_received() to accept fd

2020-06-22 Thread Colin Ian King
Hi, static analysis with Coverity has detected a potential issue with the following commit: commit 8336af9ab8c5d64a309cbf72648054af61548899 Author: Kees Cook Date: Wed Jun 10 08:46:58 2020 -0700 fs: Expand __fd_install_received() to accept fd Calling __fd_install_received() with fd >

[PATCH v5 5/7] fs: Expand __fd_install_received() to accept fd

2020-06-17 Thread Kees Cook
Expand __fd_install_received() with support for replace_fd() for the coming seccomp "addfd" ioctl(). Add new wrapper fd_replace_received() for the new mode and update existing wrappers to retain old mode. Signed-off-by: Kees Cook --- fs/file.c| 22 +- include/linu

[PATCH v4 05/11] fs: Expand __fd_install_received() to accept fd

2020-06-15 Thread Kees Cook
Expand __fd_install_received() with support for replace_fd() for the coming seccomp "addfd" ioctl(). Add new wrapper fd_replace_received() for the new mode and update existing wrappers to retain old mode. Signed-off-by: Kees Cook --- fs/file.c| 22 -- include/linu