fs: prevent out-of-bounds array speculation when closing a file descriptor
PATCH 1/1 fs: prevent out-of-bounds array speculation when closing a file descriptor
Google-Bug-Id: 114199369
Signed-off-by Theodore Ts'o <[email protected]>
--- fs/file.c | 1 + 1 file changed, 1 insertion(+)
fs/file.c +1 -0
@@ -632,6 +632,7 @@ int __close_fd(struct files_struct *files, unsigned fd) fdt =files_fdtable (files);if (fd >= fdt->max_fds) goto out_unlock; + fd =array_index_nospec (fd, fdt->max_fds); file = fdt->fd[fd];if (!file) goto out_unlock;
Signature · 1 line
2.24.1
Quoted 3 lines · Theodore Ts'o
Google-Bug-Id: 114199369
Signed-off-by Theodore Ts'o <[email protected]>
- Sedat -
Quoted 19 lines
--- fs/file.c | 1 + 1 file changed, 1 insertion(+)fs/file.c +1
-1@@ -632,6 +632,7 @@ int __close_fd(struct files_struct *files, unsigned fd) fdt =files_fdtable (files);if (fd >= fdt->max_fds) goto out_unlock; + fd =array_index_nospec (fd, fdt->max_fds); file = fdt->fd[fd];if (!file) goto out_unlock; --2.24.1
Quoted 8 lines · Sedat Dilek
Quoted 3 lines · Theodore Ts'o
Google-Bug-Id: 114199369
Signed-off-by Theodore Ts'o <[email protected]>
Ping.
What is the status of this patch?
- Sedat -
Quoted 20 lines
Quoted 20 lines
--- fs/file.c | 1 + 1 file changed, 1 insertion(+)fs/file.cfs: prevent out-of-bounds array speculation when closing a file descriptor renamed from fs/file.c +1
-1@@ -632,6 +632,7 @@ int __close_fd(struct files_struct *files, unsigned fd) fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_unlock;fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor + fd = array_index_nospec(fd, fdt->max_fds); file = fdt->fd[fd]; if (!file) goto out_unlock; --2.24.1
Quoted 8 lines · Sedat Dilek
Quoted 6 lines · Sedat Dilek
Quoted 3 lines · Theodore Ts'o
Google-Bug-Id: 114199369
Signed-off-by Theodore Ts'o <[email protected]>
Quoted 7 lines
Quoted 2 lines
Ping.
What is the status of this patch?
Friendly ping again.
- Sedat -
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
--- fs/file.c | 1 + 1 file changed, 1 insertion(+)fs/file.cfs: prevent out-of-bounds array speculation when closing a file descriptor renamed from fs/file.c +1
-1@@ -632,6 +632,7 @@ int __close_fd(struct files_struct *files, unsigned fd) fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_unlock;fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor + fd = array_index_nospec(fd, fdt->max_fds); file = fdt->fd[fd]; if (!file) goto out_unlock; --2.24.1
Quoted 13 lines · Sedat Dilek
Quoted 11 lines · Sedat Dilek
Quoted 8 lines · Sedat Dilek
Quoted 3 lines · Theodore Ts'o
Google-Bug-Id: 114199369
Signed-off-by Theodore Ts'o <[email protected]>
Quoted 7 lines
Quoted 4 lines
Ping.
What is the status of this patch?
Friendly ping again.
Finally upstreamed :-).
-Sedat-
[1] https://git.kernel.org/linus/609d54441493c99f21c1823dfd66fa7f4c512ff4
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
Quoted 21 lines
--- fs/file.c | 1 + 1 file changed, 1 insertion(+)fs/file.cfs: prevent out-of-bounds array speculation when closing a file descriptor renamed from fs/file.c +1
-1@@ -632,6 +632,7 @@ int __close_fd(struct files_struct *files, unsigned fd) fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_unlock;fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor fs: prevent out-of-bounds array speculation when closing a file descriptor + fd = array_index_nospec(fd, fdt->max_fds); file = fdt->fd[fd]; if (!file) goto out_unlock; --2.24.1